From 92f64a80a85ecd19ddc6a596513f7453d63e643c Mon Sep 17 00:00:00 2001 From: Arthur DANJOU Date: Fri, 8 Oct 2021 15:02:30 +0200 Subject: [PATCH] Add stats migrations --- .../migrations/1633697377760_commands_runs.ts | 17 +++++++++++++++++ .../migrations/1633697382674_builds_runs.ts | 17 +++++++++++++++++ .../1633697389017_development_hours.ts | 17 +++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 database/migrations/1633697377760_commands_runs.ts create mode 100644 database/migrations/1633697382674_builds_runs.ts create mode 100644 database/migrations/1633697389017_development_hours.ts diff --git a/database/migrations/1633697377760_commands_runs.ts b/database/migrations/1633697377760_commands_runs.ts new file mode 100644 index 0000000..9692753 --- /dev/null +++ b/database/migrations/1633697377760_commands_runs.ts @@ -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) + } +} diff --git a/database/migrations/1633697382674_builds_runs.ts b/database/migrations/1633697382674_builds_runs.ts new file mode 100644 index 0000000..7048728 --- /dev/null +++ b/database/migrations/1633697382674_builds_runs.ts @@ -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) + } +} diff --git a/database/migrations/1633697389017_development_hours.ts b/database/migrations/1633697389017_development_hours.ts new file mode 100644 index 0000000..9b8d7cf --- /dev/null +++ b/database/migrations/1633697389017_development_hours.ts @@ -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) + } +}