Skip to content

Commit

Permalink
fix: migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
limwa committed Feb 8, 2025
1 parent 9f6097e commit 9de7e7f
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
17 changes: 17 additions & 0 deletions website/database/migrations/1739026343722_alter_orders_table.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { BaseSchema } from '@adonisjs/lucid/schema'

export default class extends BaseSchema {
protected tableName = 'orders'

async up() {
this.schema.alterTable(this.tableName, (table) => {
table.dropColumn('request_id')
})
}

async down() {
this.schema.alterTable(this.tableName, (table) => {
table.integer('request_id')
})
}
}
17 changes: 17 additions & 0 deletions website/database/migrations/1739026559954_alter_orders_table.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { BaseSchema } from '@adonisjs/lucid/schema'

export default class extends BaseSchema {
protected tableName = 'orders'

async up() {
this.schema.alterTable(this.tableName, (table) => {
table.string('request_id')
})
}

async down() {
this.schema.alterTable(this.tableName, (table) => {
table.dropColumn('request_id')
})
}
}

0 comments on commit 9de7e7f

Please sign in to comment.