Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Can't make first migration
  • I've setup Fuelphp my laptop (Ubuntu 11.10) and I use Postgres as database so I've setup PDO with dns = <code>'pgsql:dbname=anncolent_fuel;host=localhost;port=5432'</code>
    I first have a problem with the identifier value in /config/db.php which was set as <code>'identifier' => '`'</code>
    This doesn't fit with PDO and Postgres (I don't which one refuses this!). So I set it to <code>'identifier' => '"'</code> which seems to be fine. But now, I've a problem with the creation of the migration table. Fuel wants to set the field "version" as int(11) !!! How to overpass this ? Herafter the message from oil :
    $php oil refine migrate
    Error - SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "("
    LINE 4: "version" int(11) DEFAULT '0' NOT NULL
    ^ with query: "CREATE TABLE IF NOT EXISTS "migration" (
    "name" varchar(50) NOT NULL,
    "type" varchar(25) NOT NULL,
    "version" int(11) DEFAULT '0' NOT NULL
    ) DEFAULT CHARACTER SET utf8;" in COREPATH/classes/database/pdo/connection.php on line 142
  • Of all the frameworks out there, you choose that one...
  • Maybe, but I've a little experience of Cake which could help me to deliver my app very quickly. I really want to give a try to fuel as the community seems to be much like I expected it to be. But there are some caveats as I need to use Postgres.
  • There's a third party native pgsql driver available for FuelPHP: I think it's even posted here in the "code share" forum...
  • The current PDO driver is very generic, and most of the DB support methods favour MySQL syntax. I've understood that there are more inconsistencies when it comes to PostgreSQL. You might want to check this topic:, you might have more success with this driver. As for the migrations table, the only solution atm is to create it by hand. For version 2, the entire DB layer is being rewritten to support multiple RDBMS platforms and SQL dialects.
  • Thank's for your answer. Unfortunately, the problems are too huge. So I'll wait for 2.0 to give a try to fuel. Until that, I'll will go with cakephp.

Howdy, Stranger!

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

In this Discussion