CREATE TABLE tracked_flakes (
	uri TEXT PRIMARY KEY NOT NULL
);

CREATE TABLE flake_revisions (
	revision_uri TEXT PRIMARY KEY NOT NULL,
	uri TEXT,
	nix_store_path TEXT,
	revision TEXT,
	nar_hash TEXT,
	last_modified INT
);

CREATE TABLE flake_revisions_inputs (
	flake_revision_uri TEXT NOT NULL,
	input_name TEXT NOT NULL,
	revision_uri TEXT,
	uri TEXT,
	nar_hash TEXT,
	last_modified INT,
	PRIMARY KEY (flake_revision_uri, input_name)
);
