focalboard/server/services/store/sqlstore/migrations/000001_init.up.sql

16 lines
588 B
MySQL
Raw Normal View History

2021-04-17 09:06:57 +02:00
CREATE TABLE IF NOT EXISTS {{.prefix}}blocks (
2020-10-16 22:27:16 +02:00
id VARCHAR(36),
{{if .postgres}}insert_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),{{end}}
{{if .sqlite}}insert_at DATETIME NOT NULL DEFAULT(STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')),{{end}}
{{if .mysql}}insert_at DATETIME(6) NOT NULL DEFAULT NOW(6),{{end}}
2020-10-16 22:27:16 +02:00
parent_id VARCHAR(36),
{{if .mysql}}`schema`{{else}}schema{{end}} BIGINT,
2020-10-16 22:27:16 +02:00
type TEXT,
title TEXT,
fields {{if .postgres}}JSON{{else}}TEXT{{end}},
2020-10-16 22:27:16 +02:00
create_at BIGINT,
update_at BIGINT,
delete_at BIGINT,
PRIMARY KEY (id, insert_at)
) {{if .mysql}}DEFAULT CHARACTER SET utf8mb4{{end}};