mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-15 18:14:15 -08:00
6e3a904aaa
WIP: add color column, show tags WIP: Improve TagsManager styling & workflow WIP: Improve styling & validation, use translation WIP: Complete TagsManager functionality WIP: Add tags display in monitorList & Details Fix: update tags list after edit Fix: slightly improve tags styling Fix: Improve mobile UI Fix: Fix tags not showing on create monitor Fix: bring existingTags inside tagsManager Fix: remove unused tags prop Fix: Fix formatting, bump db version
20 lines
774 B
SQL
20 lines
774 B
SQL
-- You should not modify if this have pushed to Github, unless it does serious wrong with the db.
|
|
CREATE TABLE tag (
|
|
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
|
name VARCHAR(255) NOT NULL,
|
|
color VARCHAR(255) NOT NULL,
|
|
created_date DATETIME DEFAULT (DATETIME('now')) NOT NULL
|
|
);
|
|
|
|
CREATE TABLE monitor_tag (
|
|
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
|
monitor_id INTEGER NOT NULL,
|
|
tag_id INTEGER NOT NULL,
|
|
value TEXT,
|
|
CONSTRAINT FK_tag FOREIGN KEY (tag_id) REFERENCES tag(id) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
CONSTRAINT FK_monitor FOREIGN KEY (monitor_id) REFERENCES monitor(id) ON DELETE CASCADE ON UPDATE CASCADE
|
|
);
|
|
|
|
CREATE INDEX monitor_tag_monitor_id_index ON monitor_tag (monitor_id);
|
|
CREATE INDEX monitor_tag_tag_id_index ON monitor_tag (tag_id);
|