aboutsummaryrefslogtreecommitdiffstats
path: root/src/server/database/migrations/1566554231482_recipe_schema.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/database/migrations/1566554231482_recipe_schema.js')
-rw-r--r--src/server/database/migrations/1566554231482_recipe_schema.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/server/database/migrations/1566554231482_recipe_schema.js b/src/server/database/migrations/1566554231482_recipe_schema.js
new file mode 100644
index 000000000..14fcb82e5
--- /dev/null
+++ b/src/server/database/migrations/1566554231482_recipe_schema.js
@@ -0,0 +1,21 @@
1
2/** @type {import('@adonisjs/lucid/src/Schema')} */
3const Schema = use('Schema');
4
5class RecipeSchema extends Schema {
6 up() {
7 this.create('recipes', (table) => {
8 table.increments();
9 table.string('name', 80).notNullable();
10 table.string('recipeId', 254).notNullable().unique();
11 table.json('data');
12 table.timestamps();
13 });
14 }
15
16 down() {
17 this.drop('recipes');
18 }
19}
20
21module.exports = RecipeSchema;