Files
paprika-api/database/migrations/1753030795466_create_restaurant_menus_table.ts
T
2025-07-28 13:00:46 +02:00

20 lines
441 B
TypeScript

import { BaseSchema } from '@adonisjs/lucid/schema'
export default class extends BaseSchema {
protected tableName = 'restaurant_menus'
async up() {
this.schema.createTable(this.tableName, (table) => {
table.increments('id').primary()
table.string('name').notNullable()
table.timestamp('created_at')
table.timestamp('updated_at')
})
}
async down() {
this.schema.dropTable(this.tableName)
}
}