CREATE TABLE flakes (
	flake_uri TEXT PRIMARY KEY NOT NULL,
	tracker_track BOOLEAN NOT NULL,
	tracker_last_scanned INT
);

CREATE TABLE revisions (
	revision_uri TEXT PRIMARY KEY NOT NULL,
	flake_uri TEXT,
	nix_store_path TEXT,
	nar_hash TEXT,
	last_modified INT
);

CREATE TABLE inputs (
	revision_uri TEXT NOT NULL,
	input_name TEXT NOT NULL,
	locked_revision_uri TEXT,
	locked_flake_uri TEXT,
	locked_nar_hash TEXT,
	last_modified INT,
	PRIMARY KEY (revision_uri, input_name)
);
