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.28.0
drizzle-kit
0.19.12
This is my drizzle schema.
export const responses = pgTable('responses', { id: uuid('id').defaultRandom().primaryKey(), response: uuid('user_response').array().default([]).notNull(), isCorrect: boolean('is_correct'), userTestId: uuid('user_test_id') .references(() => userTests.id) .notNull(), questionId: uuid('question_id') .references(() => questions.id) .notNull(), createdAt: timestamp('created_at').defaultNow().notNull(), })
Migrations look like this
CREATE TABLE IF NOT EXISTS "responses" ( "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, "user_response" uuid[] DEFAULT NOT NULL, "is_correct" boolean, "user_test_id" uuid NOT NULL, "question_id" uuid NOT NULL, "created_at" timestamp DEFAULT now() NOT NULL );
Whereas user_response column should be like
`"user_response" uuid[] DEFAULT '{}' NOT NULL,`
I am using Next13, vercel postgres and turborepo.
The text was updated successfully, but these errors were encountered:
Hey team @AndriiSherman any updates on this issue? I am unable to use db push because of this issue and I don't want migration files in my codebase.
Sorry, something went wrong.
I think you could use the magic sql operator to avoid this issue:
{ response: uuid('user_response').array().default(sql`'{}'`).notNull(), }
Should be fixed in drizzle-kit0.24.0 Please check release notes before updating
drizzle-kit0.24.0
AndriiSherman
No branches or pull requests
What version of
drizzle-orm
are you using?0.28.0
What version of
drizzle-kit
are you using?0.19.12
Describe the Bug
This is my drizzle schema.
Migrations look like this
Expected behavior
Whereas user_response column should be like
Environment & setup
I am using Next13, vercel postgres and turborepo.
The text was updated successfully, but these errors were encountered: