Hi,
I have tried to apply what was suggested by StarCrescent and Geoff in http://www.silverstripe.org/installing-silverstripe/show/252952 but I didn't manage to make it work.
Since I didn't understand what Geoff meant by "Run /dev/build on your project and all the tables should be created", I think I have missed something.
Here follows the procedure I have applied (in vain):
1. I have created SilverStripe-dedicated postgresql database and user.
2. I have downloaded the PostGresql module postgresql-trunk-r69947 at http://www.silverstripe.org/postgresql-module/ and extracted the files into the silverstripe/postgresql-trunk-r69947 directory (ie along side cms, sapphire,...).
3. I have downloaded install_pg.php and config-form-pg.html from http://open.silverstripe.com/ticket/3362 and installed them into the silverstripe directory.
4. I have modified silverstripe/check-php.php, replacing header("Location: install.php"); with header("Location: install_pg.php");
5. I have modifed silverstripe/postgresql-trunk-r69947/code/PostgreSQLDatabase.php, replacing the "pgsql_error" occurence (line 124) with "user_error".
6. Using a browser I have connected to my silverstripe site and proceed with the Silverstripe/PostGresql installation.
The installation has failed with an error on the following query (URLSegment doesn't exist - but I don't have investigated this one for the moment):
SELECT "SiteTree".*, "GhostPage".*, "ErrorPage".*, "RedirectorPage".*, "VirtualPage".*, "SiteTree"."ID", CASE WHEN "SiteTree"."ClassName" IS NOT NULL THEN "SiteTree"."ClassName" ELSE 'SiteTree' END AS "RecordClassName" FROM "SiteTree" LEFT JOIN "GhostPage" ON "GhostPage"."ID" = "SiteTree"."ID" LEFT JOIN "ErrorPage" ON "ErrorPage"."ID" = "SiteTree"."ID" LEFT JOIN "RedirectorPage" ON "RedirectorPage"."ID" = "SiteTree"."ID" LEFT JOIN "VirtualPage" ON "VirtualPage"."ID" = "SiteTree"."ID" WHERE (URLSegment = 'home') ORDER BY "Sort" LIMIT 1
After refreshing, the installation has failed with an error on the following query (in fact this query is using a Mysql syntax not a Postgresql one):
ALTER TABLE "PageComment" CHANGE "ClassName" "ClassName" varchar(255) not null default 'PageComment' check ("ClassName" in ('PageComment')), CHANGE "Created" "Created" timestamp, CHANGE "LastEdited" "LastEdited" timestamp, CHANGE "Name" "Name" varchar(200), CHANGE "Comment" "Comment" text, CHANGE "IsSpam" "IsSpam" boolean not null default false, CHANGE "NeedsModeration" "NeedsModeration" boolean not null default false, CHANGE "CommenterURL" "CommenterURL" varchar(255), CHANGE "ParentID" "ParentID" numeric(8) not null default 0, CHANGE "AuthorID" "AuthorID" numeric(8) not null default 0
There is something wrong with the "alterTable" function from silverstripe/postgresql-trunk-r69947/code/PostgreSQLDatabase.php ;
the alteredFields values are not compatible with postgresql.
// snippet
if($alteredFields) foreach($alteredFields as $k => $v) $alterList[] .= "CHANGE \"$k\" \"$k\" $v";
Any idea ?
Thank you in advance for your help