PRAGMA foreign_keys = ON; CREATE TABLE recipes ( id INTEGER PRIMARY KEY, title TEXT NOT NULL, portions INTEGER NOT NULL, url TEXT NOT NULL, notes TEXT NOT NULL, created INTEGER NOT NULL, -- Unix time stamp last_changed INTEGER NOT NULL -- Unix time stamp ); CREATE TABLE steps ( id INTEGER PRIMARY KEY, 'index' INTEGER NOT NULL, text TEXT NOT NULL, recipe INTEGER NOT NULL, FOREIGN KEY(recipe) REFERENCES recipes(id) );