Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
It is very nice of U
  • I config my db.php to pgsql driver. But when I try to use oil. I got these errors! It looks like generated a mysql ddl? 

    Uncaught exception Fuel\Core\Database_Exception: SQLSTATE[42601]: Syntax error: 7 ERROR:  syntax error at or near "`" at character 28 with query: "CREATE TABLE IF NOT EXISTS `migration` (
        `type` varchar(25) NOT NULL,
        `name` varchar(50) NOT NULL,
        `migration` varchar(100) DEFAULT '' NOT NULL
    ) DEFAULT CHARACTER SET utf8;"



  • When I change to pdo . But it still has problem.

    ncaught exception Fuel\Core\Database_Exception: SQLSTATE[42601]: Syntax error: 7 ERROR:  syntax error at or near "DEFAULT" at character 150 with query: "CREATE TABLE IF NOT EXISTS "migration" (
        "type" varchar(25) NOT NULL,
        "name" varchar(50) NOT NULL,
        "migration" varchar(100) DEFAULT '' NOT NULL
    ) DEFAULT CHARACTER SET utf8;"
    Callstack:

  • This is content of db.php file
    <?php
    /**
     * The development database settings. These get merged with the global settings.
     */

    return array(
        'default' => array(
                    'type' => 'pdo',
            'connection'  => array(
                'dsn'        => 'pgsql:host=localhost;dbname=soa',
                'username'   => 'postgres',
                'password'   => '123456',
                            'persistent'     => false,
                            'compress'       => false,
            ),
                    'identifier'   => '"',
                    'table_prefix'   => '',
                    'enable_cache'   => false,
                    'profiling'      => false,
        ),
    );

  • There is no specific support for other databases in DBUtil, it's indeed written for MySQL. It's the main reason we've written a new database layer, which is fully platform independent.

    We're looking into how we're going to introduce it in a way that it's compatible with the current API.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion