aboutsummaryrefslogtreecommitdiffstats
path: root/src/internal-server/database/migrations/1566554231482_recipe_schema.js
diff options
context:
space:
mode:
authorLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-08-01 11:07:57 +0000
committerLibravatar GitHub <noreply@github.com>2021-08-01 16:37:57 +0530
commit419933f6505caf4c5e685f8436b1ff735185e55a (patch)
tree152dcb9d2b35d29f862cc57a605b9ae2a0f7c300 /src/internal-server/database/migrations/1566554231482_recipe_schema.js
parentRemoved duplicated contributors badge. (diff)
downloadferdium-app-419933f6505caf4c5e685f8436b1ff735185e55a.tar.gz
ferdium-app-419933f6505caf4c5e685f8436b1ff735185e55a.tar.zst
ferdium-app-419933f6505caf4c5e685f8436b1ff735185e55a.zip
Moved 'internal-server' into a sub-folder as opposed to a git submodule. (#1715)
* Ignored tests in 'internal-server' folder since there are none. * Linter fixes
Diffstat (limited to 'src/internal-server/database/migrations/1566554231482_recipe_schema.js')
-rw-r--r--src/internal-server/database/migrations/1566554231482_recipe_schema.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/internal-server/database/migrations/1566554231482_recipe_schema.js b/src/internal-server/database/migrations/1566554231482_recipe_schema.js
new file mode 100644
index 000000000..514d57600
--- /dev/null
+++ b/src/internal-server/database/migrations/1566554231482_recipe_schema.js
@@ -0,0 +1,20 @@
1/** @type {import('@adonisjs/lucid/src/Schema')} */
2const Schema = use('Schema');
3
4class RecipeSchema extends Schema {
5 up() {
6 this.create('recipes', (table) => {
7 table.increments();
8 table.string('name', 80).notNullable();
9 table.string('recipeId', 254).notNullable().unique();
10 table.json('data');
11 table.timestamps();
12 });
13 }
14
15 down() {
16 this.drop('recipes');
17 }
18}
19
20module.exports = RecipeSchema;