drizzle-team / drizzle-team/drizzle-orm
[FEATURE]: Manual control migrations
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### Describe what you want
Seeing that are 2 (at 14/06/2024) or more issues that complains about migrations merge on different branchs or the fact that not having an schema simple results on drop table migrations I think it would be an good feature to be able to control it on a manual way.
My ideia:
- Migration creation command:
- Migrations can have the file name with timestamp (more accurate and less conflicting when working with more than one person on the project)
- Do not consider real schemas in the project (since not having a nested project with a crucial schema would (today) result in a migration that would eliminate the table)
- Consider control not using the json journal, this will stab the project in relation to the time relationship of the migrations to each other
- Considering the above, maybe just use it to directly write SQL control statements that can be arranged and executed at the desired time
- extra: maybe provide a ts function (like schema declaration) for down and up to use type safety in table control on migration write
Contributor guide
Research direction
The issue does not name files or tests. Start by locating the migration creation command and the JSON journal handling, then document how schemas and branch merges currently affect generated migrations. Done should be a settled design and implementation plan for manual ordering, schema handling, and optional typed up/down migration functions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql, typescript
- Domain
- database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100