Module Recettes : on avance... un peu...
This commit is contained in:
@@ -4,10 +4,12 @@
|
||||
<column name="id" autoIncrement="true" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="content_id" type="INTEGER" />
|
||||
<column name="title" required="true" type="VARCHAR" />
|
||||
<column name="summary" required="false" type="VARCHAR" />
|
||||
<column name="people" required="true" type="INTEGER" />
|
||||
<column name="difficulty" required="true" type="INTEGER" />
|
||||
<column name="preparation_time" required="true" type="VARCHAR" />
|
||||
<column name="cooking_time" required="false" type="VARCHAR" />
|
||||
<column name="other_ingredients" required="false" type="VARCHAR" />
|
||||
|
||||
<foreign-key foreignTable="content" name="fk_content_content_id">
|
||||
<reference foreign="id" local="content_id" />
|
||||
@@ -15,8 +17,8 @@
|
||||
</table>
|
||||
|
||||
<table name="recipe_steps">
|
||||
<column name="recipe_id" required="true" type="INTEGER" />
|
||||
<column name="step" required="true" type="INTEGER" />
|
||||
<column name="recipe_id" required="true" primaryKey="true" type="INTEGER" />
|
||||
<column name="step" required="true" primaryKey="true" type="INTEGER" />
|
||||
<column name="description" required="true" type="VARCHAR" />
|
||||
|
||||
<foreign-key foreignTable="recipe" name="fk_recipesteps_recipe_id">
|
||||
@@ -25,9 +27,10 @@
|
||||
</table>
|
||||
|
||||
<table name="recipe_products">
|
||||
<column name="recipe_id" required="true" type="INTEGER" />
|
||||
<column name="pse_id" required="true" type="INTEGER" />
|
||||
<column name="quantity" required="true" type="INTEGER" />
|
||||
<column name="recipe_id" required="true" primaryKey="true" type="INTEGER" />
|
||||
<column name="pse_id" required="true" primaryKey="true" type="INTEGER" />
|
||||
<column name="nb_of_products" required="true" type="INTEGER" />
|
||||
<column name="quantity" required="true" type="VARCHAR" />
|
||||
|
||||
<foreign-key foreignTable="recipe" name="fk_recipeproducts_recipe_id">
|
||||
<reference foreign="id" local="recipe_id" />
|
||||
|
||||
@@ -14,10 +14,12 @@ CREATE TABLE `recipe`
|
||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||
`content_id` INTEGER,
|
||||
`title` VARCHAR(255) NOT NULL,
|
||||
`summary` VARCHAR(255),
|
||||
`people` INTEGER NOT NULL,
|
||||
`difficulty` INTEGER NOT NULL,
|
||||
`preparation_time` VARCHAR(255) NOT NULL,
|
||||
`cooking_time` VARCHAR(255),
|
||||
`other_ingredients` VARCHAR(255),
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `fi_content_content_id` (`content_id`),
|
||||
CONSTRAINT `fk_content_content_id`
|
||||
@@ -36,7 +38,7 @@ CREATE TABLE `recipe_steps`
|
||||
`recipe_id` INTEGER NOT NULL,
|
||||
`step` INTEGER NOT NULL,
|
||||
`description` VARCHAR(255) NOT NULL,
|
||||
INDEX `fi_recipesteps_recipe_id` (`recipe_id`),
|
||||
PRIMARY KEY (`recipe_id`,`step`),
|
||||
CONSTRAINT `fk_recipesteps_recipe_id`
|
||||
FOREIGN KEY (`recipe_id`)
|
||||
REFERENCES `recipe` (`id`)
|
||||
@@ -52,8 +54,9 @@ CREATE TABLE `recipe_products`
|
||||
(
|
||||
`recipe_id` INTEGER NOT NULL,
|
||||
`pse_id` INTEGER NOT NULL,
|
||||
`quantity` INTEGER NOT NULL,
|
||||
INDEX `fi_recipeproducts_recipe_id` (`recipe_id`),
|
||||
`nb_of_products` INTEGER NOT NULL,
|
||||
`quantity` VARCHAR(255) NOT NULL,
|
||||
PRIMARY KEY (`recipe_id`,`pse_id`),
|
||||
INDEX `fi_recipeproducts_pse_id` (`pse_id`),
|
||||
CONSTRAINT `fk_recipeproducts_recipe_id`
|
||||
FOREIGN KEY (`recipe_id`)
|
||||
|
||||
Reference in New Issue
Block a user