Mailinglist Archive: opensuse-buildservice (123 mails)

< Previous Next >
Re: [opensuse-buildservice] Proposal to use data_migrate gem for API

On 09/04/2017 12:13 PM, Evan Rolfe wrote:

Proposal to use data_migrate gem for API

Hi all, I would like to propose that we use the data_migrate
<> gem to handle changes to db
data. Here is a PR
I have opened where I need to update each notification's event_payload
from YAML to JSON serialisation. This
doesn't make sense to do in a normal migration because it has nothing
to do with database structure only the
content of the database. This gem allows us to handle such changes in
the same way we handle normal

The alternative is to use rake tasks for data changes which is what I
initially did in the PR in this commit

However the downsides of that are that we need to always update the
README's to let updaters know exactly
which rake tasks need to be run to update their db and it also makes
it easier to sync data changes with
other developers. All thats needed to get your database up to date
with the gem is to run `rake db:migrate:with_data`.

If you have any opinions please post on the PR to continue this


I'm fine with it and like the idea! Go ahead :)

< Previous Next >
Follow Ups