You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by ag...@apache.org on 2005/10/26 01:47:39 UTC

svn commit: r328506 - in /incubator/roller/trunk/metadata/database: 130-to-200-migration-raw.sql createdb-raw.sql db_db2.properties db_derby.properties db_hsql.properties db_mysql.properties db_postgresql.properties

Author: agilliland
Date: Tue Oct 25 16:47:34 2005
New Revision: 328506

URL: http://svn.apache.org/viewcvs?rev=328506&view=rev
Log:
modifications for pubtime column fix.

NOTE: the ALTER_PUBTIME_ALLOW_NULL variable needs to be set for the derby, hsql, and db2 properties files at the time of this commit.


Modified:
    incubator/roller/trunk/metadata/database/130-to-200-migration-raw.sql
    incubator/roller/trunk/metadata/database/createdb-raw.sql
    incubator/roller/trunk/metadata/database/db_db2.properties
    incubator/roller/trunk/metadata/database/db_derby.properties
    incubator/roller/trunk/metadata/database/db_hsql.properties
    incubator/roller/trunk/metadata/database/db_mysql.properties
    incubator/roller/trunk/metadata/database/db_postgresql.properties

Modified: incubator/roller/trunk/metadata/database/130-to-200-migration-raw.sql
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/metadata/database/130-to-200-migration-raw.sql?rev=328506&r1=328505&r2=328506&view=diff
==============================================================================
--- incubator/roller/trunk/metadata/database/130-to-200-migration-raw.sql (original)
+++ incubator/roller/trunk/metadata/database/130-to-200-migration-raw.sql Tue Oct 25 16:47:34 2005
@@ -51,11 +51,13 @@
 
 -- -----------------------------------------------------
 
--- update weblogentry.pubtime to be a "datetime" field instead of "timestamp"
--- "timestamp" doesn't work anymore because we want the value to be null until
--- the weblogentry is published, and "timestamps" are set automatically
+-- make "pubtime" use NULL for default values.  this allows us to leave
+-- the "pubtime" for an entry unset until the entry is actually published.
+-- 
+-- sadly this needs to be done in a specific manner for each db, so check
+-- the db_*.properties file for each db to see how it's done.
 
-alter table weblogentry modify pubtime datetime NULL;
+@ALTER_PUBTIME_ALLOW_NULL@;
 
 
 -- -----------------------------------------------------

Modified: incubator/roller/trunk/metadata/database/createdb-raw.sql
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/metadata/database/createdb-raw.sql?rev=328506&r1=328505&r2=328506&view=diff
==============================================================================
--- incubator/roller/trunk/metadata/database/createdb-raw.sql (original)
+++ incubator/roller/trunk/metadata/database/createdb-raw.sql Tue Oct 25 16:47:34 2005
@@ -173,7 +173,7 @@
     anchor          varchar(255)  not null,
     title           varchar(255)  not null,
     text            @TEXT_SQL_TYPE@ not null,
-    pubtime         datetime     not null,
+    pubtime         @TIMESTAMP_SQL_TYPE_NULL@,
     updatetime      timestamp     not null,
     websiteid       varchar(48)  not null,
     categoryid      varchar(48)  not null,

Modified: incubator/roller/trunk/metadata/database/db_db2.properties
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/metadata/database/db_db2.properties?rev=328506&r1=328505&r2=328506&view=diff
==============================================================================
--- incubator/roller/trunk/metadata/database/db_db2.properties (original)
+++ incubator/roller/trunk/metadata/database/db_db2.properties Tue Oct 25 16:47:34 2005
@@ -1 +1,3 @@
-TEXT_SQL_TYPE=clob(102400)
BOOLEAN_SQL_TYPE_FALSE=smallint default 0
BOOLEAN_SQL_TYPE_TRUE=smallint default 1
BOOLEAN_SQL_TYPE=smallint
BOOLEAN_FALSE=0
BOOLEAN_TRUE=1
INDEXSIZE=
INDEXSIZE_LARGE=
ALTER_TABLE_NOT_NULL= not null
ADDL_FK_PARAMS=on delete no action on update no action enforced enable query optimization
\ No newline at end of file
+TEXT_SQL_TYPE=clob(102400)
BOOLEAN_SQL_TYPE_FALSE=smallint default 0
BOOLEAN_SQL_TYPE_TRUE=smallint default 1
BOOLEAN_SQL_TYPE=smallint
BOOLEAN_FALSE=0
BOOLEAN_TRUE=1
INDEXSIZE=
INDEXSIZE_LARGE=
ALTER_TABLE_NOT_NULL= not null
ADDL_FK_PARAMS=on delete no action on update no action enforced enable query optimization
+TIMESTAMP_SQL_TYPE_NULL=timestamp null
+ALTER_PUBTIME_ALLOW_NULL=

