-
Notifications
You must be signed in to change notification settings - Fork 923
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
84 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
ALTER TABLE cryptokeys ADD COLUMN published BOOL DEFAULT 1; | ||
|
||
ALTER TABLE cryptokeys ADD published BOOL NULL DEFAULT 1 AFTER active; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE cryptokeys MODIFY published BOOL NULL DEFAULT 1 AFTER active; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
ALTER TABLE cryptokeys ADD COLUMN published BOOL DEFAULT true; | ||
BEGIN; | ||
ALTER TABLE cryptokeys ADD COLUMN published BOOL DEFAULT TRUE; | ||
|
||
ALTER TABLE cryptokeys ADD COLUMN content_new TEXT; | ||
UPDATE cryptokeys SET content_new = content; | ||
ALTER TABLE cryptokeys DROP COLUMN content; | ||
ALTER TABLE cryptokeys RENAME COLUMN content_new TO content; | ||
COMMIT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
BEGIN; | ||
ALTER TABLE cryptokeys ADD COLUMN content_new TEXT; | ||
UPDATE cryptokeys SET content_new = content; | ||
ALTER TABLE cryptokeys DROP COLUMN content; | ||
ALTER TABLE cryptokeys RENAME COLUMN content_new TO content; | ||
COMMIT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,17 @@ | ||
ALTER TABLE cryptokeys ADD published BOOL DEFAULT 1; | ||
BEGIN TRANSACTION; | ||
CREATE TABLE cryptokeys_temp ( | ||
id INTEGER PRIMARY KEY, | ||
domain_id INT NOT NULL, | ||
flags INT NOT NULL, | ||
active BOOL, | ||
published BOOL DEFAULT 1, | ||
content TEXT, | ||
FOREIGN KEY(domain_id) REFERENCES domains(id) ON DELETE CASCADE ON UPDATE CASCADE | ||
); | ||
|
||
INSERT INTO cryptokeys_temp SELECT id,domain_id,flags,active,1,content FROM cryptokeys; | ||
DROP TABLE cryptokeys; | ||
ALTER TABLE cryptokeys_temp RENAME TO cryptokeys; | ||
|
||
CREATE INDEX domainidindex ON cryptokeys(domain_id); | ||
COMMIT; |
17 changes: 17 additions & 0 deletions
17
modules/gsqlite3backend/4.3.0-beta2_to_4.3.0_schema.sqlite3.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
BEGIN TRANSACTION; | ||
CREATE TABLE cryptokeys_temp ( | ||
id INTEGER PRIMARY KEY, | ||
domain_id INT NOT NULL, | ||
flags INT NOT NULL, | ||
active BOOL, | ||
published BOOL DEFAULT 1, | ||
content TEXT, | ||
FOREIGN KEY(domain_id) REFERENCES domains(id) ON DELETE CASCADE ON UPDATE CASCADE | ||
); | ||
|
||
INSERT INTO cryptokeys_temp SELECT id,domain_id,flags,active,published,content FROM cryptokeys; | ||
DROP TABLE cryptokeys; | ||
ALTER TABLE cryptokeys_temp RENAME TO cryptokeys; | ||
|
||
CREATE INDEX domainidindex ON cryptokeys(domain_id); | ||
COMMIT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,16 @@ | ||
ALTER TABLE cryptokeys ADD published BOOL DEFAULT 1; | ||
BEGIN TRANSACTION; | ||
CREATE TABLE cryptokeys_temp ( | ||
id INTEGER PRIMARY KEY, | ||
domain VARCHAR(255) COLLATE NOCASE, | ||
flags INT NOT NULL, | ||
active BOOL, | ||
published BOOL DEFAULT 1, | ||
content TEXT | ||
); | ||
|
||
INSERT INTO cryptokeys_temp SELECT id,domain,flags,active,1,content FROM cryptokeys; | ||
DROP TABLE cryptokeys; | ||
ALTER TABLE cryptokeys_temp RENAME TO cryptokeys; | ||
|
||
CREATE INDEX domainnameindex ON cryptokeys(domain); | ||
COMMIT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
BEGIN TRANSACTION; | ||
CREATE TABLE cryptokeys_temp ( | ||
id INTEGER PRIMARY KEY, | ||
domain VARCHAR(255) COLLATE NOCASE, | ||
flags INT NOT NULL, | ||
active BOOL, | ||
published BOOL DEFAULT 1, | ||
content TEXT | ||
); | ||
|
||
INSERT INTO cryptokeys_temp SELECT id,domain,flags,active,published,content FROM cryptokeys; | ||
DROP TABLE cryptokeys; | ||
ALTER TABLE cryptokeys_temp RENAME TO cryptokeys; | ||
|
||
CREATE INDEX domainnameindex ON cryptokeys(domain); | ||
COMMIT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters