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

added task_split_type to project when task splitting complete #990

Merged
merged 10 commits into from
Nov 21, 2023

Conversation

Sujanadh
Copy link
Contributor

This pull request addresses the issue #986 the task_split_type field not being saved in the database.

changes:

  • Added an enum field for task_split_type.
  • Implemented the necessary changes to ensure the task_split_type is saved in the database.

Copy link
Member

@spwoodcock spwoodcock left a comment

Choose a reason for hiding this comment

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

This is great. The only thing is that the enum should probably map to a number value for the database.

Check the other enums in the file for reference 😃

But to do this the field would have to be changed to an integer, which would require a migration 🫤

I'll write a migration file for this PR that also includes some other db updates we need (to save making many separate ones), if you could address the enum 👍

@Sujanadh
Copy link
Contributor Author

so we are using int enum for memory efficiency. ok, @spwoodcock i will make it int enum if you could make migration file.

@Sujanadh
Copy link
Contributor Author

@spwoodcock i have created migration file too please do check it once.

@spwoodcock spwoodcock merged commit 319b115 into development Nov 21, 2023
1 of 2 checks passed
@spwoodcock spwoodcock deleted the task-split-type branch November 21, 2023 11:14
nischalstha9 pushed a commit to naxa-developers/fmtm that referenced this pull request Dec 8, 2023
…osm#990)

* fix : added task_split_type to project when task splitting complete

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* changed str enum to int enum

* altered field type of task_split_type to integer

* created migration file alter-field-type-task_split_type

* feat(migration): task_split_type, task_split_dimension, task_num_buildings

* fix: add task_split_ params to db_modesl & project schema

* fix(migration): creating tasksplittype enum if exists, cast to type

* fix: make task_split_type Optional for tests

* fix: add task_split_dimension & num_buildings if available

---------

Co-authored-by: sujanadh <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: spwoodcock <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to backend code migration Contains a DB migration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants