How do you guys deal with migrations? Currently we...
# exposed
a
How do you guys deal with migrations? Currently we just use flyway, are there any solutions for automatically generated migrations. (that of course need to be inspected). It’s pretty slow & our models state n database occasionslly diverge
s
We dont use it but you could check something like
SchemaUtils.statementsRequiredToActualizeScheme().isNotEmpty()
on startup and stop the process. I guess you could use it to fill in your migration files also.
l
JetBrains just merged this experimental feature into the latest release: https://github.com/JetBrains/Exposed/pull/1968
a
That's great. We built something similar in-house- but that script seem to share some issues that we couldn't figure out ourself. such as renaming column (probably more as well)
But it's nice to see they're working on it!!
l
The script doesn't drop columns, so be aware of that, but hopefully they'll fix that soon. I've opened a ticket about it.