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

Database cleanup (remove obsolete fields) #3032

Merged
merged 9 commits into from
Mar 28, 2025

Conversation

andrea-williams
Copy link
Contributor

@andrea-williams andrea-williams commented Mar 17, 2025

Card: #2229

Operation model:

  • removed opt_in field (leftover from Reg1; no longer needed now that we store registration purpose)
  • removed operation_has_multiple_operators field from database (is now inferred based on length of multiple_operators array)
  • removed verified_by and verified_at fields

Operator model:

  • removed verified_by and verified_at fields
  • removed is_new boolean field - no longer needed because we internal users no longer need to explicitly approve the creation of new operators

Remaining work:

  • remove status column from Operator model once we have decision on what to do with existing operators that have a status of "Draft" or "Pending" in prod

@andrea-williams andrea-williams force-pushed the task/database-cleanup/2229 branch 2 times, most recently from a0114cf to b6cf7dd Compare March 18, 2025 21:26
@andrea-williams andrea-williams force-pushed the task/database-cleanup/2229 branch 2 times, most recently from 8362df0 to d91b93d Compare March 20, 2025 18:33
@andrea-williams andrea-williams marked this pull request as ready for review March 20, 2025 19:01
@andrea-williams andrea-williams force-pushed the task/database-cleanup/2229 branch 2 times, most recently from 187ec3f to d6b50aa Compare March 25, 2025 23:35
Copy link
Contributor

@Sepehr-Sobhani Sepehr-Sobhani left a comment

Choose a reason for hiding this comment

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

Bravo! 🤩

@@ -126,7 +124,7 @@ def custom_reverse_lazy(view_name: str, *args: Any, **kwargs: DictStrAny) -> Uni
return reverse_lazy(f"{DEFAULT_API_NAMESPACE}:{view_name}", *args, **kwargs)


def set_verification_columns(record: Union[UserOperator, Operator, Operation], user_guid: UUID) -> None:
def set_verification_columns(record: UserOperator, user_guid: UUID) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

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

We are now using this in one place. Should we move it there or create a function for it under the UserOperator service?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ooh good point! I'll check with Reporting first - I wonder if they'll have a need for this function, in which case it would make sense to keep it somewhere generic.

@Sepehr-Sobhani Sepehr-Sobhani force-pushed the task/database-cleanup/2229 branch 2 times, most recently from b663aa7 to bed6256 Compare March 28, 2025 17:11
@Sepehr-Sobhani
Copy link
Contributor

@andrea-williams Created this ticket for the remaining work: #3121

@Sepehr-Sobhani Sepehr-Sobhani force-pushed the task/database-cleanup/2229 branch from bed6256 to d4f36f3 Compare March 28, 2025 18:30
@Sepehr-Sobhani Sepehr-Sobhani force-pushed the task/database-cleanup/2229 branch from d4f36f3 to 7ab42df Compare March 28, 2025 22:04
@Sepehr-Sobhani Sepehr-Sobhani merged commit a679930 into develop Mar 28, 2025
22 of 23 checks passed
@Sepehr-Sobhani Sepehr-Sobhani deleted the task/database-cleanup/2229 branch March 28, 2025 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants