By the way, is it possible to preselect (predefine) new movies as "seen"?
CAUTION: tempering with the data structure itself is potentially hazardous… Test on a copy!Well, in theory it is very simple, all you have to do is
ALTER the structure of the table
movies so that the field
seen has a default value of 1:
ALTER TABLE movies
MODIFY seen BOOLEAN NOT NULL DEFAULT (1) ;
But I don't think sqlite3 (
sqliteman?) allows
ALTERing the tables, it copies all the data to a new temporary table with the new structure then deletes the old table and renames the new one. But when I tried this with
sqliteman, all info concerning the
FOREIGN KEYS were lost in the process, so bad idea I would say…
Maybe SQL Alchemy handles this better ?
Now, if your database happens to be in PostgreSQL / MySQL / MSQL instead of sqlite3, then you are lucky, because I think those formats will handle the
ALTER command properly. Not sure though, to be verified…