Generated migrations are creating a ton of unnecessary queries
- Dominant language
- TypeScript
- Stars
- 10
- Forks
- 0
- Avg merge
- 20h 8m
- Merged PRs (30d)
- 30
Description
When I generate a migration with `npm run alcs:migration:generate`, it produces many queries that remove and recreate DB objects unnecessarily.
**Expected Behaviour**
Generated migration only includes changes made to entities.
**Actual Behaviour**
Generated migrations include unnecessary queries
**Steps To Reproduce**
Steps to reproduce the behaviour:
1. `npm run alcs:migration:generate --name=`
Confirm this task meets our team [**Definition of Ready (DoR)**](https://www.figma.com/board/XmNkN600aAVWFCBmSDdt10/Team-Documents?node-id=1-2&t=Xjd6nHZZ7YlnoOrD-4) before moving to the **Next Sprint** column.
Confirm this task meets our team [**Definition of Done (DoD)**](https://www.figma.com/board/XmNkN600aAVWFCBmSDdt10/Team-Documents?node-id=3-21&t=Xjd6nHZZ7YlnoOrD-4) before moving to the **Done** column.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running `npm run alcs:migration:generate --name=` and inspect the generated migration and its queries. Trace the migration-generation entry point to determine why unchanged database objects are removed and recreated. Done means generated migrations include only changes made to entities and no unnecessary queries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100