diff options
Diffstat (limited to '')
-rw-r--r-- | schema/mysql.schema.sql (renamed from schema/mysql.sql) | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/schema/mysql.sql b/schema/mysql.schema.sql index 5f70481..bd231bc 100644 --- a/schema/mysql.sql +++ b/schema/mysql.schema.sql @@ -74,8 +74,6 @@ CREATE TABLE schedule ( id int(10) unsigned NOT NULL AUTO_INCREMENT, report_id int(10) unsigned NOT NULL, author varchar(255) NOT NULL COLLATE utf8mb4_unicode_ci, - start bigint(20) unsigned NOT NULL, - frequency enum('minutely', 'hourly', 'daily', 'weekly', 'monthly'), action varchar(255) NOT NULL, config text NULL DEFAULT NULL, ctime bigint(20) unsigned NOT NULL, @@ -84,6 +82,20 @@ CREATE TABLE schedule ( CONSTRAINT schedule_report FOREIGN KEY (report_id) REFERENCES report (id) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; +CREATE TABLE reporting_schema ( + id int unsigned NOT NULL AUTO_INCREMENT, + version varchar(64) NOT NULL, + timestamp bigint unsigned NOT NULL, + success enum ('n', 'y') DEFAULT NULL, + reason text DEFAULT NULL, + + PRIMARY KEY (id), + CONSTRAINT idx_reporting_schema_version UNIQUE (version) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC; + +INSERT INTO reporting_schema (version, timestamp, success) + VALUES ('1.0.0', UNIX_TIMESTAMP() * 1000, 'y'); + -- CREATE TABLE share ( -- id int(10) unsigned NOT NULL AUTO_INCREMENT, -- report_id int(10) unsigned NOT NULL, |