CREATE TABLE IF NOT EXISTS entry (
	id TEXT PRIMARY KEY,
	title TEXT,
	content TEXT,
	source TEXT
);

CREATE TABLE IF NOT EXISTS meta (
	id TEXT PRIMARY KEY,
	entry TEXT REFERENCES entry (id)
		ON DELETE CASCADE,
	name VARCHAR(255),
	value VARCHAR(255)
);

CREATE TABLE IF NOT EXISTS attachment (
	id TEXT PRIMARY KEY,
	entry TEXT REFERENCES entry (id)
		ON DELETE CASCADE,
	name VARCHAR(100),
	content_type VARCHAR(100),
	content TEXT
);
