Re: Database schema upgrade in Maia-dev releases

"Ian R. Justman" <ianj-/[email protected]>
Newsgroups gmane.mail.virus.maiamailguard
Message-ID <[email protected]>
Here's a super-simplified version of what I used, which neglects the 
contents of the two columns dropped from users which would have been 
moved to maia_users since this was from my personal mailserver, which 
serves only me, and those values were all their default values, which 
happens to be the same when I ALTER TABLE ADD the target tables to add 
those columns.

----------- BEGIN --------------

alter table awl add signedby varchar(255) NOT NULL default '';
alter table awl add lastupdate timestamp NOT NULL default 
CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
drop table maia_auth;
alter table maia_domains add routing_domain varchar(255) DEFAULT '' NOT 
NULL;
alter table maia_domains add transport varchar(255) DEFAULT ':' NOT NULL;
alter table maia_mail add autolearn_status varchar(15) NOT NULL DEFAULT 
'unavailable';
alter table maia_users add spamtrap char(1) DEFAULT 'N' NOT NULL after 
charset;
alter table maia_users add discard_ham char(1) DEFAULT 'N' NOT NULL 
after ham_cache_sort;
alter table users drop column spamtrap;
alter table users drop column discard_ham;
update schema_info set version=15;

-------------END ---------------

On 02/03/2016 12:26, Dave Overton wrote:
> What you see is exactly what the tool (Mysql Workbench) spit out.  I was
> digging around, found the Mysql tool that will do what is proper and create
> the .sql file to modify the scheme.  Will post its results later.
>
>
>
>> -----Original Message-----
>> From: Brian McCullough [mailto:[email protected]]
>> Sent: Wednesday, February 03, 2016 6:04 AM
>> To: Dave Overton
>> Cc: [email protected]
>> Subject: Re: [Maia-users] Database schema upgrade in Maia-dev releases
>>
>> On Wed, Feb 03, 2016 at 01:38:15AM -0800, Dave Overton wrote:
>>> Here are scheme changes from 1.0.2c to 1.0.4.  I am sure someone
>> could script this to update the old DB, thats past my skillset, but hey
>> at least we know what the changes are.  I think probably the other
>> ideas are better, dump and restore to the new scheme, but here are the
>> actual changes.
>>
>>
>> Dave,
>>
>> In your listing, you show the following sequence several times: "added
>> index," followed by "removed index."
>>
>> Were the changes actually in that order, or were they perhaps more
>> like:
>> "removed index," following by "add ( new, replacement ) index?"
>>
>>
>>
>> Thanks,
>> Brian
>
>
> _______________________________________________
> Maia-users mailing list
> [email protected]
> http://www.renaissoft.com/cgi-bin/mailman/listinfo/maia-users
>

-- 
Ian R. Justman
UNIX hacker.  Anime fan.  Any questions?
ianj (at) ian-justman.com
Please direct business correspondence to my new address, biz (at) 
ian-justman.com. (04/27/2015)
_______________________________________________
Maia-users mailing list
[email protected]
http://www.renaissoft.com/cgi-bin/mailman/listinfo/maia-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.