2021-09-12 13:16:08 +00:00
|
|
|
import BaseSchema from '@ioc:Adonis/Lucid/Schema'
|
|
|
|
|
|
|
|
|
|
export default class Matches extends BaseSchema {
|
|
|
|
|
protected tableName = 'matches'
|
|
|
|
|
|
|
|
|
|
public async up() {
|
|
|
|
|
this.schema.createTable(this.tableName, (table) => {
|
|
|
|
|
table.string('id', 15).primary()
|
2021-09-12 21:24:21 +00:00
|
|
|
table.bigInteger('game_id').notNullable()
|
2021-09-19 15:06:35 +00:00
|
|
|
table.specificType('map', 'smallint').notNullable()
|
|
|
|
|
table.specificType('gamemode', 'smallint').notNullable()
|
2021-09-12 21:24:21 +00:00
|
|
|
table.bigInteger('date').notNullable()
|
2021-09-12 13:16:08 +00:00
|
|
|
table.string('region', 4).notNullable()
|
2021-09-19 15:06:35 +00:00
|
|
|
table.specificType('result', 'smallint').notNullable()
|
2021-09-12 13:16:08 +00:00
|
|
|
|
2021-09-14 13:06:42 +00:00
|
|
|
table.float('season').notNullable()
|
2021-09-19 15:06:35 +00:00
|
|
|
table.specificType('game_duration', 'smallint').unsigned().notNullable()
|
2021-09-12 13:16:08 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async down() {
|
|
|
|
|
this.schema.dropTable(this.tableName)
|
|
|
|
|
}
|
|
|
|
|
}
|