-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty schema! error with postgresql #68
Comments
You need some tables in your database. Exress Admin can't create tables for you, it can only edit existing ones. |
I have a table, I even used the express-admin-example but got the same error. For some reason var sql = query.replace('show-tables', schema);. this.client.query(sql, function (err, rows) { in https://github.com/simov/express-admin/blob/master/lib/db/database.js |
This error message might not be correct. Can you check out if the database user you are connecting with have granted permissions for this schema, tables and sequences you are using. Example for granting permissions to your user here - https://github.com/simov/express-admin-examples/#postgresql |
yes I did that, my user has permission. |
That's very strange, the only problem I can think of is misconfiguration or missing privileges (the error message isn't correct, which is silly) Here is what I normally do # import
sudo -u postgres psql 'db' < dump.sql
# cmd
sudo -u postgres psql \c "to-the-database-first!"
grant all on database "express-admin-examples" to liolio;
grant all on schema "public" to liolio;
grant all on all tables in schema "public" to liolio;
grant all on all sequences in schema "public" to liolio;
-- additionally you may need to change the owner of each table and sequence
alter table [tableName] owner to liolio;
alter sequence [sequenceName] owner to liolio; |
That helped thanks |
I have a public schema but keep getting this error when trying to run the admin.
The text was updated successfully, but these errors were encountered: