PRAGMA foreign_keys = ON;

CREATE TABLE IF NOT EXISTS global_actions (
       name TEXT NOT NULL PRIMARY KEY,
       last_finished INTEGER DEFAULT 0 NOT NULL
);

CREATE TABLE IF NOT EXISTS local_actions (
       jail_name TEXT NOT NULL,
       tree TEXT NOT NULL,
       set_name TEXT NOT NULL,
       last_finished INTEGER DEFAULT 0 NOT NULL,
       PRIMARY KEY (jail_name, tree, set_name)
);
