Changes between Version 2 and Version 3 of Upgrade_Database
- Timestamp:
- 2010-07-16T07:00:19Z (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Upgrade_Database
v2 v3 1 This page describes the steps for developer to change the database structure and creating the upgrade files. 1 This page describes the steps for developer to change the database structure and creating the upgrade files. If you are the end user, database upgrade will be done automatically for you when you run upgrade script after you login as admin. 2 2 3 3 When 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. … … 6 6 * Make the database changes and do the development. Remember the changes. 7 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 * Copy the SQL statements for changing the database in 9 * Change the database version in app/config/core.php from:8 * Copy the SQL statements for changing the database into delta file. 9 * Update the database version in app/config/core.php from: 10 10 {{{ 11 11 #!php … … 17 17 define('DATABASE_VERSION', #+1); 18 18 }}} 19 Replace "#+1" with the real number 20 * Change the database version (#) in line 21 {{{ 22 #!sql 23 (19, 'database.version', '#', 'I', 'database version', 'A', 0, NOW(), NULL , NOW()); 24 }}} 25 in app/config/sql/ipeer.sql to current version (#+1) 26 * Done 19 Replace "#+1" with the real number. 20 * That's it.