2021-09-12 13:16:08 +00:00
|
|
|
import BaseSchema from '@ioc:Adonis/Lucid/Schema'
|
|
|
|
|
|
|
|
|
|
export default class MatchTeams extends BaseSchema {
|
|
|
|
|
protected tableName = 'match_teams'
|
|
|
|
|
|
|
|
|
|
public async up() {
|
|
|
|
|
this.schema.createTable(this.tableName, (table) => {
|
|
|
|
|
table.increments('id')
|
2021-09-12 14:09:29 +00:00
|
|
|
table.string('match_id', 15)
|
2021-09-12 13:16:08 +00:00
|
|
|
|
|
|
|
|
table.string('color', 4).notNullable()
|
2021-09-12 14:09:29 +00:00
|
|
|
table.integer('result').notNullable()
|
|
|
|
|
|
|
|
|
|
table.integer('barons').notNullable()
|
2021-09-12 13:16:08 +00:00
|
|
|
table.integer('dragons').notNullable()
|
|
|
|
|
table.integer('inhibitors').notNullable()
|
|
|
|
|
table.integer('rift_heralds').notNullable()
|
|
|
|
|
|
|
|
|
|
table.specificType('bans', 'INT[]').notNullable()
|
|
|
|
|
table.specificType('ban_orders', 'INT[]').notNullable()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async down() {
|
|
|
|
|
this.schema.dropTable(this.tableName)
|
|
|
|
|
}
|
|
|
|
|
}
|