diff options
| author | Nils Adermann <naderman@naderman.de> | 2014-03-29 16:29:33 -0400 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2014-03-29 16:29:33 -0400 |
| commit | 308e8b0c9689334ef45fad9a9ed0f0ae63746bc7 (patch) | |
| tree | 8f31cf74280c12ef0aae139b24e1ed78207b8445 /phpBB/phpbb/db/migration/data/v310 | |
| parent | f426fa02951b5131f77ad2c4596a0bd87ef23d84 (diff) | |
| parent | 8824a53b0a539d63fe10e5e12ef1889fe90d4187 (diff) | |
| download | forums-308e8b0c9689334ef45fad9a9ed0f0ae63746bc7.tar forums-308e8b0c9689334ef45fad9a9ed0f0ae63746bc7.tar.gz forums-308e8b0c9689334ef45fad9a9ed0f0ae63746bc7.tar.bz2 forums-308e8b0c9689334ef45fad9a9ed0f0ae63746bc7.tar.xz forums-308e8b0c9689334ef45fad9a9ed0f0ae63746bc7.zip | |
Merge remote-tracking branch 'github-nickvergessen/ticket/11459' into develop-ascraeus
* github-nickvergessen/ticket/11459: (21 commits)
[ticket/11459] Make 3.1.0-dev migration depend on migrations_table
[ticket/11459] Move $supported_dbms to beginning of create schema file
[ticket/11459] Fix missing constant CONFIG_TABLE for sql_create_index()
[ticket/11459] Fix auth provider test
[ticket/11459] Correctly set up the database from schema in unit tests
[ticket/11459] Install DB schema from json file
[ticket/11459] Clean up a little more
[ticket/11459] Do not add table schema to database schema files
[ticket/11459] Create schema.json from migration files
[ticket/11459] Do not take files of extensions into account
[ticket/11459] Pass array with migration class names to schema generator
[ticket/11459] Refresh schema files
[ticket/11459] Remove spaces from the end of lines in MSSQL
[ticket/11459] Correctly handle index column length
[ticket/11459] Add migration for migrations table
[ticket/11459] Update doc blocks
[ticket/11459] Remove old schema file
[ticket/11459] Update schema files with new script
[ticket/11459] Use new migration/schema_generator to create schema files
[ticket/11459] Add Schema from 3.0.0
...
Diffstat (limited to 'phpBB/phpbb/db/migration/data/v310')
| -rw-r--r-- | phpBB/phpbb/db/migration/data/v310/dev.php | 1 | ||||
| -rw-r--r-- | phpBB/phpbb/db/migration/data/v310/migrations_table.php | 47 |
2 files changed, 48 insertions, 0 deletions
diff --git a/phpBB/phpbb/db/migration/data/v310/dev.php b/phpBB/phpbb/db/migration/data/v310/dev.php index c1db883616..83611d3731 100644 --- a/phpBB/phpbb/db/migration/data/v310/dev.php +++ b/phpBB/phpbb/db/migration/data/v310/dev.php @@ -23,6 +23,7 @@ class dev extends \phpbb\db\migration\migration '\phpbb\db\migration\data\v310\style_update_p2', '\phpbb\db\migration\data\v310\timezone_p2', '\phpbb\db\migration\data\v310\reported_posts_display', + '\phpbb\db\migration\data\v310\migrations_table', ); } diff --git a/phpBB/phpbb/db/migration/data/v310/migrations_table.php b/phpBB/phpbb/db/migration/data/v310/migrations_table.php new file mode 100644 index 0000000000..e70fd35819 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/migrations_table.php @@ -0,0 +1,47 @@ +<?php +/** +* +* @package migration +* @copyright (c) 2014 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +namespace phpbb\db\migration\data\v310; + +class migrations_table extends \phpbb\db\migration\migration +{ + public function effectively_installed() + { + return $this->db_tools->sql_table_exists($this->table_prefix . 'migrations'); + } + + public function update_schema() + { + return array( + 'add_tables' => array( + $this->table_prefix . 'migrations' => array( + 'COLUMNS' => array( + 'migration_name' => array('VCHAR', ''), + 'migration_depends_on' => array('TEXT', ''), + 'migration_schema_done' => array('BOOL', 0), + 'migration_data_done' => array('BOOL', 0), + 'migration_data_state' => array('TEXT', ''), + 'migration_start_time' => array('TIMESTAMP', 0), + 'migration_end_time' => array('TIMESTAMP', 0), + ), + 'PRIMARY_KEY' => 'migration_name', + ), + ), + ); + } + + public function revert_schema() + { + return array( + 'drop_tables' => array( + $this->table_prefix . 'migrations', + ), + ); + } +} |
