2

I am trying to use Postgres (8.4) instead of MySQL for a new project, because of the super spiffy PostGIS 2.0 features that are available. I am using the Turnkey LAPP server, so Cake 2.3.7 is up and running and can connect to my database.

database.php

<?php
class DATABASE_CONFIG {

    public $default = array(
        'datasource' => 'Database/Postgres',
        'persistent' => false,
        'host' => 'localhost',
        'login' => 'cakephp',
        'password' => 'c6E5rUbr',
        'database' => 'omega',
        'schema' => 'public'
    );

}

In phpPgAdmin, I have a database named omega, with a public schema, and a single table called users.

users has three fields:

id          numeric 
username    character varying   
password    character varying   

When I go to bake, I get the following output:

Your database does not have any tables.
DirtyBirdNJ
  • 574
  • 10
  • 26

1 Answers1

0

PERMISSIONS, PERMISSIONS, PERMISSIONS!

Everything was setup properly. I changed the owner of the table to the postgres user I created for cakephp, and everything works!

DirtyBirdNJ
  • 574
  • 10
  • 26
  • Good to hear it worked out. It would be useful to know what you actually did to change that ownership. I seem to have this same problem, but as a Postgres beginner I now still have no clue how to fix it after reading this. – Oldskool Oct 12 '14 at 10:44