Skip to content

Commit

Permalink
Revert unwanted changes happend after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
aminlatifi committed Dec 18, 2023
1 parent 7b1df0a commit fb632de
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions migration/1685248368673-AddPassportScoreAndStampssToUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { MigrationInterface, QueryRunner, TableColumn } from 'typeorm';
export class AddPassportScoreAndStampssToUser1685248368673
implements MigrationInterface
{
async up(queryRunner: QueryRunner): Promise<void> {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.addColumn(
'user',
new TableColumn({
Expand All @@ -23,7 +23,7 @@ export class AddPassportScoreAndStampssToUser1685248368673
);
}

async down(queryRunner: QueryRunner): Promise<void> {
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.dropColumn('user', 'passportStamps');
await queryRunner.dropColumn('user', 'passportScore');
}
Expand Down
4 changes: 2 additions & 2 deletions migration/1687250090261-create_qf_round_history_table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { MigrationInterface, QueryRunner } from 'typeorm';
export class createQfRoundHistoryTable1687250090261
implements MigrationInterface
{
async up(queryRunner: QueryRunner): Promise<void> {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
CREATE TABLE "qf_round_history" (
"id" SERIAL NOT NULL,
Expand All @@ -25,7 +25,7 @@ export class createQfRoundHistoryTable1687250090261
`);
}

async down(queryRunner: QueryRunner): Promise<void> {
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
DROP TABLE "qf_round_history";
`);
Expand Down
4 changes: 2 additions & 2 deletions migration/1687383705794-AddOptimismGoerliTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import config from '../src/config';
export class AddOptimismGoerliTokens1687383705794
implements MigrationInterface
{
async up(queryRunner: QueryRunner): Promise<void> {
public async up(queryRunner: QueryRunner): Promise<void> {
const environment = config.get('ENVIRONMENT') as string;
if (environment === 'production') {
// We dont add optimism-goerli tokens in production ENV
Expand Down Expand Up @@ -44,7 +44,7 @@ export class AddOptimismGoerliTokens1687383705794
}
}

async down(queryRunner: QueryRunner): Promise<void> {
public async down(queryRunner: QueryRunner): Promise<void> {
const environment = config.get('ENVIRONMENT') as string;
if (environment === 'production') {
// We dont add optimism-goerli tokens in production ENV
Expand Down
4 changes: 2 additions & 2 deletions migration/1689142228634-AddUserScoresToUserDonations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { MigrationInterface, QueryRunner } from 'typeorm';
export class AddUserScoresToUserDonations1689142228634
implements MigrationInterface
{
async up(queryRunner: QueryRunner): Promise<void> {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
ALTER TABLE donation
ADD COLUMN IF NOT EXISTS "qfRoundUserScore" real
`);
}

async down(queryRunner: QueryRunner): Promise<void> {
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
ALTER TABLE donation
DROP COLUMN IF EXISTS "qfRoundUserScore"
Expand Down
4 changes: 2 additions & 2 deletions migration/1694295208252-AddEligibleNetworksToQfRoundEntity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { MigrationInterface, QueryRunner, TableColumn } from 'typeorm';
export class AddEligibleNetworksToQfRoundEntity1694295208252
implements MigrationInterface
{
async up(queryRunner: QueryRunner): Promise<void> {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
ALTER TABLE public.qf_round
ADD COLUMN IF NOT EXISTS "eligibleNetworks" integer array DEFAULT ARRAY[]::integer[]
`);
}

async down(queryRunner: QueryRunner): Promise<void> {
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.dropColumn('qf_round', 'eligibleNetworks');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import config from '../src/config';
export class AddEligibleNetworksToPreviousQfRounds1694635872128
implements MigrationInterface
{
async up(queryRunner: QueryRunner): Promise<void> {
public async up(queryRunner: QueryRunner): Promise<void> {
const environment = config.get('ENVIRONMENT') as string;

// Define the eligible network IDs based on the conditions
Expand All @@ -23,7 +23,7 @@ export class AddEligibleNetworksToPreviousQfRounds1694635872128
);
}

async down(queryRunner: QueryRunner): Promise<void> {
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
UPDATE public.qf_round
SET "eligibleNetworks" = '{}'
Expand Down
4 changes: 2 additions & 2 deletions migration/1696421249293-AddExternalDonationsFields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { MigrationInterface, QueryRunner, TableColumn } from 'typeorm';
export class AddExternalDonationsFields1696421249293
implements MigrationInterface
{
async up(queryRunner: QueryRunner): Promise<void> {
public async up(queryRunner: QueryRunner): Promise<void> {
const table = await queryRunner.getTable('donation');
if (!table?.findColumnByName('isExternal')) {
await queryRunner.addColumn(
Expand Down Expand Up @@ -39,7 +39,7 @@ export class AddExternalDonationsFields1696421249293
}
}

async down(queryRunner: QueryRunner): Promise<void> {
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.dropColumn('donation', 'isExternal');
await queryRunner.dropColumn('donation', 'blockNumber');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { MigrationInterface, QueryRunner } from 'typeorm';
export class addIsStableCoinFieldToTokenTable1696421249293
implements MigrationInterface
{
async up(queryRunner: QueryRunner): Promise<void> {
public async up(queryRunner: QueryRunner): Promise<void> {
// Add the isStableCoin column with a default value of false
await queryRunner.query(`
DO $$
Expand All @@ -26,7 +26,7 @@ export class addIsStableCoinFieldToTokenTable1696421249293
`);
}

async down(queryRunner: QueryRunner): Promise<void> {
public async down(queryRunner: QueryRunner): Promise<void> {
// Remove the "isStableCoin" column
await queryRunner.query(`
ALTER TABLE token
Expand Down
4 changes: 2 additions & 2 deletions migration/1699542566835-project_actual_matching_view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { MigrationInterface, QueryRunner } from 'typeorm';
export class projectActualMatchingView1699542566835
implements MigrationInterface
{
async up(queryRunner: QueryRunner): Promise<void> {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`
DROP MATERIALIZED VIEW IF EXISTS project_actual_matching_view;
Expand Down Expand Up @@ -83,7 +83,7 @@ export class projectActualMatchingView1699542566835
);
}

async down(queryRunner: QueryRunner): Promise<void> {
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`
DROP MATERIALIZED VIEW project_actual_matching_view;
Expand Down
4 changes: 2 additions & 2 deletions migration/1701792159998-addSafeTransactionIdToDonation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { MigrationInterface, QueryRunner } from 'typeorm';
export class addSafeTransactionIdToDonation1701792159998
implements MigrationInterface
{
async up(queryRunner: QueryRunner): Promise<void> {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`
ALTER TABLE donation
Expand All @@ -12,7 +12,7 @@ export class addSafeTransactionIdToDonation1701792159998
);
}

async down(queryRunner: QueryRunner): Promise<void> {
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`
ALTER TABLE donation
Expand Down
4 changes: 2 additions & 2 deletions migration/1701916750562-modifyDonationUniquenessIndex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { logger } from '../src/utils/logger';
export class modifyDonationUniquenessIndex1701916750562
implements MigrationInterface
{
async up(queryRunner: QueryRunner): Promise<void> {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`DROP INDEX IF EXISTS "UQ_c9db9fd133378af80c3521bb146";`,
);
Expand All @@ -15,7 +15,7 @@ export class modifyDonationUniquenessIndex1701916750562
`);
}

async down(queryRunner: QueryRunner): Promise<void> {
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`DROP INDEX IF EXISTS "UQ_c9db9fd133378af80c3521bb146";`,
);
Expand Down
4 changes: 2 additions & 2 deletions migration/1701979390554-addnullableTransactionId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { MigrationInterface, QueryRunner } from 'typeorm';
export class addnullableTransactionId1701979390554
implements MigrationInterface
{
async up(queryRunner: QueryRunner): Promise<void> {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE public.donation ALTER COLUMN "transactionId" DROP NOT NULL`,
);
}

async down(queryRunner: QueryRunner): Promise<void> {
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE public.donation ALTER COLUMN "transactionId" SET NOT NULL`,
);
Expand Down

0 comments on commit fb632de

Please sign in to comment.