Migrate the database table

This commit is contained in:
davidoskky 2022-12-28 14:25:34 +01:00
parent 5227751dca
commit 3a654f6ede
2 changed files with 7 additions and 1 deletions

View File

@ -1 +1 @@
ALTER TABLE ITEM ADD COLUMN `author` TEXT;
ALTER TABLE ITEM ADD COLUMN `author` TEXT NOT NULL;

View File

@ -0,0 +1,6 @@
CREATE TABLE ITEM_BACKUP AS SELECT `id`, `datetime`, `title`, `content`,
`unread`, `starred`, `thumbnail`, `icon`, `link`, `sourcetitle`,
`tags` FROM ITEM;
ALTER TABLE ITEM_BACKUP ADD COLUMN `author` TEXT;
DROP TABLE ITEM;
ALTER TABLE ITEM_BACKUP RENAME TO ITEM;