-- Decentralized Media
--
-- Douglas Thrift
--
-- $Id$

CREATE TABLE folders (
	path	TEXT	PRIMARY KEY,
	folder	TEXT	REFERENCES folders (path),
	root	TEXT	NOT NULL REFERENCES folders (path)
);

CREATE TABLE files (
	path	TEXT	PRIMARY KEY,
	live	BOOLEAN	DEFAULT TRUE,
	artist	TEXT,
	title	TEXT,
	album	TEXT,
	genre	TEXT,
	folder	TEXT	NOT NULL REFERENCES folders (path),
	root	TEXT	NOT NULL REFERENCES folders (path)
);
