Am 19.06.2013 15:46, schrieb Reindl Harald:
> 
> 
> Am 19.06.2013 15:36, schrieb Paul J Stevens:
>> On 06/19/2013 01:02 PM, Reindl Harald (mobile) wrote:
>>
>>> Uhm wouldn't it not be a good idea at least verify the scheme and
>>> spit out a big fat warning to the syslog and in general give
>>> dbmail-util a switch to apply scheme changes which should be
>>> called after any dbmail update instead deal with SQL dumps?
>>
>> How do you propose we do that?
> 
> what about having a meta-table which could be created
> at startup if it does not exist containing the version
> of the sql-scheme by a increasing number
> 
> if you make any change to the scheme raise the internal
> number, select what is currently applied in the metatable
> and the needed changes should be pretty clear i think

what i also maintain in our cms i a list of table/fields as
attached as text-file and based on table exists / field exists
they are added by calling "create.php"

in our case i hardly need this because there are around 300
cms-installations with currently 8000 tables on the main-webserver
and they are all deployed with a single cli-command from the admin
server followed with a implicit call to "create.php"

so if i add new functionality to the cms which may be only
enabled by configuration or not i can be sure that any
new sql-field to store a setting or whatever exists in all
setups and so the ones maintaining the customer can be sure
that it is safe to enable whatever option for whatever customer
  $new_fields = array
  (
   array('table'=>'blog',              'field'=>'blog_owner',             
'type'=>'int',       'length'=>4,    'unsigned'=>1),
   array('table'=>'blog',              'field'=>'blog_attachments',       
'type'=>'text'),
   array('table'=>'blog',              'field'=>'blog_keywords',          
'type'=>'text'),
   array('table'=>'blog',              'field'=>'blog_aktiv',             
'type'=>'tinyint',   'length'=>1,    'unsigned'=>1),
   array('table'=>'blog_keywords_ref', 'field'=>'blog_entry_group',       
'type'=>'tinyint',   'length'=>2,    'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_owner',               
'type'=>'int',       'length'=>4,    'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_modified',            
'type'=>'int',       'length'=>10,   'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_maxwidth',            
'type'=>'int',       'length'=>4,    'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_tn_width',            
'type'=>'int',       'length'=>4,    'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_tn_height',           
'type'=>'int',       'length'=>4,    'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_tn_limit',            
'type'=>'int',       'length'=>2,    'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_tn_lupe',             
'type'=>'tinyint',   'length'=>1,    'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_per_row',             
'type'=>'int',       'length'=>3,    'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_per_page',            
'type'=>'int',       'length'=>3,    'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_slide_delay',         
'type'=>'int',       'length'=>2,    'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_zoom',                
'type'=>'tinyint',   'length'=>1,    'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_show_title',          
'type'=>'tinyint',   'length'=>1,    'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_win_width',           
'type'=>'int',       'length'=>4,    'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_win_height',          
'type'=>'int',       'length'=>4,    'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_win_bgcolor',         
'type'=>'varchar',   'length'=>20,   'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_win_fontcolor',       
'type'=>'varchar',   'length'=>20,   'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_win_linkcolor',       
'type'=>'varchar',   'length'=>20,   'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_lightbox',            
'type'=>'tinyint',   'length'=>1,    'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_member_group',        
'type'=>'int',       'length'=>4,    'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_rnd_hr_bg',           
'type'=>'varchar',   'length'=>7),
   array('table'=>'galerie_sub',       'field'=>'gs_rnd_hr_bordercolor',  
'type'=>'varchar',   'length'=>7),
   array('table'=>'galerie_sub',       'field'=>'gs_rnd_hr_borders',      
'type'=>'tinyint',   'length'=>2,    'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_rnd_hr_enable',       
'type'=>'tinyint',   'length'=>1,    'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_rnd_hr_quality',      
'type'=>'int',       'length'=>3,    'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_rnd_hr_radius',       
'type'=>'tinyint',   'length'=>2,    'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_rnd_hr_transparent',  
'type'=>'varchar',   'length'=>7),
   array('table'=>'galerie_sub',       'field'=>'gs_rnd_tn_bg',           
'type'=>'varchar',   'length'=>7),
   array('table'=>'galerie_sub',       'field'=>'gs_rnd_tn_bordercolor',  
'type'=>'varchar',   'length'=>7),
   array('table'=>'galerie_sub',       'field'=>'gs_rnd_tn_borders',      
'type'=>'tinyint',   'length'=>2,    'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_rnd_tn_enable',       
'type'=>'tinyint',   'length'=>1,    'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_rnd_tn_quality',      
'type'=>'int',       'length'=>3,    'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_rnd_tn_radius',       
'type'=>'tinyint',   'length'=>2,    'unsigned'=>1),
   array('table'=>'galerie_sub',       'field'=>'gs_rnd_tn_transparent',  
'type'=>'varchar',   'length'=>7),
   array('table'=>'galerie_images',    'field'=>'gi_owner',               
'type'=>'int',       'length'=>4,    'unsigned'=>1),
   array('table'=>'galerie_images',    'field'=>'gi_disabled',            
'type'=>'tinyint',   'length'=>1,    'unsigned'=>1),
   array('table'=>'galerie_images',    'field'=>'gi_download',            
'type'=>'tinyint',   'length'=>1,    'unsigned'=>1),
   array('table'=>'galerie_images',    'field'=>'gi_download_file',       
'type'=>'varchar',   'length'=>255),
   array('table'=>'galerie_images',    'field'=>'gi_skat_fulltext',       
'type'=>'varchar',   'length'=>255),
   array('table'=>'galerie_images',    'field'=>'gi_url',                 
'type'=>'varchar',   'length'=>255),
   array('table'=>'galerie_images',    'field'=>'gi_kommentar',           
'type'=>'text'),
   array('table'=>'galerie_images',    'field'=>'gi_modified',            
'type'=>'int',       'length'=>10,   'unsigned'=>1),
   array('table'=>'haupt',             'field'=>'hstylesheet',            
'type'=>'tinyint',   'length'=>2,    'unsigned'=>1),
   array('table'=>'haupt',             'field'=>'hnotifymail',            
'type'=>'varchar',   'length'=>100),
   array('table'=>'haupt',             'field'=>'hrss',                   
'type'=>'text'),
   array('table'=>'sub',               'field'=>'sstylesheet',            
'type'=>'tinyint',   'length'=>2,    'unsigned'=>1),
   array('table'=>'sub',               'field'=>'srss',                   
'type'=>'text'),
   array('table'=>'sub',               'field'=>'simage_url',             
'type'=>'varchar',   'length'=>255),
   array('table'=>'sub2',              'field'=>'s2stylesheet',           
'type'=>'tinyint',   'length'=>2,    'unsigned'=>1),
   array('table'=>'sub2',              'field'=>'s2image_url',            
'type'=>'varchar',   'length'=>255),
   array('table'=>'sub2',              'field'=>'s2rss',                  
'type'=>'text'),
   array('table'=>'imagemeta',         'field'=>'iurl',                   
'type'=>'varchar',   'length'=>255),
   array('table'=>'imagemeta',         'field'=>'ikommentar',             
'type'=>'text'),
   array('table'=>'portal',            'field'=>'portal_news',            
'type'=>'tinyint',   'length'=>1,    'unsigned'=>1),
   array('table'=>'portal',            'field'=>'portal_create_time',     
'type'=>'int',       'length'=>10,   'unsigned'=>1),
   array('table'=>'portal',            'field'=>'portal_edit_time',       
'type'=>'int',       'length'=>10,   'unsigned'=>1),
   array('table'=>'portal',            'field'=>'portal_edit_uid',        
'type'=>'int',       'length'=>6,    'unsigned'=>1),
   array('table'=>'banner_counter',    'field'=>'cstunde',                
'type'=>'int',       'length'=>2,    'unsigned'=>1),
   array('table'=>'banner_counter',    'field'=>'ctag',                   
'type'=>'int',       'length'=>2,    'unsigned'=>1),
   array('table'=>'banner_counter',    'field'=>'cmonat',                 
'type'=>'int',       'length'=>2,    'unsigned'=>1),
   array('table'=>'banner_counter',    'field'=>'cjahr',                  
'type'=>'int',       'length'=>4,    'unsigned'=>1),
   array('table'=>'banner_counter',    'field'=>'cweekday',               
'type'=>'tinyint',   'length'=>2,    'unsigned'=>1),
   array('table'=>'banner_counter',    'field'=>'cunixtime',              
'type'=>'int',       'length'=>10,   'unsigned'=>1),
   array('table'=>'banner_gruppen',    'field'=>'gimg1',                  
'type'=>'tinyint',   'length'=>1,    'unsigned'=>1),
   array('table'=>'banner_gruppen',    'field'=>'gimg2',                  
'type'=>'tinyint',   'length'=>1,    'unsigned'=>1),
   array('table'=>'banner_gruppen',    'field'=>'gimg3',                  
'type'=>'tinyint',   'length'=>1,    'unsigned'=>1),
   array('table'=>'banner_gruppen',    'field'=>'gimg4',                  
'type'=>'tinyint',   'length'=>1,    'unsigned'=>1),
   array('table'=>'termine',           'field'=>'timage',                 
'type'=>'varchar',   'length'=>255),
   array('table'=>'ext_content',       'field'=>'ext_group',              
'type'=>'tinyint',   'length'=>2,    'unsigned'=>1),
   array('table'=>'glossar',           'field'=>'gl_disabled',            
'type'=>'tinyint',   'length'=>1,    'unsigned'=>1),
   array('table'=>'stg_sub2',          'field'=>'b2template',             
'type'=>'varchar',   'length'=>30),
   array('table'=>'haupt',             'field'=>'hschedule_on',           
'type'=>'int',       'length'=>10,   'unsigned'=>1),
   array('table'=>'haupt',             'field'=>'hschedule_off',          
'type'=>'int',       'length'=>10,   'unsigned'=>1),
   array('table'=>'sub',               'field'=>'sschedule_on',           
'type'=>'int',       'length'=>10,   'unsigned'=>1),
   array('table'=>'sub',               'field'=>'sschedule_off',          
'type'=>'int',       'length'=>10,   'unsigned'=>1),
   array('table'=>'sub2',              'field'=>'s2schedule_on',          
'type'=>'int',       'length'=>10,   'unsigned'=>1),
   array('table'=>'sub2',              'field'=>'s2schedule_off',         
'type'=>'int',       'length'=>10,   'unsigned'=>1),
  );

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
DBmail mailing list
DBmail@dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail

Reply via email to