From 2c1bfab10903895ece9644bc095597aaef2a75e8 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 14 Aug 2018 13:23:53 +0300 Subject: Message editing API --- juick-server/src/main/resources/schema.sql | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'juick-server/src/main/resources/schema.sql') diff --git a/juick-server/src/main/resources/schema.sql b/juick-server/src/main/resources/schema.sql index 296fd486..851b764b 100644 --- a/juick-server/src/main/resources/schema.sql +++ b/juick-server/src/main/resources/schema.sql @@ -326,7 +326,7 @@ CREATE TABLE IF NOT EXISTS `messages` ( `message_id` int(10) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY, `user_id` int(10) unsigned NOT NULL, `lang` enum('en','ru','fr','fa','__') NOT NULL DEFAULT '__', - `ts` timestamp(9) NOT NULL DEFAULT CURRENT_TIMESTAMP, + `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `replies` smallint(5) unsigned NOT NULL DEFAULT '0', `maxreplyid` smallint(5) unsigned NOT NULL DEFAULT '0', `privacy` tinyint(4) NOT NULL DEFAULT '1', @@ -338,7 +338,7 @@ CREATE TABLE IF NOT EXISTS `messages` ( `popular` tinyint(4) NOT NULL DEFAULT '0', `hidden` tinyint(3) unsigned NOT NULL DEFAULT '0', `likes` smallint(6) NOT NULL DEFAULT '0', - `updated` timestamp(9) NOT NULL DEFAULT CURRENT_TIMESTAMP, + `updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, FOREIGN KEY (`user_id`) references users(id) ); CREATE TABLE IF NOT EXISTS `pm_inroster` ( @@ -376,4 +376,21 @@ CREATE TABLE IF NOT EXISTS `wl_users` ( `user_id` int(10) unsigned NOT NULL, `wl_user_id` int(10) unsigned NOT NULL, PRIMARY KEY (`user_id`,`wl_user_id`) -); \ No newline at end of file +); + +CREATE CACHED TABLE PUBLIC."flyway_schema_history" ( + "installed_rank" INT NOT NULL, + "version" VARCHAR(50), + "description" VARCHAR(200) NOT NULL, + "type" VARCHAR(20) NOT NULL, + "script" VARCHAR(1000) NOT NULL, + "checksum" INT, + "installed_by" VARCHAR(100) NOT NULL, + "installed_on" TIMESTAMP DEFAULT CURRENT_TIMESTAMP() NOT NULL, + "execution_time" INT NOT NULL, + "success" BOOLEAN NOT NULL +); +ALTER TABLE PUBLIC."flyway_schema_history" ADD CONSTRAINT PUBLIC."flyway_schema_history_pk" PRIMARY KEY("installed_rank"); +-- 1 +/- SELECT COUNT(*) FROM PUBLIC."flyway_schema_history"; +INSERT INTO PUBLIC."flyway_schema_history"("installed_rank", "version", "description", "type", "script", "checksum", "installed_by", "installed_on", "execution_time", "success") VALUES +(1, '1', '<< Flyway Baseline >>', 'BASELINE', '<< Flyway Baseline >>', NULL, 'SA', TIMESTAMP '2018-08-14 13:05:13.724', 0, TRUE); \ No newline at end of file -- cgit v1.2.3