Modified: incubator/roller/trunk/metadata/database/db_derby.properties
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/metadata/database/db_derby.properties?rev=328506&r1=328505&r2=328506&view=diff
==============================================================================
--- incubator/roller/trunk/metadata/database/db_derby.properties (original)
+++ incubator/roller/trunk/metadata/database/db_derby.properties Tue Oct 25 16:47:34 2005
@@ -1 +1,3 @@
-TEXT_SQL_TYPE=clob(102400)
BOOLEAN_SQL_TYPE_FALSE=smallint default 0
BOOLEAN_SQL_TYPE_TRUE=smallint default 1
BOOLEAN_SQL_TYPE=smallint
BOOLEAN_FALSE=0
BOOLEAN_TRUE=1
INDEXSIZE=
INDEXSIZE_LARGE=
ALTER_TABLE_NOT_NULL= not null
ADDL_FK_PARAMS=
\ No newline at end of file
+TEXT_SQL_TYPE=clob(102400)
BOOLEAN_SQL_TYPE_FALSE=smallint default 0
BOOLEAN_SQL_TYPE_TRUE=smallint default 1
BOOLEAN_SQL_TYPE=smallint
BOOLEAN_FALSE=0
BOOLEAN_TRUE=1
INDEXSIZE=
INDEXSIZE_LARGE=
ALTER_TABLE_NOT_NULL= not null
ADDL_FK_PARAMS=
+TIMESTAMP_SQL_TYPE_NULL=timestamp null
+ALTER_PUBTIME_ALLOW_NULL=

Modified: incubator/roller/trunk/metadata/database/db_hsql.properties
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/metadata/database/db_hsql.properties?rev=328506&r1=328505&r2=328506&view=diff
==============================================================================
--- incubator/roller/trunk/metadata/database/db_hsql.properties (original)
+++ incubator/roller/trunk/metadata/database/db_hsql.properties Tue Oct 25 16:47:34 2005
@@ -8,3 +8,5 @@
 INDEXSIZE_LARGE=
 ALTER_TABLE_NOT_NULL= not null
 ADDL_FK_PARAMS=
+TIMESTAMP_SQL_TYPE_NULL=timestamp null
+ALTER_PUBTIME_ALLOW_NULL=

Modified: incubator/roller/trunk/metadata/database/db_mysql.properties
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/metadata/database/db_mysql.properties?rev=328506&r1=328505&r2=328506&view=diff
==============================================================================
--- incubator/roller/trunk/metadata/database/db_mysql.properties (original)
+++ incubator/roller/trunk/metadata/database/db_mysql.properties Tue Oct 25 16:47:34 2005
@@ -1 +1,3 @@
-TEXT_SQL_TYPE=text
BOOLEAN_SQL_TYPE_FALSE=bit default 0
BOOLEAN_SQL_TYPE_TRUE=bit default 1
BOOLEAN_SQL_TYPE=bit
BOOLEAN_FALSE=0
BOOLEAN_TRUE=1
INDEXSIZE=(40)
INDEXSIZE_LARGE=(100)
ALTER_TABLE_NOT_NULL= not null
ADDL_FK_PARAMS=
\ No newline at end of file
+TEXT_SQL_TYPE=text
BOOLEAN_SQL_TYPE_FALSE=bit default 0
BOOLEAN_SQL_TYPE_TRUE=bit default 1
BOOLEAN_SQL_TYPE=bit
BOOLEAN_FALSE=0
BOOLEAN_TRUE=1
INDEXSIZE=(40)
INDEXSIZE_LARGE=(100)
ALTER_TABLE_NOT_NULL= not null
ADDL_FK_PARAMS=
+TIMESTAMP_SQL_TYPE_NULL=datetime NULL
+ALTER_PUBTIME_ALLOW_NULL=alter table weblogentry modify pubtime DATETIME NULL

Modified: incubator/roller/trunk/metadata/database/db_postgresql.properties
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/metadata/database/db_postgresql.properties?rev=328506&r1=328505&r2=328506&view=diff
==============================================================================
--- incubator/roller/trunk/metadata/database/db_postgresql.properties (original)
+++ incubator/roller/trunk/metadata/database/db_postgresql.properties Tue Oct 25 16:47:34 2005
@@ -7,4 +7,6 @@
 INDEXSIZE=
 INDEXSIZE_LARGE=
 ALTER_TABLE_NOT_NULL=
-ADDL_FK_PARAMS=
\ No newline at end of file
+ADDL_FK_PARAMS=
+TIMESTAMP_SQL_TYPE_NULL=timestamp null
+ALTER_PUBTIME_ALLOW_NULL=alter table weblogentry alter pubtime drop not null