| 12345678910111213141516171819202122 |
- import BaseSchema from '@ioc:Adonis/Lucid/Schema'
- export default class extends BaseSchema {
- protected tableName = 'orders'
- public async up() {
- this.schema.createTable(this.tableName, (table) => {
- table.increments('id')
- table.timestamp('created_at', { useTz: true })
- table.timestamp('updated_at', { useTz: true })
- table.integer('user_id')
- table.integer('price')
- table.string('type')
- table.integer('series_id')
- table.integer('episode_id')
- })
- }
- public async down() {
- this.schema.dropTable(this.tableName)
- }
- }
|