Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TCDA-232] Fix/lunch meal portion (#669)
* fix/select now shows food values * fix:modal updated and necessary API routes created * fix/lunch meal controller adjusted * fix/model updated, database adjusted but still missing controller fixes * fix/change in render partial params * fix/some forms are already working * fix/form and action finished * fix/remove unnecessary comments * CHANGELOG updated * fix/sonarlint fixes * fix(lunch): Corrigindo comando sql da migration --------- Co-authored-by: TI GUSTAVO <ti.gustavo@ipti.org.br> Co-authored-by: Gustavo Santos <gustavo.santos23703@gmail.com>
- Loading branch information
1 parent
3f84401
commit f0ed77d
Showing
8 changed files
with
295 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
ALTER TABLE lunch_portion | ||
ADD COLUMN food_fk INT NOT NULL; | ||
|
||
ALTER TABLE lunch_portion | ||
ADD CONSTRAINT fk_lunch_portion_food | ||
FOREIGN KEY (food_fk) REFERENCES food(id); | ||
|
||
ALTER TABLE lunch_portion | ||
DROP FOREIGN KEY portion_unity; | ||
|
||
ALTER TABLE lunch_portion | ||
ADD CONSTRAINT fk_lunch_unity_fk | ||
FOREIGN KEY (unity_fk) REFERENCES food_measurement(id); | ||
|
||
|
||
ALTER TABLE lunch_portion | ||
DROP FOREIGN KEY portion_item; | ||
|
||
ALTER TABLE lunch_portion DROP COLUMN item_fk; | ||
|
||
ALTER TABLE lunch_menu_meal DROP COLUMN amount; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.