Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove knownAsSybilAddress from user #1651

Merged
merged 1 commit into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions migration/1719266006273-removeKnownAsSybilAddressFromUser.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

export class RemoveKnownAsSybilAddressFromUser1719266006273
implements MigrationInterface
{
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
ALTER TABLE public.user DROP COLUMN "knownAsSybilAddress";
`);
}

public async down(_queryRunner: QueryRunner): Promise<void> {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incomplete implementation of the down method.

The down method is empty, which might be intentional but poses a risk for database version control. It's generally good practice to provide a way to revert migrations.

+  public async down(queryRunner: QueryRunner): Promise<void> {
+    await queryRunner.query(`
+      ALTER TABLE public.user ADD COLUMN "knownAsSybilAddress" BOOLEAN;
+    `);
+  }
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public async down(_queryRunner: QueryRunner): Promise<void> {}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
ALTER TABLE public.user ADD COLUMN "knownAsSybilAddress" BOOLEAN;
`);
}

}
6 changes: 0 additions & 6 deletions src/entities/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,6 @@ export class User extends BaseEntity {
@Column('bool', { default: false })
isReferrer: boolean;

@Field(_type => Boolean, { nullable: true })
@Column('bool', { default: false })
// After each QF round Lauren and Griff review the donations and pass me a list of sybil addresses
// And then we exclude qfRound donation from those addresses when calculating the real matchingFund
knownAsSybilAddress: boolean;

@Field(() => ReferredEvent, { nullable: true })
@OneToOne(() => ReferredEvent, referredEvent => referredEvent.user, {
cascade: true,
Expand Down
Loading