-- +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);
