gormigrate icon indicating copy to clipboard operation
gormigrate copied to clipboard

Gormigrate doesn't allow specifying a schema on the TableName option

Open RevProg opened this issue 6 years ago • 1 comments

Hi, First of all thank you for gomigrate. It`s very usefull. I have a problems with postgres database with several schemas. In case if we got sql with additional shemas in migration, gorm HasTable method returns false, even if table really exists, so createMigrationTableIfNotExists trying to create table and fails(even if I add schema to migration table name in options). I know this is gorm issue, but after checking their repo issues I found that this known problem and will not to be fixed soon.

What about custom method to check table existing?

Thank you

RevProg avatar Feb 28 '19 17:02 RevProg

Hi @RevProg,

Ideally, this should be fixed on Gorm itself instead of here. I'd encourage you to open another issue there with details and a reproduction script (it doesn't need to include Gormigrate, just a failing HasTable call).

andreynering avatar Mar 03 '19 17:03 andreynering

@hi @RevProg, unfortunately gormigrate has nothing to do with gorm dialect-specific databases because it operates on top of gorm and the dialect implementing Migrator Interface. Please, contact the team behind postgres dialect regarding schema support. Sorry for no help.

Closing this issue as irrelevant.

avakarev avatar Jun 02 '23 00:06 avakarev