aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-03-04 08:25:36 +0100
committerJoas Schilling <nickvergessen@gmx.de>2014-03-04 08:25:36 +0100
commita3627a9ff767631121c70a00ca17d99a3533ad31 (patch)
tree019fe876d2414e2cd30697010bf69c70d280b791 /phpBB/phpbb/db/migration/data/v310/profilefield_website_cleanup.php
parent[ticket/12187] Remove user_website functionality (diff)
downloadphpbb-a3627a9ff767631121c70a00ca17d99a3533ad31.tar.gz
phpbb-a3627a9ff767631121c70a00ca17d99a3533ad31.tar.bz2
phpbb-a3627a9ff767631121c70a00ca17d99a3533ad31.zip
[ticket/12187] Remove user_website field
PHPBB3-12187
Diffstat (limited to 'phpBB/phpbb/db/migration/data/v310/profilefield_website_cleanup.php')
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_website_cleanup.php47
1 files changed, 47 insertions, 0 deletions
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_website_cleanup.php b/phpBB/phpbb/db/migration/data/v310/profilefield_website_cleanup.php
new file mode 100644
index 0000000000..9a4d724347
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_website_cleanup.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 profilefield_website_cleanup extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return !$this->db_tools->sql_column_exists($this->table_prefix . 'users', 'user_website');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\profilefield_website',
+ );
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_website',
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_website' => array('VCHAR_UNI:200', ''),
+ ),
+ ),
+ );
+ }
+}