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

fix(task/priority): change field to SmallIntegerField #2914

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

gagantrivedi
Copy link
Member

@gagantrivedi gagantrivedi commented Nov 1, 2023

Thanks for submitting a PR! Please check the boxes below:

  • I have run pre-commit to check linting
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Changes

Change field type to avoid check constraint
Sqlmigrate

BEGIN;                                                                                                                                                        │
--                                                                                                                                                            │
-- Add field priority to task                                                                                                                                 │
--                                                                                                                                                            │
ALTER TABLE "task_processor_task" ADD COLUMN "priority" smallint NULL;                                                                                        │
COMMIT;

How did you test this code?

Covered by unit tests

Change field type to avoid check constraint
Sqlmigrate:

```
BEGIN;                                                                                                                                                        │
--                                                                                                                                                            │
-- Add field priority to task                                                                                                                                 │
--                                                                                                                                                            │
ALTER TABLE "task_processor_task" ADD COLUMN "priority" smallint NULL;                                                                                        │
COMMIT;
```
Copy link

vercel bot commented Nov 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Nov 1, 2023 7:53am
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 1, 2023 7:53am
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 1, 2023 7:53am

Copy link
Contributor

github-actions bot commented Nov 1, 2023

Uffizzi Preview deployment-39920 was deleted.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6a730c7) 95.63% compared to head (69818a6) 95.63%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2914   +/-   ##
=======================================
  Coverage   95.63%   95.63%           
=======================================
  Files        1011     1011           
  Lines       29006    29006           
=======================================
  Hits        27741    27741           
  Misses       1265     1265           
Files Coverage Δ
...pi/task_processor/migrations/0010_task_priority.py 100.00% <ø> (ø)
api/task_processor/models.py 95.57% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@matthewelwell matthewelwell left a comment

Choose a reason for hiding this comment

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

We'll need to manually change this in staging I guess.

@gagantrivedi
Copy link
Member Author

We'll need to manually change this in staging I guess.

Yeah, just drop the check constraint

@gagantrivedi gagantrivedi added this pull request to the merge queue Nov 1, 2023
Merged via the queue into main with commit 6e6a48b Nov 1, 2023
@gagantrivedi gagantrivedi deleted the fix/priority-data-type branch November 1, 2023 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue related to the REST API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants