I am trying to create an unique key on a table using a custom schema, the generated sql migration file does not produce the correct output and when I execute it the error
CREATE SCHEMA "mySchema";CREATE TABLE IF NOT EXISTS "mySchema"."users" ( "id" serial PRIMARY KEY NOT NULL, "name" text NOT NULL, "verified" boolean DEFAULT false NOT NULL, "jsonb" jsonb, "created_at" timestamp with time zone DEFAULT now() NOT NULL);CREATE UNIQUE INDEX IF NOT EXISTS "userUQ" ON "users" ("name");/*When this SQL query is execute the following exception is thrown: `relation "users" does not exist`Executed on: Postgres Docker (postgres:15.2-alpine3.17) Mac M2The incorrect line is `CREATE UNIQUE INDEX IF NOT EXISTS "userUQ" ON "users" ("name");`Expected migration `CREATE UNIQUE INDEX IF NOT EXISTS "userUQ" ON "mySchema"."users" ("name");` note that the schema musb be added before the table name.*/
CREATE SCHEMA "mySchema";CREATE TABLE IF NOT EXISTS "mySchema"."users" ( "id" serial PRIMARY KEY NOT NULL, "name" text NOT NULL, "verified" boolean DEFAULT false NOT NULL, "jsonb" jsonb, "created_at" timestamp with time zone DEFAULT now() NOT NULL);CREATE UNIQUE INDEX IF NOT EXISTS "userUQ" ON "users" ("name");/*When this SQL query is execute the following exception is thrown: `relation "users" does not exist`Executed on: Postgres Docker (postgres:15.2-alpine3.17) Mac M2The incorrect line is `CREATE UNIQUE INDEX IF NOT EXISTS "userUQ" ON "users" ("name");`Expected migration `CREATE UNIQUE INDEX IF NOT EXISTS "userUQ" ON "mySchema"."users" ("name");` note that the schema musb be added before the table name.*/
I didn't find in the documentation how to add the schema to the