Mailinglist Archive: opensuse-buildservice (123 mails)

< Previous Next >
Re: [opensuse-buildservice] Proposal to use data_migrate gem for API
On Dienstag, 5. September 2017, 16:18:37 CEST wrote Christian Bruckmayer:
Hi,


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
<https://github.com/ilyakatz/data-migrate> gem to handle changes to db
data. Here is a PR
<https://github.com/openSUSE/open-build-service/pull/3701>
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
migrations.

well, we used to do that also with current migrations?

Eg. check new issue tracker entries or new attributes.

The alternative is to use rake tasks for data changes which is what I
initially did in the PR in this commit
<https://github.com/openSUSE/open-build-service/pull/3701/commits/f2c9ef6a65c2b9930976b25cff7c07e0002a440a>.

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`.

I don't get this exactly, does this mean that there is no single
command to update all data to current state?

You always have to know lot's of special commands when updating
from 2.8 to 2.9 documented in the README files?

Does this also mean that it breaks our update tests in CI and auto
deployment?

I am strongly against this in that case....

Or do I miss something here?

bye
adrian



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

Thanks


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

Christian



--

Adrian Schroeter
email: adrian@xxxxxxx

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284
(AG Nürnberg)

Maxfeldstraße 5
90409 Nürnberg
Germany


--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups