feat: init

This commit is contained in:
Rogee
2024-09-30 11:02:26 +08:00
parent 679759846b
commit 694dfd2a4f
90 changed files with 6046 additions and 15 deletions

49
init.sql Normal file
View File

@@ -0,0 +1,49 @@
CREATE TABLE "main"."expert" (
"id" INTEGER NOT NULL,
"uid" text NOT NULL DEFAULT '',
"sec_uid" text NOT NULL DEFAULT '',
"short_id" text NOT NULL DEFAULT '',
"real_name" text NOT NULL DEFAULT '',
"nick_name" text NOT NULL DEFAULT '',
"state" text NOT NULL DEFAULT 'enable',
"since" INTEGER NOT NULL DEFAULT 0,
"config" text NOT NULL DEFAULT '',
"config_at" INTEGER NOT NULL DEFAULT 0,
PRIMARY KEY ("id")
);
CREATE UNIQUE INDEX "main"."idx_expert_uid" ON "expert" (
"uid"
);
CREATE TABLE "main"."follower" (
"id" INTEGER NOT NULL,
"avatar" TEXT NOT NULL DEFAULT '',
"nickname" TEXT NOT NULL DEFAULT '',
"sec_uid" text NOT NULL DEFAULT '',
"short_id" text NOT NULL DEFAULT '',
"uid" text NOT NULL DEFAULT '',
"unique_id" text NOT NULL DEFAULT '',
"expert_uid" text NOT NULL DEFAULT '',
"followed" INTEGER NOT NULL DEFAULT 0,
"created_at" INTEGER NOT NULL DEFAULT 0,
PRIMARY KEY ("id")
);
CREATE UNIQUE INDEX "main"."idx_follower_uid" ON "follower" (
"uid"
);
CREATE TABLE "main"."device" (
"id" INTEGER NOT NULL,
"uuid" text NOT NULL DEFAULT '',
"name" text NOT NULL DEFAULT '',
"expert" text NOT NULL DEFAULT '',
"state" text NOT NULL DEFAULT 'enable',
"note" text NOT NULL DEFAULT '',
PRIMARY KEY ("id")
);
CREATE UNIQUE INDEX "main"."idx_device_uuid" ON "device" (
"uuid"
);