Can't alter column from `.notNull()` to `allow null`
Background
I have an SQLite db, and a schema.
I edited my schema to:
Aim
Assuming the business logic is correct, I aimed to migrate my database with
drizzle-kit generate
and <apply migration script>.
Problem
However, after running the generate script, no migration was generated. How can I make C1 allow NULL
values?
Environment
Related SEO tags so others can find the problem and the solution quicker: NOT NULL constraint failed1 Reply
i have lots of foreign key constraints, and they have
ON DELETE CASCADE
. At this point, I regret using an SQLite db
when i try to disable foreign key constaint with PRAGMA foreign_keys = OFF;
, then drizzle-kit throws an error:
FOREIGN KEY constraint failed
PARTIALLY SOLVED
I created a new custom migration script. Steps: