migrate icon indicating copy to clipboard operation
migrate copied to clipboard

If I want to pass a parameter and then prefix the table name, is there any good way to do it?

Open LiaoSirui opened this issue 3 years ago • 2 comments

LiaoSirui avatar Jul 31 '22 16:07 LiaoSirui

Same as my thought, how we can put some dynamic value into the *.sql, e.g. use a variable for schema name in Postgres? Or whatever at least it's needed to support the dynamic value.

The reason behind this is we deploy the app in different environments and it is possible to have a different schema name because the schema name is based on the application config as well.

DykiSA avatar Aug 01 '22 08:08 DykiSA

Probably, you are interested in https://github.com/golang-migrate/migrate/pull/793

Bessonov avatar Feb 25 '23 19:02 Bessonov