ameingast / postgresql-simple-migration

PostgreSQL Schema Migrations for Haskell
Other
85 stars 48 forks source link

Support a user defined name for the schema_migrations table #30

Open andrevdm opened 5 years ago

andrevdm commented 5 years ago

Added runMigration' and runMigrations'. These two function support an extra parameter over the non-prime ones. This param is the name of the scschema_migrations table that the user has selected.

Adding two new functions like this means there are no breaking changes for existing users.

andrevdm commented 5 years ago

Useful e.g. where you have a DB build with multiple migration tools that both want to write to schema_migrations

ford-prefect commented 4 years ago

@ameingast is this something you would accept? I'd also like to have similar functionality (in my case, to force the schema_migrations to be part of the same schema as the rest of my tables.

ameingast commented 4 years ago

Yup, as long as full backwards compatibility is guaranteed, this will be merged in, once I have some time on my hands.

ford-prefect commented 4 years ago

@andrevdm will you be rebasing this change on current master? If not, I can take a stab at doing this.

andrevdm commented 4 years ago

Hi,

Good point, sure I'll do that this afternoon. As far as I can see it is backwards compatible, I've not had any issues so far

On Wed, 1 Jul 2020 at 17:48, Arun Raghavan notifications@github.com wrote:

@andrevdm https://github.com/andrevdm will you be rebasing this change on current master? If not, I can take a stab at doing this.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ameingast/postgresql-simple-migration/pull/30#issuecomment-652498744, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAASDKSOXQVZZXY3WTUGYJDRZNLDHANCNFSM4JABGFPQ .

andrevdm commented 4 years ago

rebased on master and pushed. I'll do a few more tests now

andrevdm commented 4 years ago

There is a bit of duplication in the code, e.g. MigrationContext' vs MigrationContext but think its justified for backwards comparability.