New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add a "dontDrop" property in shared config to define tables not to be dropped #847
Conversation
… to be dropped, close adonisjs#820
Oh, also, I was wondering if there was any particular reason why the Line 24 in 27381c4
|
Ahh sorry for sitting on it for that long. For some reasons keeping a command specific config within the database connection config seems bit off to me. I like how rails do it. Can we introduce another property called {
wipe: {
ignoreTables: ['']
}
} Also, I remember correctly the internal classes of migration and seeder do not read config from the user config, its the commands that reads that config and passes a subset of it to the internal classes. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
After discussing it, we just need to make it works with Sqlite and Mssql |
I screwed up with git 😅 I'll open a new PR |
Fix #820
Hey 👋
So I just added a
dontDrop
property in theSharedConfigNode
interface, which allows users to give a list of table names not to be dropped when thedropAllTables
function is called. As a reminder, this function is also called when doing a db:wipe, or a db:freshWhen used on Postgres and Redshift, the default value of
dontDrop
isspatial_ref_sys
, which is the table created and used by the commonly used PostGIS extensionI added this feature on Redshift, Mysql, and Postgres