mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-14 20:19:26 +01:00
Add stats migrations
This commit is contained in:
17
database/migrations/1633697377760_commands_runs.ts
Normal file
17
database/migrations/1633697377760_commands_runs.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import BaseSchema from '@ioc:Adonis/Lucid/Schema'
|
||||
|
||||
export default class CommandsRuns extends BaseSchema {
|
||||
protected tableName = 'commands_runs'
|
||||
|
||||
public async up () {
|
||||
this.schema.createTable(this.tableName, (table) => {
|
||||
table.increments('id').primary()
|
||||
table.bigInteger('commands')
|
||||
table.date('date')
|
||||
})
|
||||
}
|
||||
|
||||
public async down () {
|
||||
this.schema.dropTable(this.tableName)
|
||||
}
|
||||
}
|
||||
17
database/migrations/1633697382674_builds_runs.ts
Normal file
17
database/migrations/1633697382674_builds_runs.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import BaseSchema from '@ioc:Adonis/Lucid/Schema'
|
||||
|
||||
export default class BuildsRuns extends BaseSchema {
|
||||
protected tableName = 'builds_runs'
|
||||
|
||||
public async up () {
|
||||
this.schema.createTable(this.tableName, (table) => {
|
||||
table.increments('id').primary()
|
||||
table.bigInteger('builds')
|
||||
table.timestamp('date')
|
||||
})
|
||||
}
|
||||
|
||||
public async down () {
|
||||
this.schema.dropTable(this.tableName)
|
||||
}
|
||||
}
|
||||
17
database/migrations/1633697389017_development_hours.ts
Normal file
17
database/migrations/1633697389017_development_hours.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import BaseSchema from '@ioc:Adonis/Lucid/Schema'
|
||||
|
||||
export default class DevelopmentHours extends BaseSchema {
|
||||
protected tableName = 'development_hours'
|
||||
|
||||
public async up () {
|
||||
this.schema.createTable(this.tableName, (table) => {
|
||||
table.increments('id').primary()
|
||||
table.double('seconds')
|
||||
table.date('date')
|
||||
})
|
||||
}
|
||||
|
||||
public async down () {
|
||||
this.schema.dropTable(this.tableName)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user