CREATE TABLE days (
  date TEXT NOT NULL PRIMARY KEY,
  comment TEXT NOT NULL
);
CREATE TABLE templates (
  id INTEGER PRIMARY KEY,
  forked_from INTEGER,
  forked_at TEXT,
  FOREIGN KEY (forked_from) REFERENCES templates(id)
);
CREATE TABLE versioned_default_efforts (
  template INTEGER NOT NULL,
  datetime TEXT NOT NULL,
  default_effort REAL NOT NULL,
  PRIMARY KEY (template, datetime),
  FOREIGN KEY (template) REFERENCES templates(id)
);
CREATE TABLE versioned_descriptions (
  template INTEGER NOT NULL,
  datetime TEXT NOT NULL,
  description TEXT NOT NULL,
  PRIMARY KEY (template, datetime),
  FOREIGN KEY (template) REFERENCES templates(id)

);
CREATE TABLE versioned_titles (
  template INTEGER NOT NULL,
  datetime TEXT NOT NULL,
  title TEXT NOT NULL,
  PRIMARY KEY (template, datetime),
  FOREIGN KEY (template) REFERENCES templates(id)
);
