datetime unknown in postgresql

Are you responsible for making OCS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, michael, John

Forum rules
The Public Knowledge Project Support Forum is moving to

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.
Posts: 3
Joined: Tue Jan 17, 2006 6:28 pm

datetime unknown in postgresql

Postby szazs89 » Tue Jan 17, 2006 6:46 pm

I have tried to install the recently downloaded OCS package (1.1.5), however,
it has problems when trying creating the tables (e.g. papers) in the database.
It is because postgresql (>=7.4.x?) does not know the date type DATETIME.

[It seems that postgresql (>=7.3) does not support type DATETIME and recommends TIMESTAMP instead --, Google, etc.]

Is there a patch for it?

[Here it is ;-) -- see at the bottom. At least it gets through the install. That's all for now.]

# Patch of install.php in ocs-1.1.5. Not fully tested, use at your own risk!

Code: Select all

--- install.php.orig    2004-01-11 03:40:17.000000000 +0100
+++ install.php     2006-01-18 14:33:52.000000000 +0100
@@ -420,7 +420,7 @@
                                view_reviews VARCHAR(5) NOT NULL DEFAULT '',
                                primary_track_id INT NOT NULL DEFAULT 0,
                                secondary_track_id INT NOT NULL DEFAULT 0,
-                               created DATETIME,
+                               created TIMESTAMP,
                                timestamp TIMESTAMP NOT NULL DEFAULT NOW()
                        )") or $error = "createtables";
@@ -599,8 +599,8 @@
                                has_paid VARCHAR(5) NOT NULL DEFAULT '',
                                reg_email VARCHAR(5) NOT NULL DEFAULT '',
                                special_requests TEXT NOT NULL DEFAULT '',
-                               date_registered DATETIME,
-                               date_paid DATETIME
+                               date_registered TIMESTAMP,
+                               date_paid TIMESTAMP
                        )") or $error = "createtables";
                else {

Return to “OCS Technical Support”

Who is online

Users browsing this forum: No registered users and 1 guest