Browse Source

! Clean up after ourselves

Signed-off-by: Michael Eshom <[email protected]>
Michael Eshom 10 years ago
parent
commit
ecc7977d37
3 changed files with 57 additions and 0 deletions
  1. 19 0
      other/upgrade_2-1_mysql.sql
  2. 19 0
      other/upgrade_2-1_postgresql.sql
  3. 19 0
      other/upgrade_2-1_sqlite.sql

+ 19 - 0
other/upgrade_2-1_mysql.sql

@@ -1314,4 +1314,23 @@ ADD COLUMN modified_reason varchar(255) NOT NULL default '';
 		);
 	}
 ---}
+---#
+
+/******************************************************************************/
+--- Cleaning up old email settings
+/******************************************************************************/
+---# Removing the "send_email_to_members" permission
+---{
+	$smcFunc['db_query']('', '
+		DELETE FROM {db_prefix}permissions
+		WHERE permission = {literal:send_email_to_members}',
+		array()
+	);
+---}
+---#
+
+---# Dropping the "hide_email" column from the members table
+---{
+	$smcFunc['db_alter_table']('{db_prefix}members', array('remove' => array('hide_email')));
+}
 ---#

+ 19 - 0
other/upgrade_2-1_postgresql.sql

@@ -1408,4 +1408,23 @@ ADD COLUMN modified_reason varchar(255) NOT NULL default '';
 		);
 	}
 ---}
+---#
+
+/******************************************************************************/
+--- Cleaning up old email settings
+/******************************************************************************/
+---# Removing the "send_email_to_members" permission
+---{
+	$smcFunc['db_query']('', '
+		DELETE FROM {db_prefix}permissions
+		WHERE permission = {literal:send_email_to_members}',
+		array()
+	);
+---}
+---#
+
+---# Dropping the "hide_email" column from the members table
+---{
+	$smcFunc['db_alter_table']('{db_prefix}members', array('remove' => array('hide_email')));
+}
 ---#

+ 19 - 0
other/upgrade_2-1_sqlite.sql

@@ -1388,4 +1388,23 @@ ADD COLUMN modified_reason varchar(255) NOT NULL default '';
 		);
 	}
 ---}
+---#
+
+/******************************************************************************/
+--- Cleaning up old email settings
+/******************************************************************************/
+---# Removing the "send_email_to_members" permission
+---{
+	$smcFunc['db_query']('', '
+		DELETE FROM {db_prefix}permissions
+		WHERE permission = {literal:send_email_to_members}',
+		array()
+	);
+---}
+---#
+
+---# Dropping the "hide_email" column from the members table
+---{
+	$smcFunc['db_alter_table']('{db_prefix}members', array('remove' => array('hide_email')));
+}
 ---#