Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 35x 35x 35x 1x | import { MigrationInterface, QueryRunner } from 'typeorm'; import { TokensEntity } from '@cardano-sdk/projection-typeorm'; export class TokensQuantityNumericMigrations1691042603934 implements MigrationInterface { static entity = TokensEntity; public async up(queryRunner: QueryRunner): Promise<void> { await queryRunner.query('ALTER TABLE "tokens" ALTER COLUMN "quantity" TYPE numeric(20,0) USING quantity::numeric'); } public async down(queryRunner: QueryRunner): Promise<void> { await queryRunner.query('ALTER TABLE "tokens" ALTER COLUMN "quantity" TYPE bigint USING quantity::bigint'); } } |