Changeset 1599


Ignore:
Timestamp:
Nov 9, 2006, 11:13:33 PM (17 years ago)
Author:
plg
Message:

New: upgrade script from 1.6.0 (or 1.6.1) to 1.6.2.
#user_infos.auto_login_key is added in upgrade_1.6.0.php instead of
upgrade_1.5.0.php.

Bug fixed: the database structure dump was starting with a "1", very
interesting typo!

Bug fixed: the database structure dump was adding #user_infos.auto_login_key
nullable while the upgrade file was adding it not nullable.

Location:
branches/branch-1_6
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/branch-1_6/install/phpwebgallery_structure.sql

    r1554 r1599  
    1 1-- MySQL dump 9.11
     1-- MySQL dump 9.11
    22--
    33-- Host: localhost    Database: pwg-1_6
     
    319319  `registration_date` datetime NOT NULL default '0000-00-00 00:00:00',
    320320  `enabled_high` enum('true','false') NOT NULL default 'true',
     321  `auto_login_key` varchar(64) NOT NULL default '',
    321322  UNIQUE KEY `user_infos_ui1` (`user_id`)
    322323) TYPE=MyISAM;
     
    346347  `password` varchar(32) default NULL,
    347348  `mail_address` varchar(255) default NULL,
    348   `auto_login_key` varchar(64) default NULL,
    349349  PRIMARY KEY  (`id`),
    350350  UNIQUE KEY `users_ui1` (`username`)
  • branches/branch-1_6/install/upgrade_1.5.0.php

    r1554 r1599  
    469469}
    470470
    471 $query = '
    472 ALTER TABLE '.PREFIX_TABLE.'users
    473   ADD auto_login_key varchar(64) NOT NULL
    474 ;';
    475 pwg_query($query);
     471// now we upgrade from 1.6.0 to 1.6.2
     472include_once(PHPWG_ROOT_PATH.'install/upgrade_1.6.0.php');
    476473?>
  • branches/branch-1_6/upgrade.php

    r1319 r1599  
    182182    $current_release = '1.5.0';
    183183  }
     184  else if (!in_array('auto_login_key', $columns_of[PREFIX_TABLE.'user_infos']))
     185  {
     186    $current_release = '1.6.0';
     187  }
    184188  else
    185189  {
    186     die('You are already on branch 1.6, no upgrade required');
     190    die('No upgrade required, the database structure is up to date');
    187191  }
    188192 
     
    224228          'id'          => $upgrade_id,
    225229          'applied'     => CURRENT_DATE,
    226           'description' => 'upgrade included in upgrade',
     230          'description' => 'upgrade included in migration',
    227231          )
    228232        );
Note: See TracChangeset for help on using the changeset viewer.