8 Commits

Author SHA1 Message Date
Michael Genson
7947aa99ae
fix: Migration Issue With Duplicate Labels (#3085)
* fixed eager queries

* test

---------

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2024-01-31 13:37:12 -06:00
Michael Genson
a5ef18669b
fix: Upgrade Black (#3057)
* bump black

* bump black on precommit

* run black

* fix backend test runner
2024-01-27 15:11:54 -06:00
Michael Genson
8ca5a9454e
fix: Migration Failure On Postgres Due To Foreign Key Error (#2923)
* added test data to (hopefully) expose fk error

* added additional commits during migration

---------

Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
2024-01-08 11:01:44 +00:00
Michael Genson
310069a7e9
fix: various alembic migration issues with queries (#2773)
* set expire_on_commit false to avoid refresh

* converted deletes to raw SQL statements

* call update statements directly in sql

* parameterized text queries

* replace orm with raw sql to avoid db differences
2023-12-06 18:37:19 +00:00
Michael Genson
714fb6a723
fix: Organizer Models Not Lazy Loaded When Migrating (#2760)
* lazy load attrs when running unique constraint fix

* speeling

---------

Co-authored-by: boc-the-git <3479092+boc-the-git@users.noreply.github.com>
2023-11-27 07:48:51 -09:00
Michael Genson
d440d51ffe
feat: plural foods and units, and aliases (#2674)
* added plural names and alias tables to foods/units

* updated models to include plural names and aliases

* updated parser to include plural and aliases

* fixed migrations

* fixed recursive models

* added plural abbreviation to migration

* updated parser and display prop

* update displays to use plurals

* fix display edgecase and remove print

* added/updated display tests

* fixed model bug and added parser tests

* added tests for aliases

* added new plural options to data management page

* removed unique constraint

* made base dialog more customizable

* added alias management to food and unit data pages

* removed unused awaits

* 🧹
2023-11-14 06:39:07 -09:00
Michael Genson
df3b10b5c2
fix: migrate error on duplicate foods/units/labels (#2637)
Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2023-10-16 01:51:29 +00:00
Michael Genson
a98e863bca
fix: database unique constraints (#2594)
* fixed missing migration name

* added unique constraints to all m2m tables

* fixed bug trying to create duplicate tags

* added more unique constraints

* fixed duplicate seeder data

* updated tests

* fixed seed rollback error
2023-10-07 11:23:13 -08:00