init push

This commit is contained in:
2026-05-21 19:52:45 +08:00
commit e3f75311ab
1280 changed files with 179173 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
-- create table auths
CREATE TABLE IF NOT EXISTS auths (
id SERIAL PRIMARY KEY,
user_info JSONB NULL,
union_id text NOT NULL,
ip text NOT NULL,
kb_id text NOT NULL,
source_type text NOT NULL,
last_login_time timestamptz NOT NULL,
created_at timestamptz NOT NULL DEFAULT NOW(),
updated_at timestamptz NOT NULL DEFAULT NOW()
);
-- create table auth_configs
CREATE TABLE IF NOT EXISTS auth_configs (
id SERIAL PRIMARY KEY,
kb_id text NOT NULL,
auth_setting JSONB NULL,
source_type text NOT NULL UNIQUE,
created_at timestamptz NOT NULL DEFAULT NOW(),
updated_at timestamptz NOT NULL DEFAULT NOW()
);