>
>
> Tom Collins wrote:
>
>> On Dec 23, 2006, at 6:41 PM, Rick Widmer wrote:
>>
>>> - SQL backend fixes - Extend length of domain from 64 to 96 in all
>>> database backends.  Add delete_spamassassin and delete_spam to the
>>> limits table.  REQUIRES DATABASE STRUCTURE CHANGES!
>>
>> Since MySQL is the most common SQL backend, we should include the SQL
>> statements (ALTER TABLE) someone would have to use to make the
>> necessary changes.
>
> I have a description of the changes in UPGRADE and have asked Joshua if
> he has the SQL statements available.  If not I'll figure them out and
> update UPGRADE.
>

The following assumes that '--enable-many-domains' is used.  If you use
'--disable-many-domains', then you need to replace the ALTER command for
the 'vpopmail' table with one for each domain table.  Also, the
'ip_alias_map', 'vlog' and 'limits' tables only exist if the various
configuration options are enabled, so they may or may not be relevant (I
only use the latter 2, but I got the ip_alias_map tablename from looking
at the code).

ALTER TABLE `dir_control` CHANGE `domain` `domain` CHAR( 96 ) NOT NULL;
ALTER TABLE `ip_alias_map` CHANGE `domain` `domain` CHAR( 96 ) NOT NULL;
ALTER TABLE `lastauth` CHANGE `domain` `domain` CHAR( 96 ) NOT NULL;
ALTER TABLE `limits` CHANGE `domain` `domain` CHAR( 96 ) NOT NULL , ADD
`disable_spamassassin` TINYINT( 1 ) DEFAULT '0' NOT NULL AFTER
`disable_smtp` , ADD `delete_spam` TINYINT( 1 ) DEFAULT '0' NOT NULL AFTER
`disable_spamassassin` ;
ALTER TABLE `valias` CHANGE `domain` `domain` CHAR( 96 ) NOT NULL;
ALTER TABLE `vlog` CHANGE `domain` `domain` CHAR( 96 ) NOT NULL;
ALTER TABLE `vpopmail` CHANGE `domain` `domain` CHAR( 96 ) NOT NULL;

I'm sure the optional statements can probably be encased inside some sort
of conditional, but my SQL knowledge is rather limited...

Josh
-- 
Joshua Megerman
SJGames MIB #5273 - OGRE AI Testing Division
You can't win; You can't break even; You can't even quit the game.
  - Layman's translation of the Laws of Thermodynamics
[EMAIL PROTECTED]


Reply via email to