Skip to content

Commit

Permalink
tech(api): remove unused columns in flash-algo-configurations table
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrecoin committed Dec 4, 2024
1 parent 61b4b55 commit e82c8f9
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const TABLE_NAME = 'flash-algorithm-configurations';
const WARM_UP_LENGTH_COLUMN_NAME = 'warmUpLength';
const FORCED_COMPETENCES_COLUMN_NAME = 'forcedCompetences';
const MINIMUM_ESTIMATED_SUCCESS_RATE_RANGES_COLUMN_NAME = 'minimumEstimatedSuccessRateRanges';
const DOUBLE_MEASURES_UNTIL_COLUMN_NAME = 'doubleMeasuresUntil';
const VARIATION_PERCENT_UNTIL_COLUMN_NAME = 'variationPercentUntil';

const up = function (knex) {
return knex.schema.table(TABLE_NAME, (table) => {
table.dropColumn(WARM_UP_LENGTH_COLUMN_NAME);
table.dropColumn(FORCED_COMPETENCES_COLUMN_NAME);
table.dropColumn(MINIMUM_ESTIMATED_SUCCESS_RATE_RANGES_COLUMN_NAME);
table.dropColumn(DOUBLE_MEASURES_UNTIL_COLUMN_NAME);
table.dropColumn(VARIATION_PERCENT_UNTIL_COLUMN_NAME);
});
};

const down = function (knex) {
return knex.schema.table(TABLE_NAME, (table) => {
table.integer(WARM_UP_LENGTH_COLUMN_NAME);
table.jsonb(FORCED_COMPETENCES_COLUMN_NAME);
table.jsonb(MINIMUM_ESTIMATED_SUCCESS_RATE_RANGES_COLUMN_NAME);
table.integer(DOUBLE_MEASURES_UNTIL_COLUMN_NAME);
table.integer(VARIATION_PERCENT_UNTIL_COLUMN_NAME);
});
};

export { down, up };

0 comments on commit e82c8f9

Please sign in to comment.