From 17aa96df5776812e2b2fb212b071a821685c9598 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 3 Feb 2023 00:31:50 +0300 Subject: Drop unused tables --- .../resources/db/migration/V1.40__drop_images.sql | 1 + .../db/migration/V1.41__drop_tags_synonyms.sql | 1 + src/main/resources/schema-h2.sql | 14 ---------- src/main/resources/schema-mysql.sql | 32 ---------------------- src/main/resources/schema-sqlite.sql | 14 ---------- src/main/resources/schema-sqlserver.sql | 14 ---------- 6 files changed, 2 insertions(+), 74 deletions(-) create mode 100644 src/main/resources/db/migration/V1.40__drop_images.sql create mode 100644 src/main/resources/db/migration/V1.41__drop_tags_synonyms.sql (limited to 'src') diff --git a/src/main/resources/db/migration/V1.40__drop_images.sql b/src/main/resources/db/migration/V1.40__drop_images.sql new file mode 100644 index 00000000..69c762c1 --- /dev/null +++ b/src/main/resources/db/migration/V1.40__drop_images.sql @@ -0,0 +1 @@ +DROP TABLE images diff --git a/src/main/resources/db/migration/V1.41__drop_tags_synonyms.sql b/src/main/resources/db/migration/V1.41__drop_tags_synonyms.sql new file mode 100644 index 00000000..181fa48a --- /dev/null +++ b/src/main/resources/db/migration/V1.41__drop_tags_synonyms.sql @@ -0,0 +1 @@ +DROP TABLE tags_synonyms diff --git a/src/main/resources/schema-h2.sql b/src/main/resources/schema-h2.sql index a02804d5..c2ecd4b7 100644 --- a/src/main/resources/schema-h2.sql +++ b/src/main/resources/schema-h2.sql @@ -34,16 +34,6 @@ CREATE MEMORY TABLE "PUBLIC"."AUTH"( "AUTHCODE" CHARACTER(8) NOT NULL, "TS" TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP NOT NULL ); -CREATE MEMORY TABLE "PUBLIC"."IMAGES"( - "MID" INTEGER NOT NULL, - "RID" INTEGER NOT NULL, - "THUMB" INTEGER NOT NULL, - "SMALL" INTEGER NOT NULL, - "MEDIUM" INTEGER NOT NULL, - "HEIGHT" INTEGER NOT NULL, - "WIDTH" INTEGER NOT NULL -); -ALTER TABLE "PUBLIC"."IMAGES" ADD CONSTRAINT "PUBLIC"."CONSTRAINT_8" PRIMARY KEY("MID", "RID"); CREATE MEMORY TABLE "PUBLIC"."MESSAGES_PROPERTIES"( "MESSAGE_ID" INTEGER NOT NULL, "REPLY_ID" SMALLINT NOT NULL, @@ -204,10 +194,6 @@ ALTER TABLE "PUBLIC"."TAGS" ADD CONSTRAINT "PUBLIC"."CONSTRAINT_27" PRIMARY KEY( CREATE MEMORY TABLE "PUBLIC"."TAGS_IGNORE"( "TAG_ID" INTEGER NOT NULL ); -CREATE MEMORY TABLE "PUBLIC"."TAGS_SYNONYMS"( - "NAME" CHARACTER(64) NOT NULL, - "CHANGETO" CHARACTER(64) NOT NULL -); CREATE MEMORY TABLE "PUBLIC"."TELEGRAM"( "USER_ID" INTEGER DEFAULT NULL, "TG_ID" BIGINT NOT NULL, diff --git a/src/main/resources/schema-mysql.sql b/src/main/resources/schema-mysql.sql index 0f6321fd..58192261 100644 --- a/src/main/resources/schema-mysql.sql +++ b/src/main/resources/schema-mysql.sql @@ -131,25 +131,6 @@ CREATE TABLE `followers` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Table structure for table `images` --- - -DROP TABLE IF EXISTS `images`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `images` ( - `mid` int(10) unsigned NOT NULL, - `rid` int(10) unsigned NOT NULL, - `thumb` int(10) unsigned NOT NULL, - `small` int(10) unsigned NOT NULL, - `medium` int(10) unsigned NOT NULL, - `height` int(10) unsigned NOT NULL, - `width` int(10) unsigned NOT NULL, - PRIMARY KEY (`mid`,`rid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Table structure for table `jids` -- @@ -538,19 +519,6 @@ CREATE TABLE `tags_ignore` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Table structure for table `tags_synonyms` --- - -DROP TABLE IF EXISTS `tags_synonyms`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `tags_synonyms` ( - `name` char(64) NOT NULL, - `changeto` char(64) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Table structure for table `telegram` -- diff --git a/src/main/resources/schema-sqlite.sql b/src/main/resources/schema-sqlite.sql index 39895b2e..9037aef0 100644 --- a/src/main/resources/schema-sqlite.sql +++ b/src/main/resources/schema-sqlite.sql @@ -61,16 +61,6 @@ CREATE TABLE followers ( PRIMARY KEY (user_id) FOREIGN KEY (user_id) REFERENCES users(id) ); -CREATE TABLE images ( - mid bigint NOT NULL, - rid bigint NOT NULL, - thumb bigint NOT NULL, - small bigint NOT NULL, - medium bigint NOT NULL, - height bigint NOT NULL, - width bigint NOT NULL, - PRIMARY KEY (mid, rid) -); CREATE TABLE jids ( user_id INTEGER, jid character varying(64) NOT NULL, @@ -213,10 +203,6 @@ CREATE TABLE tags_ignore ( tag_id bigint NOT NULL, FOREIGN KEY (tag_id) REFERENCES tags(tag_id) ); -CREATE TABLE tags_synonyms ( - name character varying(64) NOT NULL, - changeto character varying(64) NOT NULL -); CREATE TABLE telegram ( user_id INTEGER, tg_id numeric NOT NULL, diff --git a/src/main/resources/schema-sqlserver.sql b/src/main/resources/schema-sqlserver.sql index 71539577..aafc159d 100644 --- a/src/main/resources/schema-sqlserver.sql +++ b/src/main/resources/schema-sqlserver.sql @@ -87,16 +87,6 @@ CREATE TABLE followers ( PRIMARY KEY (user_id), FOREIGN KEY (user_id) REFERENCES users(id) ); -CREATE TABLE images ( - mid bigint NOT NULL, - rid bigint NOT NULL, - thumb bigint NOT NULL, - small bigint NOT NULL, - medium bigint NOT NULL, - height bigint NOT NULL, - width bigint NOT NULL, - PRIMARY KEY (mid, rid) -); CREATE TABLE jids ( user_id bigint, jid character varying(64) NOT NULL, @@ -229,10 +219,6 @@ CREATE TABLE tags_ignore ( tag_id integer NOT NULL, FOREIGN KEY (tag_id) REFERENCES tags(tag_id) ); -CREATE TABLE tags_synonyms ( - name character varying(64) NOT NULL, - changeto character varying(64) NOT NULL -); CREATE TABLE telegram ( user_id bigint, tg_id numeric NOT NULL, -- cgit v1.2.3