[almighty] How are we handling migrations at the moment ?
Max Rydahl Andersen
manderse at redhat.com
Mon Sep 26 06:58:35 UTC 2016
On 25 Sep 2016, at 15:41, Baiju Muthukadan wrote:
> Hi Max,
>
> On Sun, Sep 25, 2016 at 4:44 PM, Max Andersen <manderse at redhat.com>
> wrote:
>> Why fork ? Is it not enough to just not use the Cassandra parts ?
>>
>> Also, wasn't a similar library found and it was rejected since it
>> only
>> allowed .sql migrations where we wanted go based migrations too ?
>
> As per earlier discussion, there were three reasons for not choosing
> the other project:
> https://github.com/almighty/almighty-core/issues/184#issuecomment-246901574
>
>> 1. We only have to support one database (PostgreSQL) and not the many
>> others supported by the project.
>
> This is one the reason that I forked the project. Because the
> original author may not be interested to remove features.
But why would it matter ? the cassandra stuff is separate anyway. I
don't see how this *hurt* and justify fork and removing features.
In the original discussion I read this as the extra support for other
databases was not important/reason to choose sql-migrate - not as
reasons for not moving to it.
>> 2. We want to have pre- and post-migration scripts (probably in Go)
>> that need to run smart migration steps, that would otherwise be too
>> cumbersome to write in pure SQL files.
>
> I have implemented this feature. See the documentation:
> https://godoc.org/github.com/baijum/pgmigration
the doc still says migrations need have an .sql ending and placed in
`db/migrate`.
Thus I'm not grokking where you added support for go based migrations ?
> If the first reason for forking can be ignored, I can send this
> feature to the original project and we can use that. Please let me
> know.
Seem to be useful for upstream project so why not put upstream if we
think it is useful ?
btw. if we want to use a library why then not extend
https://github.com/mattes/migrate that has builtin support for
extensions like this ?
Actually with its bash support Go would be supported
(https://github.com/mattes/migrate/issues/88)
I'm not really expert on go migrations libs but just seems there already
are basics in place that can be used - thus either make the simplest
thing we can now or use one of the popular ones (i.e. `migrate`)
>> 3. We don't want to support down-migrations.
>
> The current package doesn't have down-migrations.
sure and even if it had we would not use it and thus not affect us.
/max
http://about.me/maxandersen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/almighty-public/attachments/20160926/f105c855/attachment.htm>
More information about the almighty-public
mailing list