aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2023-02-03 01:32:17 +0300
committerGravatar Vitaly Takmazov2023-02-03 03:39:43 +0300
commitd71ce6095b87958d2df4da27b1344ad0e5b77a44 (patch)
tree1f7cccba70151c86e94620ccc583a5801b273563 /src/main/resources
parent17aa96df5776812e2b2fb212b071a821685c9598 (diff)
top_ignore_tags -> tags.notop
Diffstat (limited to 'src/main/resources')
-rw-r--r--src/main/resources/data-h2.sql1
-rw-r--r--src/main/resources/data-mysql.sql2
-rw-r--r--src/main/resources/data-sqlite.sql21
-rw-r--r--src/main/resources/data-sqlserver.sql3
-rw-r--r--src/main/resources/db/migration/V1.42__drop_top_ignore.sql3
-rw-r--r--src/main/resources/schema-h2.sql11
-rw-r--r--src/main/resources/schema-mysql.sql38
-rw-r--r--src/main/resources/schema-sqlite.sql12
-rw-r--r--src/main/resources/schema-sqlserver.sql12
9 files changed, 13 insertions, 90 deletions
diff --git a/src/main/resources/data-h2.sql b/src/main/resources/data-h2.sql
index bb1203a4..818575e9 100644
--- a/src/main/resources/data-h2.sql
+++ b/src/main/resources/data-h2.sql
@@ -1,7 +1,6 @@
INSERT INTO users(id, nick, passw) VALUES(0, 'Anonymous', 'password');
INSERT INTO users(id, nick, passw) VALUES(2, 'juick', 'password');
INSERT INTO users(id, nick, passw) VALUES(5, 'archive', 'password');
-INSERT INTO tags(tag_id, name) VALUES(2, 'juick');
INSERT INTO reactions (like_id, description) VALUES (1, 'like');
INSERT INTO reactions (like_id, description) VALUES (2, 'love');
INSERT INTO reactions (like_id, description) VALUES (3, 'lol');
diff --git a/src/main/resources/data-mysql.sql b/src/main/resources/data-mysql.sql
index a5db173a..d7c3d0f1 100644
--- a/src/main/resources/data-mysql.sql
+++ b/src/main/resources/data-mysql.sql
@@ -1,8 +1,6 @@
INSERT INTO users(id, nick, passw) VALUES(0, 'Anonymous', 'password');
INSERT INTO users(id, nick, passw) VALUES(2, 'juick', 'password');
INSERT INTO users(id, nick, passw) VALUES(5, 'archive', 'password');
-INSERT INTO tags(tag_id, name) VALUES(2, 'juick');
-ALTER TABLE tags AUTO_INCREMENT = 10;
ALTER TABLE users AUTO_INCREMENT = 10;
INSERT INTO reactions (like_id, description) VALUES (1, 'like');
INSERT INTO reactions (like_id, description) VALUES (2, 'love');
diff --git a/src/main/resources/data-sqlite.sql b/src/main/resources/data-sqlite.sql
index d34cb832..ae7e61d7 100644
--- a/src/main/resources/data-sqlite.sql
+++ b/src/main/resources/data-sqlite.sql
@@ -1,11 +1,10 @@
-INSERT INTO users(id, nick, passw) VALUES(0, 'Anonymous', 'password');;
-INSERT INTO users(id, nick, passw) VALUES(2, 'juick', 'password');;
-INSERT INTO users(id, nick, passw) VALUES(5, 'archive', 'password');;
-INSERT INTO tags(tag_id, name) VALUES(2, 'juick');;
-INSERT INTO reactions (like_id, description) VALUES (1, 'like');;
-INSERT INTO reactions (like_id, description) VALUES (2, 'love');;
-INSERT INTO reactions (like_id, description) VALUES (3, 'lol');;
-INSERT INTO reactions (like_id, description) VALUES (4, 'hmm');;
-INSERT INTO reactions (like_id, description) VALUES (5, 'angry');;
-INSERT INTO reactions (like_id, description) VALUES (6, 'uhblya');;
-INSERT INTO reactions (like_id, description) VALUES (7, 'ugh') \ No newline at end of file
+INSERT INTO users(id, nick, passw) VALUES(0, 'Anonymous', 'password');
+INSERT INTO users(id, nick, passw) VALUES(2, 'juick', 'password');
+INSERT INTO users(id, nick, passw) VALUES(5, 'archive', 'password');
+INSERT INTO reactions (like_id, description) VALUES (1, 'like');
+INSERT INTO reactions (like_id, description) VALUES (2, 'love');
+INSERT INTO reactions (like_id, description) VALUES (3, 'lol');
+INSERT INTO reactions (like_id, description) VALUES (4, 'hmm');
+INSERT INTO reactions (like_id, description) VALUES (5, 'angry');
+INSERT INTO reactions (like_id, description) VALUES (6, 'uhblya');
+INSERT INTO reactions (like_id, description) VALUES (7, 'ugh')
diff --git a/src/main/resources/data-sqlserver.sql b/src/main/resources/data-sqlserver.sql
index f5844a52..d60c7505 100644
--- a/src/main/resources/data-sqlserver.sql
+++ b/src/main/resources/data-sqlserver.sql
@@ -3,9 +3,6 @@ INSERT INTO users(id, nick, passw) VALUES(0, 'Anonymous', 'password');
INSERT INTO users(id, nick, passw) VALUES(2, 'juick', 'password');
INSERT INTO users(id, nick, passw) VALUES(5, 'archive', 'password');
set identity_insert users OFF;
-set identity_insert tags ON;
-INSERT INTO tags(tag_id, name) VALUES(2, 'juick');
-set identity_insert tags OFF;
INSERT INTO reactions (like_id, description) VALUES (1, 'like');
INSERT INTO reactions (like_id, description) VALUES (2, 'love');
INSERT INTO reactions (like_id, description) VALUES (3, 'lol');
diff --git a/src/main/resources/db/migration/V1.42__drop_top_ignore.sql b/src/main/resources/db/migration/V1.42__drop_top_ignore.sql
new file mode 100644
index 00000000..5465e49b
--- /dev/null
+++ b/src/main/resources/db/migration/V1.42__drop_top_ignore.sql
@@ -0,0 +1,3 @@
+DROP TABLE top_ignore_tags;
+DROP TABLE top_ignore_messages;
+DROP TABLE top_ignore_users
diff --git a/src/main/resources/schema-h2.sql b/src/main/resources/schema-h2.sql
index c2ecd4b7..58ce9219 100644
--- a/src/main/resources/schema-h2.sql
+++ b/src/main/resources/schema-h2.sql
@@ -201,17 +201,6 @@ CREATE MEMORY TABLE "PUBLIC"."TELEGRAM"(
"TS" TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
"LOGINHASH" CHARACTER(36) DEFAULT NULL
);
-CREATE MEMORY TABLE "PUBLIC"."TOP_IGNORE_MESSAGES"(
- "MESSAGE_ID" INTEGER NOT NULL
-);
-CREATE MEMORY TABLE "PUBLIC"."TOP_IGNORE_TAGS"(
- "TAG_ID" INTEGER NOT NULL
-);
-ALTER TABLE "PUBLIC"."TOP_IGNORE_TAGS" ADD CONSTRAINT "PUBLIC"."CONSTRAINT_7" PRIMARY KEY("TAG_ID");
-CREATE MEMORY TABLE "PUBLIC"."TOP_IGNORE_USERS"(
- "USER_ID" INTEGER NOT NULL
-);
-ALTER TABLE "PUBLIC"."TOP_IGNORE_USERS" ADD CONSTRAINT "PUBLIC"."CONSTRAINT_B2" PRIMARY KEY("USER_ID");
CREATE MEMORY TABLE "PUBLIC"."FACEBOOK"(
"USER_ID" INTEGER DEFAULT NULL,
"FB_ID" BIGINT,
diff --git a/src/main/resources/schema-mysql.sql b/src/main/resources/schema-mysql.sql
index 58192261..00261574 100644
--- a/src/main/resources/schema-mysql.sql
+++ b/src/main/resources/schema-mysql.sql
@@ -536,44 +536,6 @@ CREATE TABLE `telegram` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Table structure for table `top_ignore_messages`
---
-
-DROP TABLE IF EXISTS `top_ignore_messages`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `top_ignore_messages` (
- `message_id` int(10) unsigned NOT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `top_ignore_tags`
---
-
-DROP TABLE IF EXISTS `top_ignore_tags`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `top_ignore_tags` (
- `tag_id` int(10) unsigned NOT NULL,
- PRIMARY KEY (`tag_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `top_ignore_users`
---
-
-DROP TABLE IF EXISTS `top_ignore_users`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `top_ignore_users` (
- `user_id` int(10) unsigned NOT NULL,
- PRIMARY KEY (`user_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
-- Table structure for table `twitter`
--
diff --git a/src/main/resources/schema-sqlite.sql b/src/main/resources/schema-sqlite.sql
index 9037aef0..bffd38d2 100644
--- a/src/main/resources/schema-sqlite.sql
+++ b/src/main/resources/schema-sqlite.sql
@@ -211,18 +211,6 @@ CREATE TABLE telegram (
loginhash character varying(36),
FOREIGN KEY (user_id) REFERENCES users(id)
);
-CREATE TABLE top_ignore_messages (
- message_id bigint NOT NULL,
- FOREIGN KEY (message_id) REFERENCES messages(message_id)
-);
-CREATE TABLE top_ignore_tags (
- tag_id NOT NULL,
- FOREIGN KEY (tag_id) REFERENCES tag(tag_id)
-);
-CREATE TABLE top_ignore_users (
- user_id INTEGER NOT NULL,
- FOREIGN KEY (user_id) REFERENCES users(id)
-);
CREATE TABLE twitter (
user_id INTEGER NOT NULL,
access_token character varying(64) NOT NULL,
diff --git a/src/main/resources/schema-sqlserver.sql b/src/main/resources/schema-sqlserver.sql
index aafc159d..c28c318e 100644
--- a/src/main/resources/schema-sqlserver.sql
+++ b/src/main/resources/schema-sqlserver.sql
@@ -227,18 +227,6 @@ CREATE TABLE telegram (
loginhash character varying(36),
FOREIGN KEY (user_id) REFERENCES users(id)
);
-CREATE TABLE top_ignore_messages (
- message_id integer NOT NULL,
- FOREIGN KEY (message_id) REFERENCES messages(message_id)
-);
-CREATE TABLE top_ignore_tags (
- tag_id integer NOT NULL,
- FOREIGN KEY (tag_id) REFERENCES tags(tag_id)
-);
-CREATE TABLE top_ignore_users (
- user_id bigint NOT NULL,
- FOREIGN KEY (user_id) REFERENCES users(id)
-);
CREATE TABLE twitter (
user_id bigint NOT NULL,
access_token character varying(64) NOT NULL,