数据库初始化SQL文件

This commit is contained in:
BBIT-Kai
2025-05-12 13:57:45 +08:00
parent 965141def2
commit 488ae0053a
7 changed files with 456 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
/*
Navicat Premium Dump SQL
Source Server : ai
Source Server Type : PostgreSQL
Source Server Version : 150012 (150012)
Source Host : localhost:5432
Source Catalog : ktor
Source Schema : public
Target Server Type : PostgreSQL
Target Server Version : 150012 (150012)
File Encoding : 65001
Date: 07/05/2025 15:11:15
*/
-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS "public"."users";
CREATE TABLE "public"."users" (
"id" int4 NOT NULL DEFAULT nextval('users_id_seq'::regclass),
"username" varchar(50) COLLATE "pg_catalog"."default",
"email" varchar(32) COLLATE "pg_catalog"."default",
"phone" varchar(32) COLLATE "pg_catalog"."default",
"password_hash" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
"is_active" bool NOT NULL DEFAULT true,
"created_at" timestamp(6),
"updated_at" timestamp(6)
)
;
-- ----------------------------
-- Records of users
-- ----------------------------
INSERT INTO "public"."users" VALUES (1, '最高管理员', 'bbit', NULL, 'c021ae1eb58aeacdb876fa0f4c5cfd7fc9903bfc876b1350c2ecc4df46932dfd', 't', '2024-12-09 21:53:25.339559', '2024-12-09 21:53:25.341189');
INSERT INTO "public"."users" VALUES (2, '测试用户', '1', NULL, '6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b', 't', NULL, NULL);
-- ----------------------------
-- Primary Key structure for table users
-- ----------------------------
ALTER TABLE "public"."users" ADD CONSTRAINT "users_pkey" PRIMARY KEY ("id");