blob: 0b373d0f65a5278b305773fe47ef7df8c0200b96 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
CREATE TABLE IF NOT EXISTS "categories" (
"id" TEXT PRIMARY KEY, /* UUID */
"name" TEXT NOT NULL UNIQUE,
"color" TEXT NOT NULL, /* COLOR */
"created" TEXT NOT NULL, /* DATETIME */
"updated" TEXT NOT NULL /* DATETIME */
);
ALTER TABLE "events" ADD COLUMN "category" TEXT REFERENCES "categories" ("id"); /* UUID */
PRAGMA foreign_keys = ON
|