chore: update and move to the new server

This commit is contained in:
2026-03-05 20:12:02 +08:00
parent 0b8ee72285
commit 5a521ea48e
2 changed files with 41 additions and 40 deletions

View File

@@ -1,2 +1,2 @@
# blog-doc # blog-doc

View File

@@ -1,38 +1,39 @@
CREATE TABLE "articles" ( CREATE TABLE "articles" (
"id" bigserial, "id" bigserial,
"title" varchar(50) NOT NULL, "title" varchar(50) NOT NULL,
"content" text, "cover" varchar(255) DEFAULT '{{.Values.web.default.cover}}',
"published" time, "content" text,
PRIMARY KEY ("id") "published" date DEFAULT CURRENT_DATE,
); PRIMARY KEY ("id")
);
CREATE TABLE "comments" (
"id" bigserial, CREATE TABLE "news" (
"content" varchar(255) NOT NULL, "id" bigserial,
"published" time, "title" varchar(50) NOT NULL,
"u_id" int4, "cover" varchar(255) DEFAULT '{{.Values.web.default.cover}}',
"a_id" int4 NOT NULL, "content" text,
PRIMARY KEY ("id") "published" date DEFAULT CURRENT_DATE,
); "related" varchar(255),
PRIMARY KEY ("id")
CREATE TABLE "news" ( );
"id" bigserial,
"title" varchar(50) NOT NULL, CREATE TABLE "users" (
"content" text, "id" bigserial,
"published" time, "name" varchar(50) NOT NULL,
"related" uuid, "profile" varchar(255) NOT NULL DEFAULT '{{.Values.web.default.avatar}}',
PRIMARY KEY ("id") "account" varchar(255) NOT NULL UNIQUE,
); "password" varchar(255) NOT NULL,
"ip" varchar(50),
CREATE TABLE "users" ( PRIMARY KEY ("id")
"id" bigserial, );
"name" varchar(50) NOT NULL,
"profile" varchar(255) NOT NULL DEFAULT https://www.merlin.xin/public/profile, CREATE TABLE "comments" (
"account" varchar(255) NOT NULL, "id" bigserial,
"password" varchar(255) NOT NULL, "content" varchar(255) NOT NULL,
PRIMARY KEY ("id") "published" date DEFAULT CURRENT_DATE,
); "u_id" int8,
"a_id" int8 NOT NULL,
ALTER TABLE "articles" ADD CONSTRAINT "fk_articles_comments_1" FOREIGN KEY ("id") REFERENCES "comments" ("a_id"); PRIMARY KEY ("id"),
ALTER TABLE "users" ADD CONSTRAINT "fk_users_comments_1" FOREIGN KEY ("id") REFERENCES "comments" ("u_id"); CONSTRAINT fk_comments_articles FOREIGN KEY ("a_id") REFERENCES "articles" ("id"),
CONSTRAINT fk_comments_users FOREIGN KEY ("u_id") REFERENCES "users" ("id")
);