From ae81649732753c33384d00bcbfdccd0f0d18678e Mon Sep 17 00:00:00 2001 From: zhuyijun Date: Wed, 21 Sep 2022 20:18:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Epostgresql=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/postgres/zyjblogs_rbac.sql | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/db/postgres/zyjblogs_rbac.sql b/db/postgres/zyjblogs_rbac.sql index 60270c3..91c4868 100644 --- a/db/postgres/zyjblogs_rbac.sql +++ b/db/postgres/zyjblogs_rbac.sql @@ -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(),'');