-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(migrations): use sqlite instead of sqlite3 to use migrations
- Loading branch information
Showing
5 changed files
with
60 additions
and
27 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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
-- Up | ||
CREATE TABLE comment ( | ||
id INTEGER PRIMARY KEY NOT NULL, | ||
user_id NOT NULL, | ||
slug CHAR(128) NOT NULL, | ||
created_at TEXT NOT NULL, | ||
comment CHAR(4000) NOT NULL, | ||
rejected BOOLEAN, | ||
approved BOOLEAN | ||
); | ||
|
||
CREATE TABLE user ( | ||
id INTEGER PRIMARY KEY NOT NULL, | ||
name CHAR(128), | ||
display_name CHAR(128), | ||
provider CHAR(128), | ||
provider_id CHAR(128), | ||
created_at TEXT NOT NULL, | ||
blocked BOOLEAN, | ||
trusted BOOLEAN | ||
); | ||
|
||
-- Down | ||
DROP TABLE comment; | ||
DROP TABLE user; |
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 @@ | ||
-- Up | ||
CREATE TABLE setting ( | ||
name CHAR(128) PRIMARY KEY NOT NULL, | ||
active BOOLEAN NOT NULL | ||
); | ||
|
||
INSERT INTO setting (name, active) VALUES ('notification', 1); | ||
|
||
CREATE TABLE subscription ( | ||
endpoint CHAR(600) PRIMARY KEY NOT NULL, | ||
publicKey CHAR(4096) NOT NULL, | ||
auth CHAR(600) NOT NULL | ||
); | ||
|
||
-- Down | ||
DROP TABLE setting; | ||
DROP TABLE subscription; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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