projects
/
recipes.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add frontend tests and other stuff
[recipes.git]
/
backend
/
sql
/
version_1.sql
diff --git
a/backend/sql/version_1.sql
b/backend/sql/version_1.sql
index
93f567b
..
c3488db
100644
(file)
--- a/
backend/sql/version_1.sql
+++ b/
backend/sql/version_1.sql
@@
-42,10
+42,21
@@
CREATE TABLE [Recipe] (
[estimate_time] INTEGER,
[description] TEXT,
[servings] INTEGER DEFAULT 4,
[estimate_time] INTEGER,
[description] TEXT,
[servings] INTEGER DEFAULT 4,
+ [is_published] INTEGER NOT NULL DEFAULT FALSE,
FOREIGN KEY([user_id]) REFERENCES [User]([id]) ON DELETE SET NULL
);
FOREIGN KEY([user_id]) REFERENCES [User]([id]) ON DELETE SET NULL
);
+CREATE TABLE [Image] (
+ [Id] INTEGER PRIMARY KEY,
+ [recipe_id] INTEGER NOT NULL,
+ [name] TEXT,
+ [description] TEXT,
+ [image] BLOB,
+
+ FOREIGN KEY([recipe_id]) REFERENCES [Recipe]([id]) ON DELETE CASCADE
+);
+
CREATE TABLE [RecipeTag] (
[id] INTEGER PRIMARY KEY,
CREATE TABLE [RecipeTag] (
[id] INTEGER PRIMARY KEY,