Commit 4cf6252
Clean up sizes/sizegroup: deduplicate sizes + cross-reference table (#821)
* chore: plan size deduplication and cross-reference table migrations
Agent-Logs-Url: https://github.com/boxwise/dropapp/sessions/870cef39-acd9-49fe-8c16-4dfd54f3b425
Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com>
* feat: deduplicate sizes and create sizes_sizegroup cross-reference table
Migration 1 (20260421120000): removes 75 duplicate size rows, updating
references in stock, shipment_detail, and history tables.
Migration 2 (20260421130000): creates sizes_sizegroup cross-reference
table with all size-sizegroup relationships (including extra sizegroup
memberships from merged duplicates), then drops sizes.sizegroup_id and
sizes.seq.
Updates include/container-stock.php to JOIN sizes_sizegroup instead of
filtering on sizes.sizegroup_id.
Agent-Logs-Url: https://github.com/boxwise/dropapp/sessions/870cef39-acd9-49fe-8c16-4dfd54f3b425
Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com>
* revert: undo cs-fixer formatting changes outside db/migrations and container-stock.php
Agent-Logs-Url: https://github.com/boxwise/dropapp/sessions/363f3d93-798a-48aa-b118-9a9a41ecb889
Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com>
* Avoid implicit cross join
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Philipp Metzner <10617122+pylipp@users.noreply.github.com>
* progress: planning remaining fixes from review
Agent-Logs-Url: https://github.com/boxwise/dropapp/sessions/ce308e1f-588a-4185-aa41-13ca1c14601d
Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com>
* fix: remap itemsout+distro_events_* before DELETE; update sizes.php, getsizes.php, stock_edit.php, sizes_edit.php to use sizes_sizegroup
Agent-Logs-Url: https://github.com/boxwise/dropapp/sessions/ce308e1f-588a-4185-aa41-13ca1c14601d
Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com>
* refactor: use explicit distro_events table names instead of INFORMATION_SCHEMA
Agent-Logs-Url: https://github.com/boxwise/dropapp/sessions/2c1f475d-e3cc-4a30-83d0-3a45e2ba207c
Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com>
* revert-css
* feat: add down() to re-insert deleted size rows from init.sql
Agent-Logs-Url: https://github.com/boxwise/dropapp/sessions/ca2517b0-c9c2-497a-9e87-c76fca107d62
Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com>
* refactor: swap migration order — CreateSizesSizegroupTable first, DeduplicateSizes second
Agent-Logs-Url: https://github.com/boxwise/dropapp/sessions/ca6077f8-c7fa-4a6f-bf02-d8793b688a47
Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com>
* wip: before fixing sizes_sizegroup remap in DeduplicateSizes migration
Agent-Logs-Url: https://github.com/boxwise/dropapp/sessions/f5db50ea-15bf-4438-9c1e-b0d0bf82d2d9
Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com>
* fix: remap sizes_sizegroup rows in DeduplicateSizes instead of deleting them
Agent-Logs-Url: https://github.com/boxwise/dropapp/sessions/f5db50ea-15bf-4438-9c1e-b0d0bf82d2d9
Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com>
* fix: restore minified.css to master version
Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com>
* Update comment
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Philipp Metzner <10617122+pylipp@users.noreply.github.com>
* Use phinx methods
* feat: add migration to drop audit columns (created, created_by, modified, modified_by) from sizes table
Agent-Logs-Url: https://github.com/boxwise/dropapp/sessions/5a267922-fb0f-4a79-9c7d-04cc5362d322
Co-authored-by: HaGuesto <29065125+HaGuesto@users.noreply.github.com>
* plan: add 4th migration to fix sizes data inconsistencies
Agent-Logs-Url: https://github.com/boxwise/dropapp/sessions/388acca9-0bf3-4f83-ba03-25ffdb08105d
Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com>
* feat: add migration 4 to fix seq values and add All ages to sizegroups 17/18/22/25
Agent-Logs-Url: https://github.com/boxwise/dropapp/sessions/388acca9-0bf3-4f83-ba03-25ffdb08105d
Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com>
* add-logging
* Remove Mixed in OneSize sizegroup
* Correct row numbers
For production (and staging in parens)
* feat: add migration 5 to remove sizegroup 20 (Children by month 2-5)
Agent-Logs-Url: https://github.com/boxwise/dropapp/sessions/17d8a353-5722-415f-8a3c-38ca124a5203
Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com>
* add-logging
* insert-seq
* Add on-delete FK handling
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Philipp Metzner <10617122+pylipp@users.noreply.github.com>
---------
Signed-off-by: Philipp Metzner <10617122+pylipp@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Philipp Metzner <pmetzner@freenet.de>
Co-authored-by: HaGuesto <29065125+HaGuesto@users.noreply.github.com>1 parent 4287803 commit 4cf6252
8 files changed
Lines changed: 627 additions & 5 deletions
Lines changed: 86 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
0 commit comments