Can't alter column from `.notNull()` to `allow null`

Background

I have an SQLite db, and a schema.
// schema.ts
export const T1 = sqliteTable(
  'T1',
  {
    // ...
    C1: text('C1').notNull(),
    // ...
  },
);

I edited my schema to:
// schema.ts
export const T1 = sqliteTable(
  'T1',
  {
    // ...
    C1: text('C1'),
    // ...
  },
);

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

    "drizzle-kit": "^0.23.0",
    "drizzle-orm": "^0.31.0",


Related SEO tags so others can find the problem and the solution quicker: NOT NULL constraint failed
Was this page helpful?