-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '2.2/develop' into 2.2/master
- Loading branch information
Showing
8 changed files
with
190 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | ||
/** | ||
* Update Nova from 2.2.2 to 2.2.3 | ||
*/ | ||
$system_info = null; | ||
$add_tables = null; | ||
$drop_tables = null; | ||
$rename_tables = null; | ||
$add_column = null; | ||
$modify_column = null; | ||
$drop_column = null; | ||
|
||
/** | ||
* Version info for the database | ||
*/ | ||
$system_info = array( | ||
'sys_last_update' => now(), | ||
'sys_version_major' => 2, | ||
'sys_version_minor' => 2, | ||
'sys_version_update' => 3, | ||
); | ||
|
||
/* | ||
|--------------------------------------------------------------- | ||
| TABLES TO ADD | ||
| | ||
| $add_tables = array( | ||
| 'table_name' => array( | ||
| 'id' => 'table_id', | ||
| 'fields' => 'fields_table_name') | ||
| ); | ||
| | ||
| $fields_table_name = array( | ||
| 'table_id' => array( | ||
| 'type' => 'INT', | ||
| 'constraint' => 6, | ||
| 'auto_increment' => TRUE), | ||
| 'table_field_1' => array( | ||
| 'type' => 'VARCHAR', | ||
| 'constraint' => 255, | ||
| 'default' => ''), | ||
| 'table_field_2' => array( | ||
| 'type' => 'INT', | ||
| 'constraint' => 4, | ||
| 'default' => '99') | ||
| ); | ||
|--------------------------------------------------------------- | ||
*/ | ||
|
||
if ($add_tables !== null) | ||
{ | ||
foreach ($add_tables as $key => $value) | ||
{ | ||
$this->dbforge->add_field($$value['fields']); | ||
$this->dbforge->add_key($value['id'], true); | ||
$this->dbforge->create_table($key, true); | ||
} | ||
} | ||
|
||
/* | ||
|--------------------------------------------------------------- | ||
| TABLES TO DROP | ||
| | ||
| $drop_tables = array('table_name'); | ||
|--------------------------------------------------------------- | ||
*/ | ||
|
||
if ($drop_tables !== null) | ||
{ | ||
foreach ($drop_tables as $value) | ||
{ | ||
$this->dbforge->drop_table($value); | ||
} | ||
} | ||
|
||
/* | ||
|--------------------------------------------------------------- | ||
| TABLES TO RENAME | ||
| | ||
| $rename_tables = array('old_table_name' => 'new_table_name'); | ||
|--------------------------------------------------------------- | ||
*/ | ||
|
||
if ($rename_tables !== null) | ||
{ | ||
foreach ($rename_tables as $key => $value) | ||
{ | ||
$this->dbforge->rename_table($key, $value); | ||
} | ||
} | ||
|
||
/* | ||
|--------------------------------------------------------------- | ||
| COLUMNS TO ADD | ||
| | ||
| $add_column = array( | ||
| 'table_name' => array( | ||
| 'field_name_1' => array('type' => 'TEXT'), | ||
| 'field_name_2' => array( | ||
| 'type' => 'VARCHAR', | ||
| 'constraint' => 100) | ||
| ) | ||
| ); | ||
|--------------------------------------------------------------- | ||
*/ | ||
|
||
if ($add_column !== null) | ||
{ | ||
foreach ($add_column as $key => $value) | ||
{ | ||
$this->dbforge->add_column($key, $value); | ||
} | ||
} | ||
|
||
/* | ||
|--------------------------------------------------------------- | ||
| COLUMNS TO MODIFY | ||
| | ||
| $modify_column = array( | ||
| 'table_name' => array( | ||
| 'old_field_name' => array( | ||
| 'name' => 'new_field_name', | ||
| 'type' => 'TEXT') | ||
| ) | ||
| ); | ||
|--------------------------------------------------------------- | ||
*/ | ||
|
||
if ($modify_column !== null) | ||
{ | ||
foreach ($modify_column as $key => $value) | ||
{ | ||
$this->dbforge->modify_column($key, $value); | ||
} | ||
} | ||
|
||
/* | ||
|--------------------------------------------------------------- | ||
| COLUMNS TO DROP | ||
| | ||
| $drop_column = array( | ||
| 'table_name' => array('field_name') | ||
| ); | ||
|--------------------------------------------------------------- | ||
*/ | ||
|
||
if ($drop_column !== null) | ||
{ | ||
foreach ($drop_column as $key => $value) | ||
{ | ||
$this->dbforge->drop_column($key, $value[0]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
version: 2.2.2 | ||
version: 2.2.3 | ||
version_major: 2 | ||
version_minor: 2 | ||
version_update: 2 | ||
version_update: 3 | ||
severity: minor | ||
notes: | | ||
Nova 2.2.2 fixes an issue where certain users couldn't create or edit wiki pages as well as an error thrown when managing NPCs (thanks to evshell18 for the pull request on this one). | ||
Nova 2.2.3 attempts to fix a long-standing issue for some users when updating to newer versions of Nova. | ||
date: 27 March 2013 | ||
link: http://www.anodyne-productions.com/nova/index.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters