libsql not generating migration for generatedAlwaysAs

No migration were detected by the drizle when I changed from this
buildDate: integer("created", { mode: "timestamp" })
.notNull()
.default(sql`(unixepoch())`),
buildYear: integer(),
buildDate: integer("created", { mode: "timestamp" })
.notNull()
.default(sql`(unixepoch())`),
buildYear: integer(),
to this
buildDate: integer("created", { mode: "timestamp" })
.notNull()
.default(sql`(unixepoch())`),
buildYear: integer().generatedAlwaysAs(
(): SQL => sql`CAST(strftime('%Y', ${vehicles.buildDate}, 'unixepoch') AS INTEGER)`,
{ mode: "stored" }
),
buildDate: integer("created", { mode: "timestamp" })
.notNull()
.default(sql`(unixepoch())`),
buildYear: integer().generatedAlwaysAs(
(): SQL => sql`CAST(strftime('%Y', ${vehicles.buildDate}, 'unixepoch') AS INTEGER)`,
{ mode: "stored" }
),
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server