aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/schemas
diff options
context:
space:
mode:
authorDavid King <imkingdavid@gmail.com>2013-02-06 12:25:13 -0500
committerDavid King <imkingdavid@gmail.com>2013-02-06 12:25:13 -0500
commiteffaef6bddf49b9016d66bd64706392fcdb452b3 (patch)
treeb2fc1cba8a269453e5a1ec7667141e69a8d34429 /phpBB/install/schemas
parent1e5a1b72dca4e0ccae9340467225499649dea6c8 (diff)
parent77df9109b61ec93c28a8120a8d81a045961b24ac (diff)
downloadforums-effaef6bddf49b9016d66bd64706392fcdb452b3.tar
forums-effaef6bddf49b9016d66bd64706392fcdb452b3.tar.gz
forums-effaef6bddf49b9016d66bd64706392fcdb452b3.tar.bz2
forums-effaef6bddf49b9016d66bd64706392fcdb452b3.tar.xz
forums-effaef6bddf49b9016d66bd64706392fcdb452b3.zip
Merge remote-tracking branch 'EXreaction/feature/migrations' into develop
* EXreaction/feature/migrations: (48 commits) [feature/migrations] Remove default values from necessary parameters [feature/migrations] Revert unrelated changes to functions.php [ticket/9737] Fix some comments [ticket/9737] Fix a few minor things in migrations [feature/migrations] Make sure migration data not done before running data step [feature/migrations] Function to populate the migrations table (for install) [feature/migrations] Function effectively_installed() in migrations [feature/migrations] Make load_migrations recursive (optionally) [feature/migrations] Make the test depends_on methods static [feature/migrations] Make depends_on static to call it without dependencies [feature/migrations] install/database_update_migrations.php [feature/migrations] Move test.php -> install/database_update_migrations.php [feature/migrations] Store depends on in the database (serialized) [feature/migrations] Revert method completed [feature/migrations] Basic reverting test [feature/migrations] Test for calling a step multiple times [feature/migrations] Creating revert method to attempt reverting a migration [feature/migrations] Some comments in db_tools [feature/migrations] Reverse data functionality [feature/migrations] Comment ... Conflicts: phpBB/install/schemas/firebird_schema.sql phpBB/install/schemas/mssql_schema.sql phpBB/install/schemas/mysql_40_schema.sql phpBB/install/schemas/mysql_41_schema.sql phpBB/install/schemas/oracle_schema.sql phpBB/install/schemas/postgres_schema.sql phpBB/install/schemas/sqlite_schema.sql
Diffstat (limited to 'phpBB/install/schemas')
-rw-r--r--phpBB/install/schemas/firebird_schema.sql14
-rw-r--r--phpBB/install/schemas/mssql_schema.sql22
-rw-r--r--phpBB/install/schemas/mysql_40_schema.sql13
-rw-r--r--phpBB/install/schemas/mysql_41_schema.sql13
-rw-r--r--phpBB/install/schemas/oracle_schema.sql16
-rw-r--r--phpBB/install/schemas/postgres_schema.sql15
-rw-r--r--phpBB/install/schemas/sqlite_schema.sql13
7 files changed, 106 insertions, 0 deletions
diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql
index bd97fefb36..c4818215e4 100644
--- a/phpBB/install/schemas/firebird_schema.sql
+++ b/phpBB/install/schemas/firebird_schema.sql
@@ -586,6 +586,20 @@ CREATE TABLE phpbb_moderator_cache (
CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache(display_on_index);;
CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache(forum_id);;
+# Table: 'phpbb_migrations'
+CREATE TABLE phpbb_migrations (
+ migration_name VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ migration_depends_on BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL,
+ migration_schema_done INTEGER DEFAULT 0 NOT NULL,
+ migration_data_done INTEGER DEFAULT 0 NOT NULL,
+ migration_data_state BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL,
+ migration_start_time INTEGER DEFAULT 0 NOT NULL,
+ migration_end_time INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_migrations ADD PRIMARY KEY (migration_name);;
+
+
# Table: 'phpbb_modules'
CREATE TABLE phpbb_modules (
module_id INTEGER NOT NULL,
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql
index bb0890e439..709f83917e 100644
--- a/phpBB/install/schemas/mssql_schema.sql
+++ b/phpBB/install/schemas/mssql_schema.sql
@@ -717,6 +717,28 @@ GO
/*
+ Table: 'phpbb_migrations'
+*/
+CREATE TABLE [phpbb_migrations] (
+ [migration_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [migration_depends_on] [varchar] (8000) DEFAULT ('') NOT NULL ,
+ [migration_schema_done] [int] DEFAULT (0) NOT NULL ,
+ [migration_data_done] [int] DEFAULT (0) NOT NULL ,
+ [migration_data_state] [varchar] (8000) DEFAULT ('') NOT NULL ,
+ [migration_start_time] [int] DEFAULT (0) NOT NULL ,
+ [migration_end_time] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_migrations] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_migrations] PRIMARY KEY CLUSTERED
+ (
+ [migration_name]
+ ) ON [PRIMARY]
+GO
+
+
+/*
Table: 'phpbb_modules'
*/
CREATE TABLE [phpbb_modules] (
diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql
index bf3d7fecfa..c905dda77e 100644
--- a/phpBB/install/schemas/mysql_40_schema.sql
+++ b/phpBB/install/schemas/mysql_40_schema.sql
@@ -410,6 +410,19 @@ CREATE TABLE phpbb_moderator_cache (
);
+# Table: 'phpbb_migrations'
+CREATE TABLE phpbb_migrations (
+ migration_name varbinary(255) DEFAULT '' NOT NULL,
+ migration_depends_on blob NOT NULL,
+ migration_schema_done tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ migration_data_done tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ migration_data_state blob NOT NULL,
+ migration_start_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ migration_end_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (migration_name)
+);
+
+
# Table: 'phpbb_modules'
CREATE TABLE phpbb_modules (
module_id mediumint(8) UNSIGNED NOT NULL auto_increment,
diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql
index 372b63d83c..b5d7c70c10 100644
--- a/phpBB/install/schemas/mysql_41_schema.sql
+++ b/phpBB/install/schemas/mysql_41_schema.sql
@@ -410,6 +410,19 @@ CREATE TABLE phpbb_moderator_cache (
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+# Table: 'phpbb_migrations'
+CREATE TABLE phpbb_migrations (
+ migration_name varchar(255) DEFAULT '' NOT NULL,
+ migration_depends_on text NOT NULL,
+ migration_schema_done tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ migration_data_done tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ migration_data_state text NOT NULL,
+ migration_start_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ migration_end_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (migration_name)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
# Table: 'phpbb_modules'
CREATE TABLE phpbb_modules (
module_id mediumint(8) UNSIGNED NOT NULL auto_increment,
diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql
index 671347ebe1..e2bdb2385b 100644
--- a/phpBB/install/schemas/oracle_schema.sql
+++ b/phpBB/install/schemas/oracle_schema.sql
@@ -799,6 +799,22 @@ CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache (forum_id)
/
/*
+ Table: 'phpbb_migrations'
+*/
+CREATE TABLE phpbb_migrations (
+ migration_name varchar2(255) DEFAULT '' ,
+ migration_depends_on clob DEFAULT '' ,
+ migration_schema_done number(1) DEFAULT '0' NOT NULL,
+ migration_data_done number(1) DEFAULT '0' NOT NULL,
+ migration_data_state clob DEFAULT '' ,
+ migration_start_time number(11) DEFAULT '0' NOT NULL,
+ migration_end_time number(11) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_migrations PRIMARY KEY (migration_name)
+)
+/
+
+
+/*
Table: 'phpbb_modules'
*/
CREATE TABLE phpbb_modules (
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index 4c13bf0ba9..41d510e4c3 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -573,6 +573,21 @@ CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache (display_on
CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache (forum_id);
/*
+ Table: 'phpbb_migrations'
+*/
+CREATE TABLE phpbb_migrations (
+ migration_name varchar(255) DEFAULT '' NOT NULL,
+ migration_depends_on varchar(8000) DEFAULT '' NOT NULL,
+ migration_schema_done INT2 DEFAULT '0' NOT NULL CHECK (migration_schema_done >= 0),
+ migration_data_done INT2 DEFAULT '0' NOT NULL CHECK (migration_data_done >= 0),
+ migration_data_state varchar(8000) DEFAULT '' NOT NULL,
+ migration_start_time INT4 DEFAULT '0' NOT NULL CHECK (migration_start_time >= 0),
+ migration_end_time INT4 DEFAULT '0' NOT NULL CHECK (migration_end_time >= 0),
+ PRIMARY KEY (migration_name)
+);
+
+
+/*
Table: 'phpbb_modules'
*/
CREATE SEQUENCE phpbb_modules_seq;
diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql
index 46a96a1edd..fe028bd12c 100644
--- a/phpBB/install/schemas/sqlite_schema.sql
+++ b/phpBB/install/schemas/sqlite_schema.sql
@@ -398,6 +398,19 @@ CREATE TABLE phpbb_moderator_cache (
CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache (display_on_index);
CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache (forum_id);
+# Table: 'phpbb_migrations'
+CREATE TABLE phpbb_migrations (
+ migration_name varchar(255) NOT NULL DEFAULT '',
+ migration_depends_on text(65535) NOT NULL DEFAULT '',
+ migration_schema_done INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ migration_data_done INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ migration_data_state text(65535) NOT NULL DEFAULT '',
+ migration_start_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ migration_end_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ PRIMARY KEY (migration_name)
+);
+
+
# Table: 'phpbb_modules'
CREATE TABLE phpbb_modules (
module_id INTEGER PRIMARY KEY NOT NULL ,