You are viewing the PKP Support Forum | PKP Home Wiki

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
What to do if you have a technical problem with OCS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved. Please note that this FAQ is OJS-centric, but most issues are applicable to both platforms.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OCS Conference Support and Discussion subforum; if you have a development question, try the OCS Development subforum.

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 -- http://postgresql.org/, 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 {
Posts: 3
Joined: Tue Jan 17, 2006 6:28 pm

Return to OCS Technical Support

Who is online

Users browsing this forum: No registered users and 2 guests