You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.0 KiB
32 lines
1.0 KiB
3 years ago
|
-- You should not modify if this have pushed to Github, unless it does serious wrong with the db.
|
||
|
BEGIN TRANSACTION;
|
||
|
|
||
|
CREATE TABLE [status_page](
|
||
|
[id] INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||
|
[slug] VARCHAR(255) NOT NULL UNIQUE,
|
||
|
[title] VARCHAR(255) NOT NULL,
|
||
3 years ago
|
[description] TEXT,
|
||
3 years ago
|
[icon] VARCHAR(255) NOT NULL,
|
||
|
[theme] VARCHAR(30) NOT NULL,
|
||
|
[published] BOOLEAN NOT NULL DEFAULT 1,
|
||
|
[search_engine_index] BOOLEAN NOT NULL DEFAULT 1,
|
||
3 years ago
|
[show_tags] BOOLEAN NOT NULL DEFAULT 0,
|
||
3 years ago
|
[password] VARCHAR,
|
||
3 years ago
|
[created_date] DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||
|
[modified_date] DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||
3 years ago
|
);
|
||
|
|
||
|
CREATE UNIQUE INDEX [slug] ON [status_page]([slug]);
|
||
|
|
||
|
|
||
|
CREATE TABLE [status_page_cname](
|
||
|
[id] INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||
|
[status_page_id] INTEGER NOT NULL REFERENCES [status_page]([id]) ON DELETE CASCADE ON UPDATE CASCADE,
|
||
|
[domain] VARCHAR NOT NULL UNIQUE
|
||
|
);
|
||
|
|
||
3 years ago
|
ALTER TABLE incident ADD status_page_id INTEGER;
|
||
|
ALTER TABLE [group] ADD status_page_id INTEGER;
|
||
|
|
||
3 years ago
|
COMMIT;
|