2021-12-27 13:54:48 +03:00
|
|
|
-- 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,
|
2022-03-16 09:14:47 +03:00
|
|
|
[description] TEXT,
|
2021-12-27 13:54:48 +03:00
|
|
|
[icon] VARCHAR(255) NOT NULL,
|
|
|
|
[theme] VARCHAR(30) NOT NULL,
|
|
|
|
[published] BOOLEAN NOT NULL DEFAULT 1,
|
|
|
|
[search_engine_index] BOOLEAN NOT NULL DEFAULT 1,
|
2022-03-08 09:33:35 +03:00
|
|
|
[show_tags] BOOLEAN NOT NULL DEFAULT 0,
|
2022-03-10 16:34:30 +03:00
|
|
|
[password] VARCHAR,
|
2022-03-16 09:14:47 +03:00
|
|
|
[created_date] DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
[modified_date] DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
|
2021-12-27 13:54:48 +03:00
|
|
|
);
|
|
|
|
|
|
|
|
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
|
|
|
|
);
|
|
|
|
|
2022-03-16 10:38:10 +03:00
|
|
|
ALTER TABLE incident ADD status_page_id INTEGER;
|
|
|
|
ALTER TABLE [group] ADD status_page_id INTEGER;
|
|
|
|
|
2021-12-27 13:54:48 +03:00
|
|
|
COMMIT;
|