Skip to content

Commit

Permalink
fix: wrong migration
Browse files Browse the repository at this point in the history
  • Loading branch information
eddort committed Dec 25, 2023
1 parent 453ac72 commit 1dc39ec
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { Migration } from '@mikro-orm/migrations';

export class Migration20231220104403 extends Migration {
export class Migration20231225124800 extends Migration {
async up(): Promise<void> {
this.addSql('TRUNCATE registry_key');
this.addSql('TRUNCATE registry_operator');
this.addSql('TRUNCATE el_meta_entity');
this.addSql('TRUNCATE sr_module_entity');

this.addSql('alter table "el_meta_entity" add column "last_changed_block_hash" varchar(66) not null;');

this.addSql('alter table "registry_operator" add column "finalized_used_signing_keys" int not null;');
Expand All @@ -10,6 +15,11 @@ export class Migration20231220104403 extends Migration {
}

async down(): Promise<void> {
this.addSql('TRUNCATE registry_key');
this.addSql('TRUNCATE registry_operator');
this.addSql('TRUNCATE el_meta_entity');
this.addSql('TRUNCATE sr_module_entity');

this.addSql('alter table "el_meta_entity" drop column "last_changed_block_hash";');

this.addSql('alter table "registry_operator" drop column "finalized_used_signing_keys";');
Expand Down

0 comments on commit 1dc39ec

Please sign in to comment.