issue with using-built-in-models with postgresql
I wanted to create the models ['User', 'AccessToken', 'ACL', 'RoleMapping', 'Role'] using the code :
var server = require('./server');
var ds = server.dataSources.mydb;
var lbTables = ['User', 'AccessToken', 'ACL', 'RoleMapping', 'Role'];
ds.autoupdate(lbTables, function(er) {
if (er) throw er;
console.log('Loopback tables [' - lbTables - '] created in ', ds.adapter.name);
ds.disconnect();
});
But i have the following error "right refused for the dev database". When I have checked the database logs; loopback tries to create a "public" schema. How can I specify the schema in which it should create these tables?
My datasource :
"mydb": {
"name": "mydb",
"connector": "postgresql",
"schema": "web_bus",
"database": "dev",
"host": "host",
"port": 5432,
"user": "web_bus",
"password": "web_bus",
"username": "web_bus",
"debug": true
}
I have the same question. Maybe you can use the user name which is same as schema's name.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.