fix: Alter consumed task count column to integer

This commit is contained in:
Faruk AYDIN
2023-03-06 11:35:39 +01:00
parent bb9abe104f
commit cbf270fdba
3 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
import { Knex } from 'knex';
import appConfig from '../../config/app';
export async function up(knex: Knex): Promise<void> {
if (!appConfig.isCloud) return;
return knex.schema.alterTable('usage_data', (table) => {
table.integer('consumed_task_count').notNullable().alter();
});
}
export async function down(knex: Knex): Promise<void> {
if (!appConfig.isCloud) return;
return knex.schema.alterTable('usage_data', (table) => {
table.string('consumed_task_count').notNullable().alter();
});
}