Import Ruty

This commit is contained in:
2024-03-11 00:57:00 +01:00
parent 50481b23df
commit 34a31bb184
617 changed files with 106612 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
-- empty
+2
View File
@@ -0,0 +1,2 @@
ALTER TABLE "users" ADD "failed_login" timestamp with time zone DEFAULT NULL;
ALTER TABLE "users" ADD "failed_login_counter" integer DEFAULT NULL;
+1
View File
@@ -0,0 +1 @@
ALTER TABLE "session" DROP COLUMN "created";
+1
View File
@@ -0,0 +1 @@
ALTER TABLE "session" MODIFY "ip" varchar(41) NOT NULL;
+23
View File
@@ -0,0 +1,23 @@
DROP TABLE "cache";
DROP TABLE "cache_shared";
CREATE TABLE "cache" (
"user_id" integer NOT NULL
REFERENCES "users" ("user_id") ON DELETE CASCADE,
"cache_key" varchar(128) NOT NULL,
"expires" timestamp with time zone DEFAULT NULL,
"data" long NOT NULL,
PRIMARY KEY ("user_id", "cache_key")
);
CREATE INDEX "cache_expires_idx" ON "cache" ("expires");
CREATE TABLE "cache_shared" (
"cache_key" varchar(255) NOT NULL,
"expires" timestamp with time zone DEFAULT NULL,
"data" long NOT NULL,
PRIMARY KEY ("cache_key")
);
CREATE INDEX "cache_shared_expires_idx" ON "cache_shared" ("expires");
+19
View File
@@ -0,0 +1,19 @@
CREATE TABLE "filestore" (
"file_id" integer PRIMARY KEY,
"user_id" integer NOT NULL
REFERENCES "users" ("user_id") ON DELETE CASCADE ON UPDATE CASCADE,
"filename" varchar(128) NOT NULL,
"mtime" integer NOT NULL,
"data" long,
CONSTRAINT "filestore_user_id_key" UNIQUE ("user_id", "filename")
);
CREATE SEQUENCE "filestore_seq"
START WITH 1 INCREMENT BY 1 NOMAXVALUE;
CREATE TRIGGER "filestore_seq_trig"
BEFORE INSERT ON "filestore" FOR EACH ROW
BEGIN
:NEW."user_id" := "filestore_seq".nextval;
END;
/
+4
View File
@@ -0,0 +1,4 @@
ALTER TABLE "filestore" ADD COLUMN "context" varchar(32) NOT NULL;
UPDATE "filestore" SET "context" = 'enigma';
ALTER TABLE "filestore" DROP CONSTRAINT "filestore_user_id_key";
ALTER TABLE "filestore" ADD CONSTRAINT "filestore_user_id_key" UNIQUE ("user_id", "context", "filename");
+1
View File
@@ -0,0 +1 @@
-- empty
+2
View File
@@ -0,0 +1,2 @@
ALTER TABLE "users" MODIFY "language" varchar(16) NOT NULL;
ALTER TABLE "dictionary" MODIFY "language" varchar(16);
+1
View File
@@ -0,0 +1 @@
-- empty
+21
View File
@@ -0,0 +1,21 @@
CREATE TABLE "collected_addresses" (
"address_id" integer PRIMARY KEY,
"user_id" integer NOT NULL
REFERENCES "users" ("user_id") ON DELETE CASCADE,
"changed" timestamp with time zone DEFAULT current_timestamp NOT NULL,
"name" varchar(255) DEFAULT NULL,
"email" varchar(255) DEFAULT NULL,
"type" integer NOT NULL
);
CREATE UNIQUE INDEX "collected_addresses_user_id_idx" ON "collected_addresses" ("user_id", "type", "email");
CREATE SEQUENCE "collected_addresses_seq"
START WITH 1 INCREMENT BY 1 NOMAXVALUE;
CREATE TRIGGER "collected_addresses_seq_trig"
BEFORE INSERT ON "collected_addresses" FOR EACH ROW
BEGIN
:NEW."address_id" := "collected_addresses_seq".nextval;
END;
/
+1
View File
@@ -0,0 +1 @@
--empty
+22
View File
@@ -0,0 +1,22 @@
CREATE TABLE "responses" (
"response_id" integer PRIMARY KEY,
"user_id" integer NOT NULL
REFERENCES "users" ("user_id") ON DELETE CASCADE,
"changed" timestamp with time zone DEFAULT current_timestamp NOT NULL,
"del" smallint DEFAULT 0 NOT NULL,
"name" varchar(128) NOT NULL,
"data" long NOT NULL,
"is_html" smallint DEFAULT 0 NOT NULL
);
CREATE INDEX "responses_user_id_idx" ON "responses" ("user_id", "del");
CREATE SEQUENCE "responses_seq"
START WITH 1 INCREMENT BY 1 NOMAXVALUE;
CREATE TRIGGER "responses_seq_trig"
BEFORE INSERT ON "responses" FOR EACH ROW
BEGIN
:NEW."response_id" := "response_seq".nextval;
END;
/
+1
View File
@@ -0,0 +1 @@
-- SQLite only
+1
View File
@@ -0,0 +1 @@
-- SQLite/Postgres only