diff options
author | MCMXC <16797721+mcmxcdev@users.noreply.github.com> | 2024-02-10 18:19:14 -0700 |
---|---|---|
committer | Vijay A <vraravam@users.noreply.github.com> | 2024-02-13 06:59:44 +0530 |
commit | 7584d2d7a7110aef0331ebfa178b2295842c59fa (patch) | |
tree | 900cd71237e6231b57936fcce77ff229cd459041 /database/migrations/1566554231482_recipe_schema.ts | |
parent | upgrade recipes submodule (diff) | |
download | ferdium-server-7584d2d7a7110aef0331ebfa178b2295842c59fa.tar.gz ferdium-server-7584d2d7a7110aef0331ebfa178b2295842c59fa.tar.zst ferdium-server-7584d2d7a7110aef0331ebfa178b2295842c59fa.zip |
refactor: project maintenance
- work in progress
Diffstat (limited to 'database/migrations/1566554231482_recipe_schema.ts')
-rw-r--r-- | database/migrations/1566554231482_recipe_schema.ts | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/database/migrations/1566554231482_recipe_schema.ts b/database/migrations/1566554231482_recipe_schema.ts index 3a9784d..567c89f 100644 --- a/database/migrations/1566554231482_recipe_schema.ts +++ b/database/migrations/1566554231482_recipe_schema.ts | |||
@@ -1,19 +1,19 @@ | |||
1 | import BaseSchema from '@ioc:Adonis/Lucid/Schema'; | 1 | import { BaseSchema } from '@adonisjs/lucid/schema' |
2 | 2 | ||
3 | export default class extends BaseSchema { | 3 | export default class extends BaseSchema { |
4 | protected tableName = 'recipes'; | 4 | protected tableName = 'recipes' |
5 | 5 | ||
6 | public async up(): Promise<void> { | 6 | public async up(): Promise<void> { |
7 | this.schema.createTable(this.tableName, table => { | 7 | this.schema.createTable(this.tableName, (table) => { |
8 | table.increments(); | 8 | table.increments() |
9 | table.string('name', 80).notNullable(); | 9 | table.string('name', 80).notNullable() |
10 | table.string('recipeId', 254).notNullable().unique(); | 10 | table.string('recipeId', 254).notNullable().unique() |
11 | table.json('data'); | 11 | table.json('data') |
12 | table.timestamps(); | 12 | table.timestamps() |
13 | }); | 13 | }) |
14 | } | 14 | } |
15 | 15 | ||
16 | public async down(): Promise<void> { | 16 | public async down(): Promise<void> { |
17 | this.schema.dropTable(this.tableName); | 17 | this.schema.dropTable(this.tableName) |
18 | } | 18 | } |
19 | } | 19 | } |