You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
migrateScheduleDates() adds each epoch column as nullable, fills it,
then renames it over the legacy column. created_at therefore ended up
nullable, while both a new 0.8 table and the 0.7 one declare it NOT
NULL.
On PostgreSQL and MySQL, the migration now sets the epoch column NOT
NULL once it is filled, before the legacy columns are dropped. MySQL
commits each schema change, so a failure there leaves a table the next
run resumes instead of one that already looks migrated. SQLite cannot
add NOT NULL to an existing column, so its epoch column is created NOT
NULL with a default of 0, which every row then overwrites. Removing that
default would need a table rebuild, which Kysely does not provide, so
both schema services keep the same result.
A row without created_at, possible only in a table changed by hand, now
fails the migration with an error that names the schedule, before the
first schema change. It used to fail with a raw database error and, on
MySQL, left the epoch columns behind.
0 commit comments