Dave Johnson wrote:


On Nov 4, 2005, at 11:52 AM, Anil Gangolli wrote:

Dave, I'd just like to try an upgrade install test with this before releasing. I just downloaded it a while ago. I may need to get the latest to retest.


Much appreciated! - Dave


Hi. I did an upgrade install test; it worked with the following confusion: one inevitably will get an error running the db migration script. Both forms of statement to drop the "not null" restriction on defaultpageid are present for each database (see below). It works with an error message as long as the proper form for your database is first, or if whatever you use to execute the script will skip over the error without stopping; otherwise you never get to the working one. To be safe in general, the user has to comment out the wrong one; are we providing instructions to do this? Clearly, I didn't realize we were doing this. For 2.0 and beyond, I suggest we use Velocity not Ant filters to preprocess these in our build. This will allow us to use conditionals in the "raw" one to get the right form in each expanded one. There may be a way to do this with Ant filters too, but I don't know; if it is indeed easy to fix for 1.3, we should consider fixing it.

--a.

--------
Transcript of my db upgrade follows:

mysql> use roller;
Database changed
mysql> source 120-to-130-migration.sql
Query OK, 2 rows affected (0.45 sec)
Records: 2  Duplicates: 0  Warnings: 0

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not n
ull' at line 1
mysql> quit
Bye

THAT WAS ACTUALLY A SUCCESSFUL RUN.


C:\jakarta-tomcat-5.5.7\webapps\blog\WEB-INF\dbscripts\mysql>more 120-to-130-migration.sql

-- Upgrading from 1.2 to 1.3 requires one small change. The website table
-- column defaultpageid is now allowed to be null. Unfortunately, MySQL
-- requires non-standard alter table syntax for this.

-- So if you're on MySQL do this:
alter table website modify defaultpageid varchar(48);

-- And for all other databases do this:
alter table website alter column defaultpageid drop not null;

Reply via email to