Declarative database migrations

Hello! Looking for tools to use discovered that I miss something like Rails database migrations in haskell. Is there a package for it (describe the whole schema and/or particular migrations)? -- Timur Amirov Berlin, Germany

Timur Amirov wrote:
Hello!
Looking for tools to use discovered that I miss something like Rails database migrations in haskell. Is there a package for it (describe the whole schema and/or particular migrations)?
I haven't used Rails but Persistent does migrations quite nicely. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/

hi,
database migrations in haskell.
i strongly advise (general) you to look not lock yourself into database migration within a host language. i have yet to see a db migration scheme that supports good rollback _and_ is expressive enough. have a look into [sqitch](http://sqitch.org/) for a very good database change management system. cheers, tobias florek

Groundhog produces migrations that can be executed or stored as script. It
can create schema from scratch or alter existing schema. There is support
for composite keys and multiple schemas (as namespaces).
On Mon, Jun 30, 2014 at 6:46 AM, Tobias Florek
hi,
database migrations in haskell.
i strongly advise (general) you to look not lock yourself into database migration within a host language. i have yet to see a db migration scheme that supports good rollback _and_ is expressive enough.
have a look into [sqitch](http://sqitch.org/) for a very good database change management system.
cheers, tobias florek
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Regards, Boris

postgresql-orm has a very simple DSL and migration model modeled after active record's db migrations, as well as a utility, `pg_migrate`, for running migrations, rolling back migrations and creating boiler plate code for new migrations: http://hackage.haskell.org/package/postgresql-orm-0.3.0/docs/Database-Postgr... -Amit On 06/29/2014 06:39 AM, Timur Amirov wrote:
Hello!
Looking for tools to use discovered that I miss something like Rails database migrations in haskell. Is there a package for it (describe the whole schema and/or particular migrations)?
-- Timur Amirov Berlin, Germany
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Thanks for the list! I’ll have a look. To be honest, I was trying to avoid Persist for now in favour of postgresql-simple when it comes to using db. The only concern was about migration lib. -- Timur Amirov Berlin, Germany On 1 Jul 2014 at 21:47:13, Amit Aryeh Levy (amit@amitlevy.com) wrote: postgresql-orm has a very simple DSL and migration model modeled after active record's db migrations, as well as a utility, `pg_migrate`, for running migrations, rolling back migrations and creating boiler plate code for new migrations: http://hackage.haskell.org/package/postgresql-orm-0.3.0/docs/Database-Postgr... -Amit On 06/29/2014 06:39 AM, Timur Amirov wrote: Hello! Looking for tools to use discovered that I miss something like Rails database migrations in haskell. Is there a package for it (describe the whole schema and/or particular migrations)? -- Timur Amirov Berlin, Germany _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

postgresql-orm is built on top of postgresql-simple and the migrations will work just fine without using any of the ORM layer -- in other words, you can still just use postgresql-simple in your application. The only constraint is a table for tracking the latest applied migration. On 07/02/2014 11:57 PM, Timur Amirov wrote:
Thanks for the list!
I’ll have a look.
To be honest, I was trying to avoid Persist for now in favour of postgresql-simple when it comes to using db. The only concern was about migration lib.
-- Timur Amirov Berlin, Germany
On 1 Jul 2014 at 21:47:13, Amit Aryeh Levy (amit@amitlevy.com mailto:amit@amitlevy.com) wrote:
postgresql-orm has a very simple DSL and migration model modeled after active record's db migrations, as well as a utility, `pg_migrate`, for running migrations, rolling back migrations and creating boiler plate code for new migrations:
http://hackage.haskell.org/package/postgresql-orm-0.3.0/docs/Database-Postgr...
-Amit
On 06/29/2014 06:39 AM, Timur Amirov wrote:
Hello!
Looking for tools to use discovered that I miss something like Rails database migrations in haskell. Is there a package for it (describe the whole schema and/or particular migrations)?
-- Timur Amirov Berlin, Germany
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (5)
-
Amit Aryeh Levy
-
Boris Lykah
-
Erik de Castro Lopo
-
Timur Amirov
-
Tobias Florek