You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ sequelize-automate -c .sequelize-automate-new.config.js
Database options: {"database":"mydb","username":"user","password":"****","dialect":"postgres","host":"myhost","port":"5432","schema":"app"}
Automate options: {"type":"js","camelCase":false,"dir":"new","emptyDir":false}
Executing (default): SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' AND table_type LIKE '%TABLE' AND table_name != 'spatial_ref_sys';
Done!
As you can see, "app" gets recognized as the value of Database option "schema", but when the list of tables gets queried, "public" is used as the schema instead.
I suspect that the cause of this is the function showTablesQuery() in the sequelize codebase:
showTablesQuery() {
return "SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' AND table_type LIKE '%TABLE' AND table_name != 'spatial_ref_sys';";
}
IMHO this function should take a parameter schema that defaults to "public" instead of just querying the "public" schema. I haven't investigated further yet because I'm new to sequelize and sequelize-automate and am not sure that I'm using it correctly.
The text was updated successfully, but these errors were encountered:
Version I'm using:
I've tried to use this configuration
And got this result:
As you can see, "app" gets recognized as the value of Database option "schema", but when the list of tables gets queried, "public" is used as the schema instead.
I suspect that the cause of this is the function
showTablesQuery()
in the sequelize codebase:https://github.com/sequelize/sequelize/blob/master/lib/dialects/postgres/query-generator.js#L117-L119
IMHO this function should take a parameter
schema
that defaults to "public" instead of just querying the "public" schema. I haven't investigated further yet because I'm new to sequelize and sequelize-automate and am not sure that I'm using it correctly.The text was updated successfully, but these errors were encountered: