mirror of
https://github.com/aykhans/slash-e.git
synced 2025-07-04 20:28:00 +00:00
feat: abstract database drivers
This commit is contained in:
14
store/db/sqlite/migration/prod/0.5/01__collection.sql
Normal file
14
store/db/sqlite/migration/prod/0.5/01__collection.sql
Normal file
@ -0,0 +1,14 @@
|
||||
-- collection
|
||||
CREATE TABLE collection (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
creator_id INTEGER NOT NULL,
|
||||
created_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')),
|
||||
updated_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')),
|
||||
name TEXT NOT NULL UNIQUE,
|
||||
title TEXT NOT NULL DEFAULT '',
|
||||
description TEXT NOT NULL DEFAULT '',
|
||||
shortcut_ids INTEGER[] NOT NULL,
|
||||
visibility TEXT NOT NULL CHECK (visibility IN ('PRIVATE', 'WORKSPACE', 'PUBLIC')) DEFAULT 'PRIVATE'
|
||||
);
|
||||
|
||||
CREATE INDEX idx_collection_name ON collection(name);
|
Reference in New Issue
Block a user