Changes between Initial Version and Version 1 of Upgrade_Database


Ignore:
Timestamp:
2010-07-15T17:54:23Z (14 years ago)
Author:
Pan Luo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Upgrade_Database

    v1 v1  
     1This page describes the steps for developer to change the database structure and creating the upgrade files.
     2
     3When user installed a new version of iPeer, in which the database structures changed, user will be notified to run the upgrade script to upgrade database.
     4
     5To do a database upgrade, please follow the steps below:
     6 * Make the database changes and do the development. Remember the changes.
     7 * Create a file under app/config/sql, name it as delta_#.sql, where # is the next database version. To find out the current version, check the line "define('DATABASE_VERSION', #);" in app/config/core.php. The next version will be current version +1.
     8 * Change the database version in app/config/core.php from:
     9{{{
     10#!php
     11define('DATABASE_VERSION', #);
     12}}}
     13 To
     14{{{
     15#!php
     16define('DATABASE_VERSION', #+1);
     17}}}
     18 Replace "#+1" with the real number
     19 * Change the database version (#) in line
     20{{{
     21#!sql
     22(19, 'database.version', '#', 'I', 'database version', 'A', 0, NOW(), NULL , NOW());
     23}}}
     24 in app/config/sql/ipeer.sql to current version (#+1)
     25 * Done