Skip to content

Commit df32f27

Browse files
committed
tech(api): remove unused columns in flash-algo-configurations table
1 parent 1cb4548 commit df32f27

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
const TABLE_NAME = 'flash-algorithm-configurations';
2+
const WARM_UP_LENGTH_COLUMN_NAME = 'warmUpLength';
3+
const FORCED_COMPETENCES_COLUMN_NAME = 'forcedCompetences';
4+
const MINIMUM_ESTIMATED_SUCCESS_RATE_RANGES_COLUMN_NAME = 'minimumEstimatedSuccessRateRanges';
5+
const DOUBLE_MEASURES_UNTIL_COLUMN_NAME = 'doubleMeasuresUntil';
6+
const VARIATION_PERCENT_UNTIL_COLUMN_NAME = 'variationPercentUntil';
7+
8+
const up = function (knex) {
9+
return knex.schema.table(TABLE_NAME, (table) => {
10+
table.dropColumn(WARM_UP_LENGTH_COLUMN_NAME);
11+
table.dropColumn(FORCED_COMPETENCES_COLUMN_NAME);
12+
table.dropColumn(MINIMUM_ESTIMATED_SUCCESS_RATE_RANGES_COLUMN_NAME);
13+
table.dropColumn(DOUBLE_MEASURES_UNTIL_COLUMN_NAME);
14+
table.dropColumn(VARIATION_PERCENT_UNTIL_COLUMN_NAME);
15+
});
16+
};
17+
18+
const down = function (knex) {
19+
return knex.schema.table(TABLE_NAME, (table) => {
20+
table.integer(WARM_UP_LENGTH_COLUMN_NAME);
21+
table.jsonb(FORCED_COMPETENCES_COLUMN_NAME);
22+
table.jsonb(MINIMUM_ESTIMATED_SUCCESS_RATE_RANGES_COLUMN_NAME);
23+
table.integer(DOUBLE_MEASURES_UNTIL_COLUMN_NAME);
24+
table.integer(VARIATION_PERCENT_UNTIL_COLUMN_NAME);
25+
});
26+
};
27+
28+
export { down, up };

0 commit comments

Comments
 (0)