Sure, please go ahead. I'm setup to run the tests again with ease. - Dave
On Mon, Jul 21, 2014 at 5:55 PM, Glen Mazza <glen.ma...@gmail.com> wrote: > Hi Dave, I realize you may have finished your Apache blog migration tests, > but before you update the team blog, could you tolerate one more minor DB > change -- I'd like to rename WEBSITE to WEBLOG, as mentioned earlier. It's > a one-line statement in the upgrade script. The Derby folks are making good > progress on fixing their renaming issue (https://issues.apache.org/ > jira/browse/DERBY-6672), but for the time being I'll mention on the team > blog that automated upgrading for Derby users may not be possible due to > this issue until the next release of Derby is out, that if Derby users have > just a few blog entries they may wish to start with a fresh installation > and manually copy the old blog entries over. Derby users generally don't > have tons of blog entries, I'd rather have a clearer data model for 100% > even if it means a little bit more work for some upgraders. > > Thanks, > Glen > > > On 07/20/2014 04:28 PM, Dave wrote: > >> On Mon, Jul 14, 2014 at 4:22 PM, <gma...@apache.org> wrote: >> >> >> Modified: roller/trunk/app/src/main/resources/sql/macros.vm >>> URL: >>> http://svn.apache.org/viewvc/roller/trunk/app/src/main/ >>> resources/sql/macros.vm?rev=1610513&r1=1610512&r2=1610513&view=diff >>> >>> ============================================================ >>> ================== >>> --- roller/trunk/app/src/main/resources/sql/macros.vm (original) >>> +++ roller/trunk/app/src/main/resources/sql/macros.vm Mon Jul 14 >>> 20:22:00 >>> 2014 >>> @@ -82,6 +82,20 @@ Define non-null column with default valu >>> #end >>> #end >>> >>> +#** >>> +Rename a table. >>> +For Derby, will not work if there is a view or foreign key that >>> references the table. >>> +MySQL requires sp_rename command; unsure if works. >>> +**# >>> +#macro(renameTable $oldTableName $newTableName) >>> +#if ($db.DBTYPE == 'POSTGRESQL' || $db.DBTYPE == 'HSQLDB') >>> +alter table $oldTableName rename to $newTableName; >>> +#elseif ($db.DBTYPE == 'MYSQL') >>> +sp_rename '$oldTableName', '$newTableName'; >>> +#else >>> +rename table $oldTableName TO $newTableName; >>> +#end >>> +#end >>> >>> >> Hi Glenn, >> >> The correct syntax for MySQL is "rename table a to b" and not sp_rename. >> >> Did you mean to use sp_rename for MS SQL Server instead? >> >> - Dave >> >> >