Problems with bake in CakePHP 3.x "Your database does not have any tables."

1

Greetings! I'm trying to generate models, controllers and templates in a CakePHP 3.x project using the PostgreSQL database. I already created the tables, I configured the connection (which is working, according to the default homepage of Cake), but when I run the bake, I get the following return:

bin/cake bake all

Welcome to CakePHP v3.4.3 Console
---------------------------------------------------------------
App : src
Path: /home/leandro/sites/taskmanager/src/
PHP : 7.0.15-1ubuntu4
---------------------------------------------------------------
Bake All
---------------------------------------------------------------
Possible model names based on your database:
Your database does not have any tables.

The php7.0-pgsql package is already installed and the browser connection is correct, but the bake does not go beyond that and I can not generate the files. What to do? Thanks in advance for your attention.

    
asked by anonymous 23.04.2017 / 03:08

2 answers

0

Your bank does not have a different default scheme. If yes, please indicate this in config / app.php:

'schema' = > 'filename',

    
10.05.2017 / 18:02
0

Another reason for this message is when you do not give the user privileges in the tables.

If it is for the user us_testes to have full permission in the sc_testes schema use:

GRANT ALL ON SCHEMA sc_testes TO us_testes;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA sc_testes TO us_testes;
GRANT USAGE ON ALL SEQUENCES IN SCHEMA sc_testes TO us_testes;
    
25.04.2018 / 17:48