UNPKG

@catalist-nestjs/validators-registry

Version:

NestJS Validators registry Module for Catalist Finance projects. Part of [Catalist NestJS Modules](https://github.com/blockarchivelabs/catalist-nestjs-modules/#readme)

53 lines (48 loc) 1.43 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var migrations = require('@mikro-orm/migrations'); /** * PLEASE DO NOT EDIT !!! * * This migration can be used in the applications that use this module. */ class Migration20221225154138 extends migrations.Migration { /** * @see ConsensusValidatorEntity * @see ConsensusMetaEntity */ async up() { /** * @see ConsensusValidatorEntity */ this.addSql(`create table "consensus_validator" ( "index" int not null, "pubkey" varchar(98) primary key not null, "status" varchar(128) not null, constraint "index" unique ("index")); `); /** * @see ConsensusMetaEntity */ this.addSql(`create table "consensus_meta" ( "id" smallint primary key, "epoch" int not null, "slot" int not null, "slot_state_root" varchar(66) not null, "block_number" int not null, "block_hash" varchar(66) not null, "timestamp" int not null); `); } async down() { /** * @see RegistryKey */ this.addSql('drop table if exists "consensus_validator" cascade;'); /** * @see ConsensusMetaEntity */ this.addSql('drop table if exists "consensus_meta" cascade;'); } } exports.Migration20221225154138 = Migration20221225154138;