From 8fb899877bcd41a2df2f5b0812c7cdeac63645ef Mon Sep 17 00:00:00 2001 From: lab Date: Fri, 12 Nov 2021 09:53:52 +0800 Subject: [PATCH] feat: add db.sql --- db.sql | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 db.sql diff --git a/db.sql b/db.sql new file mode 100644 index 0000000..441ec21 --- /dev/null +++ b/db.sql @@ -0,0 +1,19 @@ +create schema "identity" + create table if not exists "user" ( + id text primary key, + openid text unique not null, + created_at timestamp with time zone default current_timestamp, + updated_at timestamp with time zone default current_timestamp + ) + create table if not exists "user_token" ( + user_id text primary key, + access_token text, + expires_in smallint, + refresh_token text, + scope text + ) + create table if not exists "user_userinfo" ( + user_id text primary key, + nickname text, + head_img_url text + ) \ No newline at end of file