Return-Path: Delivered-To: apmail-incubator-roller-commits-archive@www.apache.org Received: (qmail 43046 invoked from network); 9 Mar 2006 20:09:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Mar 2006 20:09:45 -0000 Received: (qmail 30952 invoked by uid 500); 9 Mar 2006 20:09:44 -0000 Delivered-To: apmail-incubator-roller-commits-archive@incubator.apache.org Received: (qmail 30920 invoked by uid 500); 9 Mar 2006 20:09:44 -0000 Mailing-List: contact roller-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: roller-dev@incubator.apache.org Delivered-To: mailing list roller-commits@incubator.apache.org Received: (qmail 30909 invoked by uid 99); 9 Mar 2006 20:09:44 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Mar 2006 12:09:44 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 09 Mar 2006 12:09:43 -0800 Received: (qmail 42724 invoked by uid 65534); 9 Mar 2006 20:09:23 -0000 Message-ID: <20060309200923.42722.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r384595 - in /incubator/roller/trunk/metadata/database: 200-to-210-migration.vm control.vm Date: Thu, 09 Mar 2006 20:09:22 -0000 To: roller-commits@incubator.apache.org From: snoopdave@apache.org X-Mailer: svnmailer-1.0.7 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: snoopdave Date: Thu Mar 9 12:09:21 2006 New Revision: 384595 URL: http://svn.apache.org/viewcvs?rev=384595&view=rev Log: Don't quote default values in macro, fixes ROL-1076 Modified: incubator/roller/trunk/metadata/database/200-to-210-migration.vm incubator/roller/trunk/metadata/database/control.vm Modified: incubator/roller/trunk/metadata/database/200-to-210-migration.vm URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/metadata/database/200-to-210-migration.vm?rev=384595&r1=384594&r2=384595&view=diff ============================================================================== --- incubator/roller/trunk/metadata/database/200-to-210-migration.vm (original) +++ incubator/roller/trunk/metadata/database/200-to-210-migration.vm Thu Mar 9 12:09:21 2006 @@ -12,7 +12,7 @@ -- Add to website table: commentmod, blacklist, defaultallowcomments and defaultcommentdays #addColumnNotNull("website" "commentmod" $BOOLEAN_SQL_TYPE $BOOLEAN_FALSE) #addColumnNotNull("website" "defaultallowcomments" $BOOLEAN_SQL_TYPE $BOOLEAN_TRUE) -#addColumnNotNull("website" "defaultcommentdays" "integer" "7") +#addColumnNotNull("website" "defaultcommentdays" "integer" 7) alter table website add column blacklist $TEXT_SQL_TYPE; update website set commentmod=$BOOLEAN_FALSE, defaultallowcomments=$BOOLEAN_TRUE, defaultcommentdays=7, blacklist='', datecreated=datecreated; @@ -21,4 +21,4 @@ -- Add weblog displaydays column -#addColumnNotNull("website" "displaycnt" "integer" "15") \ No newline at end of file +#addColumnNotNull("website" "displaycnt" "integer" 15) \ No newline at end of file Modified: incubator/roller/trunk/metadata/database/control.vm URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/metadata/database/control.vm?rev=384595&r1=384594&r2=384595&view=diff ============================================================================== --- incubator/roller/trunk/metadata/database/control.vm (original) +++ incubator/roller/trunk/metadata/database/control.vm Thu Mar 9 12:09:21 2006 @@ -5,22 +5,21 @@ Follow the installation guide for instructions on setting up your database. #** Define templates to be generated **# -#set( $templates = ["createdb", "200-to-210-migration"]) -#set( $templates = ["createdb", "210-to-220-migration"]) +#set( $templates = ["createdb", "200-to-210-migration", "210-to-220-migration"]) #** Define special macro needed for alter table with not-null restriction **# #macro(addColumnNotNull $table $column $type $default) #if($DBTYPE == "MYSQL" || $DBTYPE=="HSQDB") -alter table $table add column $column $type default '$default' not null; +alter table $table add column $column $type default $default not null; #elseif ($DBTYPE == "POSTGRESQL") alter table $table add column $column $type; alter table $table alter $column set default $default; -update $table set $column='$default'; +update $table set $column=$default; alter table $table alter $column set not null; #elseif ($DBTYPE == "HSQLDB") -alter table $table add column $column $type default '$default' not null; +alter table $table add column $column $type default $default not null; #elseif ($DBTYPE == "DERBY" || $DBTYPE == "DB2") -alter table $table add column $column $type with default '$default' not null; +alter table $table add column $column $type with default $default not null; #elseif ($DBTYPE == "ORACLE") alter table $table add column $column $type default $default not null; #end