-
-
Notifications
You must be signed in to change notification settings - Fork 664
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
[pg] add migrationsTable config support for migration #1638
[pg] add migrationsTable config support for migration #1638
Conversation
Add update, insert and delete methods to with clause for MySQL and SQLite
Add tests for `db.with().insert()`, `db.with().delete()` and `db.with().update()` for all dialects
7315ac7
to
5233a89
Compare
For mysql migrations you can change the migraton table, this commit add support for migration table name change.
5233a89
to
eb48f17
Compare
Thanks for PR! |
@AndriiSherman done ! |
I just thought about one more addition I would like to have in this PR before the actual merge. I think we need to add a few tests for migrations. I will guide you a bit on what and where should be added: Here is a test example for It would be great if you could create another set of tests to check:
You can check it by querying the specific custom table and custom schema to see if those tables are created and not empty. Additionally, you can query tables from the migration script. It would be great if you could add it for: |
@AndriiSherman I've added the tests. |
Thanks for your work @g3r4n ! I actually need this now too and was going to do a PR of my own, glad to see someone already picked it up ❤️! |
@AndriiSherman anything more you need from my end to merge this PR ? |
…izzle-orm into extend-with-clause
Improve `with` clause
@g3r4n this all looks good! Just resolve the conflicts and I'll merge this PR |
@AndriiSherman Done ! |
@g3r4n it seems like there are new conflicts 🥺, do you have time to resolve them? If not I'm happy to branch of this PR and do it! |
I'll resolve the conflicts |
…/feat/pg-migration-table-name-support
@AndriiSherman let me know if you need any help ! |
I think it's done. I just added this feature to SQLite as well. I'm going to merge it today and add it to the 0.29.5 release |
With mysql migrations you can change the migration table name, this PR add support for migration table name change for pg.
For context I'm trying to add dynamic schema support to my application. This can be achieved easily if we can change the migration table. I'm using the database connection to specify, through the search path, the schema to do the migration on but I need to have separate migration table for each schema.