Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
OIL migration with postgres fails
  • Trying to use a postgres db and in the docs creating the table "posts" returns an error










    Uncaught exception Fuel\Core\Database_Exception: SQLSTATE[42601]: Syntax error: 7 ERROR:  syntax error at or near "("


    LINE 2:  "id" int(11) UNSIGNED NOT NULL AUTO_INCREMENT,


                     ^ with query: "CREATE TABLE IF NOT EXISTS "posts" (


    "id" int(11) UNSIGNED NOT NULL AUTO_INCREMENT,


    "title" varchar(50) NOT NULL,


    "body" text NOT NULL,


    "user_id" int(11) NOT NULL,


    "created_at" int(11) NULL,


    "updated_at" int(11) NULL,


    PRIMARY KEY ("id")


    )DEFAULT CHARACTER SET utf8;"


    I'm running 1.8, is this fixed in 1.9-dev?

  • No.

    The default schema class is quite MySQL centric, someone needs to create a Postresql driver with a modified schema. Since 1.8, the new driver architecture made this possible, but we haven't worked on alternative drivers yet.

Howdy, Stranger!

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

In this Discussion