新增postgresql适配

This commit is contained in:
zhuyijun 2022-09-21 20:18:34 +08:00
parent 42e55f0d06
commit ae81649732

View File

@ -10,7 +10,7 @@ CREATE TABLE oauth_client_details (
access_token_validity int DEFAULT NULL,
refresh_token_validity int DEFAULT NULL,
additional_information text ,
create_time timestamp WITH TIME ZONE NOT NULL DEFAULT NOW(),
create_time timestamp NOT NULL DEFAULT NOW(),
archived smallint DEFAULT 0,
trusted smallint DEFAULT 0,
autoapprove varchar(255) DEFAULT 'false',
@ -32,14 +32,14 @@ CREATE TABLE role (
deleted smallint DEFAULT 0,
description varchar(600) ,
create_user_id varchar(64) ,
create_time timestamp WITH TIME ZONE NOT NULL DEFAULT NOW(),
create_time timestamp NOT NULL DEFAULT NOW(),
edit_user_id varchar(64) ,
edit_time timestamp WITH TIME ZONE NOT NULL DEFAULT NOW(),
edit_time timestamp NOT NULL DEFAULT NOW(),
tenant_id varchar(100) NOT NULL DEFAULT '',
PRIMARY KEY (id)
);
CREATE TABLE "user" (
CREATE TABLE users (
id varchar(64) NOT NULL ,
username varchar(64) NOT NULL ,
name varchar(64) DEFAULT NULL ,
@ -55,11 +55,11 @@ CREATE TABLE "user" (
deleted smallint DEFAULT 0,
description varchar(600) DEFAULT NULL,
create_user_id varchar(64) ,
create_time timestamp WITH TIME ZONE NOT NULL DEFAULT NOW(),
create_time timestamp NOT NULL DEFAULT NOW(),
edit_user_id varchar(64) ,
edit_time timestamp WITH TIME ZONE NOT NULL DEFAULT NOW(),
edit_time timestamp NOT NULL DEFAULT NOW(),
tenant_id varchar(100) NOT NULL DEFAULT '',
PRIMARY KEY (id)
);
create index username_index on "user"(username);
INSERT INTO "user" (id, username, name, age, avatar, password, phone, email, invite_user_id, status, follow_num, fans_num, deleted, description, create_user_id, create_time, edit_user_id, edit_time, tenant_id) VALUES ('1','admin','admin',1,NULL,'$2a$10$4DlfvZrq7zgKzkbKyg.GHO6yHdGnozcaf3B5JSAC0fNB4k1GhMk6y',NULL,NULL,NULL,0,NULL,NULL,0,NULL,NULL,now(),NULL,now(),'');
create index username_index on users(username);
INSERT INTO users (id, username, name, age, avatar, password, phone, email, invite_user_id, status, follow_num, fans_num, deleted, description, create_user_id, create_time, edit_user_id, edit_time, tenant_id) VALUES ('1','admin','admin',1,NULL,'$2a$10$4DlfvZrq7zgKzkbKyg.GHO6yHdGnozcaf3B5JSAC0fNB4k1GhMk6y',NULL,NULL,NULL,0,NULL,NULL,0,NULL,NULL,now(),NULL,now(),'');