update database schema and update editor script
Sonarqube Scanner / Build and analyze (push) Failing after 26s
Sonarqube Scanner / Build and analyze (push) Failing after 26s
This commit is contained in:
+12
-1
@@ -19,10 +19,21 @@ CREATE TABLE IF NOT EXISTS routes (
|
||||
point_count INTEGER NOT NULL DEFAULT 0,
|
||||
created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
deleted_at TEXT,
|
||||
deleted_at TEXT DEFAULT NULL,
|
||||
activated_at TEXT DEFAULT NULL,
|
||||
trash_path TEXT
|
||||
) STRICT;
|
||||
|
||||
CREATE TRIGGER IF NOT EXISTS routes_updated_at
|
||||
AFTER UPDATE ON routes
|
||||
FOR EACH ROW
|
||||
WHEN NEW.updated_at = OLD.updated_at
|
||||
BEGIN
|
||||
UPDATE routes
|
||||
SET updated_at = CURRENT_TIMESTAMP
|
||||
WHERE id = NEW.id;
|
||||
END;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS route_points (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
route_id INTEGER NOT NULL REFERENCES routes(id),
|
||||
|
||||
Reference in New Issue
Block a user