blob: 27e969998b11ef271aec7a3a54f49a550b05d265 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
CREATE TABLE IF NOT EXISTS "categories" (
"id" TEXT PRIMARY KEY, /* UUID */
"name" TEXT NOT NULL,
"color" TEXT NOT NULL, /* HEXA */
"created" TEXT NOT NULL, /* DATETIME */
"updated" TEXT NOT NULL /* DATETIME */
);
INSERT INTO
"categories" ("id", "name", "color", "created", "updated")
VALUES ("b2253284-1572-43d5-96ec-bf6ad448f46a", "Perso", "#a8c2e0", datetime(), datetime());
ALTER TABLE "events" ADD COLUMN "category" TEXT REFERENCES "categories" ("id"); /* UUID */
|