Open uocnb opened 4 years ago
Hm, good point. Unfortunately it's not easy for moor to pull off. We'd have to create a temporary table with a nullable uuid
column, update each row with the client default function and finally copy that back to the main table.
Another way is modify table with nullable column, update each row with client default than alter the column to remove nullable.
alter the column to remove nullable
Sadly it's not that easy in sqlite: https://stackoverflow.com/a/4007086/3260197
Ah yeah, that's true. So I think it can be implement with part of backup / restore or could be better if we have generated DAO as helper methods to make it easier.
Hello, I'm got this error when trying to add new not null column with
clientDefault()
example column
add via migration:
error detail:
Would be nice to have it handle by moor instead of write
issueCustomQuery()
for each table.