Files
rustical/crates/store/migrations/20231006125208_init.sql

18 lines
325 B
SQL

CREATE TABLE calendars (
id TEXT PRIMARY KEY NOT NULL,
name TEXT NOT NULL,
owner TEXT NOT NULL,
description TEXT,
color TEXT,
timezone TEXT NOT NULL
);
CREATE TABLE events (
uid TEXT NOT NULL,
cid TEXT NOT NULL,
ics TEXT NOT NULL,
PRIMARY KEY (cid, uid),
FOREIGN KEY (cid) REFERENCES calendars(id)
);