···11+# If you prefer the allow list template instead of the deny list, see community template:
22+# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
33+#
44+# Binaries for programs and plugins
55+*.exe
66+*.exe~
77+*.dll
88+*.so
99+*.dylib
1010+1111+# Test binary, built with `go test -c`
1212+*.test
1313+1414+# Code coverage profiles and other test artifacts
1515+*.out
1616+coverage.*
1717+*.coverprofile
1818+profile.cov
1919+2020+# Dependency directories (remove the comment below to include it)
2121+# vendor/
2222+2323+# Go workspace file
2424+go.work
2525+go.work.sum
2626+2727+# env file
2828+.env
2929+3030+# Editor/IDE
3131+# .idea/
3232+# .vscode/
+5
README.md
···11+# Noteleaf
22+33+A task & time management CLI built with Golang & Charm.sh libs.
44+55+## Development
···11+CREATE TABLE IF NOT EXISTS migrations (
22+ id INTEGER PRIMARY KEY,
33+ version TEXT UNIQUE NOT NULL,
44+ applied_at DATETIME DEFAULT CURRENT_TIMESTAMP
55+);
···11+-- Drop books table and indexes
22+DROP INDEX IF EXISTS idx_books_title;
33+DROP INDEX IF EXISTS idx_books_author;
44+DROP INDEX IF EXISTS idx_books_status;
55+DROP TABLE IF EXISTS books;
66+77+-- Drop TV shows table and indexes
88+DROP INDEX IF EXISTS idx_tv_shows_season_episode;
99+DROP INDEX IF EXISTS idx_tv_shows_title;
1010+DROP INDEX IF EXISTS idx_tv_shows_status;
1111+DROP TABLE IF EXISTS tv_shows;
1212+1313+-- Drop movies table and indexes
1414+DROP INDEX IF EXISTS idx_movies_title;
1515+DROP INDEX IF EXISTS idx_movies_status;
1616+DROP TABLE IF EXISTS movies;
1717+1818+-- Drop tasks table and indexes
1919+DROP INDEX IF EXISTS idx_tasks_uuid;
2020+DROP INDEX IF EXISTS idx_tasks_due;
2121+DROP INDEX IF EXISTS idx_tasks_project;
2222+DROP INDEX IF EXISTS idx_tasks_status;
2323+DROP TABLE IF EXISTS tasks;
···11+-- Tasks table
22+CREATE TABLE IF NOT EXISTS tasks (
33+ id INTEGER PRIMARY KEY AUTOINCREMENT,
44+ uuid TEXT UNIQUE NOT NULL,
55+ description TEXT NOT NULL,
66+ status TEXT DEFAULT 'pending',
77+ priority TEXT,
88+ project TEXT,
99+ tags TEXT, -- JSON array
1010+ due DATETIME,
1111+ entry DATETIME DEFAULT CURRENT_TIMESTAMP,
1212+ modified DATETIME DEFAULT CURRENT_TIMESTAMP,
1313+ end DATETIME,
1414+ start DATETIME,
1515+ annotations TEXT -- JSON array
1616+);
1717+1818+CREATE INDEX IF NOT EXISTS idx_tasks_status ON tasks(status);
1919+CREATE INDEX IF NOT EXISTS idx_tasks_project ON tasks(project);
2020+CREATE INDEX IF NOT EXISTS idx_tasks_due ON tasks(due);
2121+CREATE INDEX IF NOT EXISTS idx_tasks_uuid ON tasks(uuid);
2222+2323+-- Movies table
2424+CREATE TABLE IF NOT EXISTS movies (
2525+ id INTEGER PRIMARY KEY AUTOINCREMENT,
2626+ title TEXT NOT NULL,
2727+ year INTEGER,
2828+ status TEXT DEFAULT 'queued',
2929+ rating REAL,
3030+ notes TEXT,
3131+ added DATETIME DEFAULT CURRENT_TIMESTAMP,
3232+ watched DATETIME
3333+);
3434+3535+CREATE INDEX IF NOT EXISTS idx_movies_status ON movies(status);
3636+CREATE INDEX IF NOT EXISTS idx_movies_title ON movies(title);
3737+3838+-- TV Shows table
3939+CREATE TABLE IF NOT EXISTS tv_shows (
4040+ id INTEGER PRIMARY KEY AUTOINCREMENT,
4141+ title TEXT NOT NULL,
4242+ season INTEGER,
4343+ episode INTEGER,
4444+ status TEXT DEFAULT 'queued',
4545+ rating REAL,
4646+ notes TEXT,
4747+ added DATETIME DEFAULT CURRENT_TIMESTAMP,
4848+ last_watched DATETIME
4949+);
5050+5151+CREATE INDEX IF NOT EXISTS idx_tv_shows_status ON tv_shows(status);
5252+CREATE INDEX IF NOT EXISTS idx_tv_shows_title ON tv_shows(title);
5353+CREATE INDEX IF NOT EXISTS idx_tv_shows_season_episode ON tv_shows(title, season, episode);
5454+5555+-- Books table
5656+CREATE TABLE IF NOT EXISTS books (
5757+ id INTEGER PRIMARY KEY AUTOINCREMENT,
5858+ title TEXT NOT NULL,
5959+ author TEXT,
6060+ status TEXT DEFAULT 'queued',
6161+ progress INTEGER DEFAULT 0,
6262+ pages INTEGER,
6363+ rating REAL,
6464+ notes TEXT,
6565+ added DATETIME DEFAULT CURRENT_TIMESTAMP,
6666+ started DATETIME,
6767+ finished DATETIME
6868+);
6969+7070+CREATE INDEX IF NOT EXISTS idx_books_status ON books(status);
7171+CREATE INDEX IF NOT EXISTS idx_books_author ON books(author);
7272+CREATE INDEX IF NOT EXISTS idx_books_title ON books(title);