chore(release): 0.1.0
[risinglegends.git] / migrations / 20230710191035_boost-cleanup.ts
1 import { Knex } from "knex";
2
3
4 export async function up(knex: Knex): Promise<void> {
5   return knex.schema.alterTable('inventory', function(table) {
6     ['strength','dexterity','intelligence','constitution'].forEach(s => {
7       table.dropColumn(`boost_${s}`);
8       table.dropColumn(`requirement_${s}`);
9     });
10
11     table.dropColumn('boost_damage');
12     table.dropColumn('requirement_level');
13   }).alterTable('shop_items', function(table) {
14     ['strength','dexterity','intelligence','constitution'].forEach(s => {
15       table.dropColumn(`boost_${s}`);
16       table.dropColumn(`requirement_${s}`);
17     });
18
19     table.dropColumn('boost_damage');
20     table.dropColumn('requirement_level');
21   });
22 }
23
24
25 export async function down(knex: Knex): Promise<void> {
26 }
27