Is it possible to make Migrations occur in a single transaction, so
that if the rake fails, it doesn't leave the database in a broken
state, with half the changes made, and the other half incomplete?
Obviously, this depends on the database itself supporting transactions,
but I'm using Postgres.
Is it possible to make Migrations occur in a single transaction, so
that if the rake fails, it doesn't leave the database in a broken
state, with half the changes made, and the other half incomplete?
Obviously, this depends on the database itself supporting transactions,
but I'm using Postgres.
>
I wrap my migrations in a transaction using postgresql, and it seems to work fine.
But you need a database backend that will transact DDL changes. Not
all do. Postgres for sure does, and now I don't have any half-made
transactions anymore.
Is it possible to make Migrations occur in a single transaction, so that if
the rake fails, it doesn't leave the database in a broken state, with half
the changes made, and the other half incomplete?
Obviously, this depends on the database itself supporting transactions, but
I'm using Postgres.
The easiest way for you is to use transactional_migrations plugin. Thus you
won't need to put explicit BEGIN and COMMIT DDL statements in migrations.
Hello:
You wrote in another thread, now outdated, about a way for getting
decimal support for ActiveRecord, in version 1.1.6.
Is there a way of having that code?
Thanks in advance.