mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 21:07:27 +00:00
27 lines
767 B
TypeScript
27 lines
767 B
TypeScript
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')
|
|
table.string('match_id', 15)
|
|
|
|
table.string('color', 4).notNullable()
|
|
table.integer('result').notNullable()
|
|
|
|
table.integer('barons').notNullable()
|
|
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)
|
|
}
|
|
}
|