You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@roller.apache.org by Dave Johnson <da...@rollerweblogger.org> on 2005/11/04 19:17:24 UTC

Re: svn commit: r330823 - /incubator/roller/branches/roller_1.x/metadata/database/120-to-130-migration-raw.sql

I just committed that as well...

Roller 1.3 file upload underway.

- Dave



On Nov 4, 2005, at 12:41 PM, Allen Gilliland wrote:

> I just tried the script on mysql and the syntax is not quite correct.   
> We need to do this ...
>
> alter table website modify defaultpageid varchar(48) DEFAULT '';
>
> -- Allen
>
>
> On Fri, 2005-11-04 at 09:31, Allen Gilliland wrote:
>> Sorry if I am being overly picky, but I do not think this is the  
>> right way to apply this database change.
>>
>> Someone who just runs that script is guaranteed to get an error from  
>> one of those 2 statements.  I think we need to have a solution that  
>> only puts the correct statement in the script for each database.
>>
>> The method that I used was to do this ...
>>
>> @ALTER_PUBTIME_ALLOW_NULL@;
>>
>> and then in each respective db_xxx.properties file you define that  
>> variable and put the alter table syntax for that specific database.   
>> I am not fond of doing it this way, but in our current system for  
>> generating db scripts that's the only way to do it.
>>
>> personally, I am quickly leaning in favor of maintaining the database  
>> scripts for each db separately and ditching the whole "-raw" thing  
>> because it's starting to make things confusing.  Instead we would  
>> just have a directory for each db we support and it would be the  
>> responsibility of whoever is using/testing that db to make sure their  
>> scripts are up to date for each release.  since we only do db upgrade  
>> scripts between major releases now I don't think that would be a big  
>> deal.
>>
>> -- Allen
>>
>>
>> On Fri, 2005-11-04 at 07:09, snoopdave@apache.org wrote:
>>> Author: snoopdave
>>> Date: Fri Nov  4 07:09:56 2005
>>> New Revision: 330823
>>>
>>> URL: http://svn.apache.org/viewcvs?rev=330823&view=rev
>>> Log:
>>> Added note and MySQL specific alter table syntax
>>>
>>> Modified:
>>>      
>>> incubator/roller/branches/roller_1.x/metadata/database/120-to-130- 
>>> migration-raw.sql
>>>
>>> Modified:  
>>> incubator/roller/branches/roller_1.x/metadata/database/120-to-130- 
>>> migration-raw.sql
>>> URL:  
>>> http://svn.apache.org/viewcvs/incubator/roller/branches/roller_1.x/ 
>>> metadata/database/120-to-130-migration-raw.sql? 
>>> rev=330823&r1=330822&r2=330823&view=diff
>>> ===================================================================== 
>>> =========
>>> ---  
>>> incubator/roller/branches/roller_1.x/metadata/database/120-to-130- 
>>> migration-raw.sql (original)
>>> +++  
>>> incubator/roller/branches/roller_1.x/metadata/database/120-to-130- 
>>> migration-raw.sql Fri Nov  4 07:09:56 2005
>>> @@ -1,3 +1,10 @@
>>>
>>> --- when using a shared theme, website need not track defauld page id
>>> +-- 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;
>>>
>>>
>>
>