From f1741a7faa9538e9b12ac60e0fbf6c7721a36059 Mon Sep 17 00:00:00 2001
From: Leonardo Bishop <me@leonardobishop.net>
Date: Tue, 9 Sep 2025 22:44:09 +0100
Subject: Initial commit

---
 pkg/database/migrations/0001_initial.sql | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 pkg/database/migrations/0001_initial.sql

(limited to 'pkg/database/migrations/0001_initial.sql')

diff --git a/pkg/database/migrations/0001_initial.sql b/pkg/database/migrations/0001_initial.sql
new file mode 100644
index 0000000..5e69229
--- /dev/null
+++ b/pkg/database/migrations/0001_initial.sql
@@ -0,0 +1,19 @@
+-- +goose Up
+
+CREATE TABLE entries (
+  id          integer PRIMARY KEY,
+  title       text    NOT NULL,
+  kind        integer NOT NULL,
+  url         text    NOT NULL,
+  description text    NOT NULL,
+  timestamp   text    NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  FOREIGN KEY(kind) REFERENCES kinds(id)
+) STRICT;
+
+CREATE TABLE kinds (
+  id    integer PRIMARY KEY,
+  name  text    NOT NULL,
+  emoji text    NOT NULL
+) STRICT;
+
+CREATE INDEX idx_kinds_name ON kinds(name);
-- 
cgit v1.2.3-70-g09d2

