-- automatically generated by electric-boogaloo
--   https://github.com/aisamanra/electric-boogaloo/
CREATE TABLE IF NOT EXISTS tags
  ( id INTEGER PRIMARY KEY ASC
  , name TEXT NOT NULL
  );
CREATE TABLE IF NOT EXISTS jobs
  ( id INTEGER PRIMARY KEY ASC
  , name TEXT NOT NULL
  , owner TEXT NOT NULL
  , team TEXT NOT NULL
  , state TEXT NOT NULL
  , for_the_record BOOL NOT NULL
  , jira TEXT
  , tag INTEGER
  , FOREIGN KEY(tag) REFERENCES tags(id)
  );
CREATE TABLE IF NOT EXISTS timings
  ( id INTEGER PRIMARY KEY ASC
  , job INTEGER NOT NULL
  , start DATE NOT NULL
  , end DATE
  , duration INT NOT NULL
  , FOREIGN KEY(job) REFERENCES jobs(id)
  );
