|
Revision 432, 0.7 KB
(checked in by michiel, 20 months ago)
|
|
honor my own code ;)
|
| Line | |
|---|
| 1 | This directory holds upgrades for MvBlog. |
|---|
| 2 | |
|---|
| 3 | For svn development version and branched version: |
|---|
| 4 | Every database upgrade file should be named: YYYYmmddXX.php where XX is |
|---|
| 5 | sequence number for that day starting at 00 |
|---|
| 6 | |
|---|
| 7 | For svn release tag or the tarball: |
|---|
| 8 | Every database upgrade file should be named: <version>to<version>.php |
|---|
| 9 | for example: 2.0to2.1.php |
|---|
| 10 | |
|---|
| 11 | The content of an upgrade file should be: |
|---|
| 12 | <?php |
|---|
| 13 | $sql = array( |
|---|
| 14 | "ALTER TABLE foo ADD COLUMN bar VARCHAR(255);", |
|---|
| 15 | "UPDATE foo SET bar='foobar';", |
|---|
| 16 | "DROP TABLE foobar;" |
|---|
| 17 | ); |
|---|
| 18 | ?> |
|---|
| 19 | |
|---|
| 20 | The subdirectory backups is there to create backups before starting an upgrade. |
|---|
| 21 | It is also used by the (yet to be build) backup/restore functions in the admin backend. |
|---|
| 22 | Make sure this directory is writable by the webserver |
|---|