AppFlowy/rust-lib/flowy-database/migrations/2021-07-09-063045_flowy-user/up.sql

54 lines
1.6 KiB
MySQL
Raw Normal View History

-- Your SQL goes here
CREATE TABLE user_table (
2021-07-23 00:14:45 +00:00
id TEXT NOT NULL PRIMARY KEY,
name TEXT NOT NULL DEFAULT '',
2021-08-31 09:25:08 +00:00
token TEXT NOT NULL DEFAULT '',
2021-07-23 00:14:45 +00:00
email TEXT NOT NULL DEFAULT ''
);
2021-07-19 14:44:37 +00:00
CREATE TABLE workspace_table (
2021-07-23 00:14:45 +00:00
id TEXT NOT NULL PRIMARY KEY,
name TEXT NOT NULL DEFAULT '',
desc TEXT NOT NULL DEFAULT '',
modified_time BIGINT NOT NULL DEFAULT 0,
create_time BIGINT NOT NULL DEFAULT 0,
user_id TEXT NOT NULL DEFAULT '',
version BIGINT NOT NULL DEFAULT 0
2021-07-19 14:44:37 +00:00
);
CREATE TABLE app_table (
2021-07-23 00:14:45 +00:00
id TEXT NOT NULL PRIMARY KEY,
workspace_id TEXT NOT NULL DEFAULT '',
name TEXT NOT NULL DEFAULT '',
desc TEXT NOT NULL DEFAULT '',
color_style BLOB NOT NULL DEFAULT (x''),
last_view_id TEXT DEFAULT '',
modified_time BIGINT NOT NULL DEFAULT 0,
create_time BIGINT NOT NULL DEFAULT 0,
version BIGINT NOT NULL DEFAULT 0,
is_trash Boolean NOT NULL DEFAULT false
2021-07-19 14:44:37 +00:00
);
CREATE TABLE view_table (
2021-07-23 00:14:45 +00:00
id TEXT NOT NULL PRIMARY KEY,
2021-07-28 05:41:39 +00:00
belong_to_id TEXT NOT NULL DEFAULT '',
2021-07-23 00:14:45 +00:00
name TEXT NOT NULL DEFAULT '',
desc TEXT NOT NULL DEFAULT '',
modified_time BIGINT NOT NULL DEFAULT 0,
create_time BIGINT NOT NULL DEFAULT 0,
thumbnail TEXT NOT NULL DEFAULT '',
view_type INTEGER NOT NULL DEFAULT 0,
version BIGINT NOT NULL DEFAULT 0,
is_trash Boolean NOT NULL DEFAULT false
2021-07-19 14:44:37 +00:00
);
2021-10-12 14:31:38 +00:00
CREATE TABLE trash_table (
id TEXT NOT NULL PRIMARY KEY,
name TEXT NOT NULL DEFAULT '',
desc TEXT NOT NULL DEFAULT '',
modified_time BIGINT NOT NULL DEFAULT 0,
2021-10-13 15:11:45 +00:00
create_time BIGINT NOT NULL DEFAULT 0,
source INTEGER NOT NULL DEFAULT 0
2021-10-12 14:31:38 +00:00
);