2020-12-01 12:55:18 +00:00
|
|
|
/* Copy the accounts table into a temp table, EXCLUDE the `photoPath` and INCLUDE `identicon` column */
|
2020-11-24 13:42:36 +00:00
|
|
|
CREATE TEMPORARY TABLE accounts_backup(
|
|
|
|
keyUid VARCHAR PRIMARY KEY,
|
|
|
|
name TEXT NOT NULL,
|
|
|
|
loginTimestamp BIG INT,
|
2020-12-01 12:55:18 +00:00
|
|
|
identicon TEXT,
|
2020-11-24 13:42:36 +00:00
|
|
|
keycardPairing TEXT
|
|
|
|
) WITHOUT ROWID;
|
2020-12-01 12:55:18 +00:00
|
|
|
INSERT INTO accounts_backup SELECT keyUid, name, loginTimestamp, photoPath, keycardPairing FROM accounts;
|
2020-11-24 13:42:36 +00:00
|
|
|
|
2020-12-01 12:55:18 +00:00
|
|
|
/* Drop the old accounts table and recreate with all columns EXCLUDING `photoPath` and INCLUDING `identicon`*/
|
2020-11-24 13:42:36 +00:00
|
|
|
DROP TABLE accounts;
|
2020-12-01 12:55:18 +00:00
|
|
|
CREATE TABLE accounts(
|
|
|
|
keyUid VARCHAR PRIMARY KEY,
|
|
|
|
name TEXT NOT NULL,
|
|
|
|
loginTimestamp BIG INT,
|
|
|
|
identicon TEXT,
|
|
|
|
keycardPairing TEXT
|
|
|
|
) WITHOUT ROWID;
|
|
|
|
INSERT INTO accounts SELECT keyUid, name, loginTimestamp, identicon, keycardPairing FROM accounts_backup;
|
2020-11-24 13:42:36 +00:00
|
|
|
|
|
|
|
/* Tidy up, drop the temp table */
|
|
|
|
DROP TABLE accounts_backup;
|