Option to remove database name from migrations
See original GitHub issueFeature Description
Two weeks ago, the name of the database was added to the migration queries.
The Problem
Unfortunately, this does not work for us. We have several systems with different database names (Dev, Staging, Production). We urgently need an option to disable this behavior.
The Solution
The function needs an option to ignore the database name.
MysqlQueryRunner.ts
/**
* Escapes given table or view path.
*/
protected escapePath(target: Table|View|string): string {
const { database, tableName } = this.driver.parseTableName(target);
if (database) {
return `\`${database}\`.\`${tableName}\``;
}
return `\`${tableName}\``;
}
Relevant Database Driver(s)
Every driver with this behaviour
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
- Reactions:9
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Managing Migrations - EF Core - Microsoft Learn
In your database, delete all rows from the migrations history table; Insert a single row into the migrations history, to record that the...
Read more >Destroy/Remove database in Rails - Stack Overflow
Yes, Its possible to remove the database and migration. rake db:drop rake db: ...
Read more >PMC Commands for Migrations in EF Core
Add-Migration <migration name>, Creates a migration by adding a migration snapshot. Remove-Migration, Removes the last migration snapshot. Update-Database ...
Read more >Database: Migrations - The PHP Framework For Web Artisans
The migrate:fresh command will drop all database tables regardless of their prefix. This command should be used with caution when developing on a...
Read more >Migrations - Django documentation
Migrations are Django's way of propagating changes you make to your models (adding a field, deleting a model, etc.) into your database schema....
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
I’m expecting a lot for this update too.
The outcome from this was not an intentional change. I’ve got a PR that’s mostly got it fixed but it requires some more work when it comes to MSSQL.