How do you add and manage foreign key relationships in d1?
How do you add and manage foreign key relationships in d1?
auto_increment in D1 doesn't work

auto_increment is not valid and is ignored.auto_increment is the wrong spelling. It should be AUTOINCREMENT, and is only valid on a INTEGER PRIMARY KEY column.INTEGER PRIMARY KEY will become an alias for the rowid column by default, it usually isn't needed.ALTER TABLE statement in SQLite.CREATE TABLE my_table2, copy all my_table. data to my_table2, and then renaming it to my_table)
auto_incrementauto_incrementauto_incrementAUTOINCREMENTINTEGER PRIMARY KEYINTEGER PRIMARY KEYrowidALTER TABLECREATE TABLE my_table2my_tablemy_tablemy_table2