gormigrate icon indicating copy to clipboard operation
gormigrate copied to clipboard

Added immudb support in createMigrationTableIfNotExists

Open JoelRocaMartinez opened this issue 3 years ago • 1 comments
trafficstars

Hi there,

This PR is created in order to give support to the immudb syntax when migrating a table. Currently the createMigrationTableIfNotExists function in -> gormigrate.go line 375, is supporting almost every SQL database type, but unfortunately immudb requires a pretty specific syntax to work with.

Thanks for your time and attention and have a great day! Joel

JoelRocaMartinez avatar Feb 22 '22 13:02 JoelRocaMartinez

Hi @JoelRocaMartinez,

It seems that this change broke the tests somehow.

Also, I'm not sure we want to add support for immudb as it's a less common database.

Perhaps, as an alternative, we could support passing a custom CreateTableFunc on Options, so people with less common databases could use that.

andreynering avatar Mar 19 '22 20:03 andreynering

Hi @JoelRocaMartinez, we have reworked on how migrations table is created. Instead of hard-coded plain sql mutation statements, we use native gorm methods. So any gorm-supported db dialect works out of the box now. This change is already landed default branch and would be released as part of gormigrate v2.1.0 in few days.

I'm closing this PR by now because it's obsolete.

@JoelRocaMartinez Please, provide your feedback in case if you still have any issues with immudb driver.

avakarev avatar May 31 '23 00:05 avakarev