Create Migrations in specific folder / Hook to modify folder
See original GitHub issueFeature Description
allow creation of migration files in subfolders of migration dir. Like YYYY/MM
The Problem
All migrations are created in the migrationDir
"cli": {
"migrationsDir": "src/migrations"
}
The Solution
I am thinking of 2 options:
Option 1
{
"cli": {
"migrationsDir": "src/migrations",
"migrationSubFolder": "YYYY/MM"
}
}
Option 2 (only for js / inline config)
module.export = {
cli: {
migrationsDir: "src/migrations",
migrationSubFolder: () => {
return 'name/of/sub/folder'
}
}
}
Considered Alternatives
currently we are moving the files manually - not optimal
Additional Context
Relevant Database Driver(s)
DB Type | Relevant |
---|---|
aurora-data-api |
yes |
aurora-data-api-pg |
yes |
better-sqlite3 |
yes |
cockroachdb |
yes |
cordova |
yes |
expo |
yes |
mongodb |
yes |
mysql |
yes |
nativescript |
yes |
oracle |
yes |
postgres |
yes |
react-native |
yes |
sap |
yes |
sqlite |
yes |
sqlite-abstract |
yes |
sqljs |
yes |
sqlserver |
yes |
Are you willing to resolve this issue by submitting a Pull Request?
- ✖️ Yes, I have the time, and I know how to start.
- ✖️ Yes, I have the time, but I don’t know how to start. I would need guidance.
- ✅ No, I don’t have the time, but I can support (using donations) development.
- ✅ No, I don’t have the time and I’m okay to wait for the community / maintainers to resolve this issue.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
How to change the output folder for migrations with asp.net ...
Defaults to generated from the output directory. Added in EF Core 5.0. ... New migrations are created as siblings of the last migration....
Read more >Migration classic vs. modern folder - UiPath Community Forum
Hi all, I currently have 2 production classic robots and I need to move them inside a modern folder where I already have...
Read more >Create and populate folders | Google Drive
To create a folder, use the files.create method with the application/vnd.google-apps.folder MIME type and a title. The following code snippet shows how to ......
Read more >Database Migrations with Knex - Perk
Migrations are simply files that live in the /migrations directory of your project. When you use the perk command line tool to create...
Read more >Migrations with Multiple Providers - EF Core | Microsoft Learn
You don't need to specify the output directory for subsequent migrations since they are created as siblings to the last one.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Wouldn’t you need to anyway? You’d just be setting the
subfolder
to a month instead of a dir.Why not Something like this?
damn sorry for the confusion, I completely forgot we have two separate options 🙊