We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drizzle-orm
0.29.2
drizzle-kit
0.5.1
schema
export const lubricants = pgTable('lubricants', { id: serial('id').primaryKey(), name: varchar('name').notNull(), image: varchar('image').notNull(), description: text('description'), km: integer('km').notNull().default(0), makes: integer('makes').notNull().array().default([]), models: integer('models').notNull().array().default([]), });
but generated migration is
CREATE TABLE IF NOT EXISTS "lubricants" ( "id" serial PRIMARY KEY NOT NULL, "name" varchar NOT NULL, "image" varchar NOT NULL, "description" text, "km" integer DEFAULT 0 NOT NULL, "makes" integer[] DEFAULT , "models" integer[] DEFAULT );
generate sql with
"models" integer[] DEFAULT '()" ``` ### Environment & setup _No response_
The text was updated successfully, but these errors were encountered:
+1 same problem.
I am using .default(sql`array[]::varchar[]`) to work around now. https://stackoverflow.com/a/30933366/19652493
.default(sql`array[]::varchar[]`)
Sorry, something went wrong.
Closing as duplicate of #1003
No branches or pull requests
What version of
drizzle-orm
are you using?0.29.2
What version of
drizzle-kit
are you using?0.5.1
Describe the Bug
schema
but generated migration is
Expected behavior
generate sql with
The text was updated successfully, but these errors were encountered: