diff --git a/include/upgrader/patches/c00511c7-7be60a84.cleanup.sql b/include/upgrader/patches/c00511c7-7be60a84.cleanup.sql
new file mode 100644
index 0000000000000000000000000000000000000000..01d69e2d72b732b2d7c3f618fd6e595ccb7c67f7
--- /dev/null
+++ b/include/upgrader/patches/c00511c7-7be60a84.cleanup.sql
@@ -0,0 +1,25 @@
+-- Drop columns we nolonger need - (must be at the very bottom or after session table is created)
+ALTER TABLE `%TABLE_PREFIX%config`
+    DROP COLUMN `ostversion`,
+    DROP COLUMN `timezone_offset`,
+    DROP COLUMN `api_passphrase`;
+
+-- Drop fields we no longer need in the reference table.
+ALTER TABLE `%TABLE_PREFIX%ticket_attachment`
+    DROP `file_size`,
+    DROP `file_name`,
+    DROP `file_key`,
+    DROP `updated`,
+    DROP `isdeleted`;
+
+-- Drop fields we no longer need in staff table.
+ALTER TABLE `%TABLE_PREFIX%staff`
+    DROP `append_signature`,
+    DROP `timezone_offset`;
+
+-- Drop fields we no longer need in department table.
+ALTER TABLE `%TABLE_PREFIX%department`
+    DROP `can_append_signature`;
+
+-- Banlist table has been migrated to the email_filter_rule table
+DROP TABLE `%TABLE_PREFIX%email_banlist`;
diff --git a/include/upgrader/patches/c00511c7-7be60a84.patch.sql b/include/upgrader/patches/c00511c7-7be60a84.patch.sql
index 89dbb31435482baa65fc842dcf58e3edbba40cc6..638248b976019a670c773578b564d99a3daacc6a 100644
--- a/include/upgrader/patches/c00511c7-7be60a84.patch.sql
+++ b/include/upgrader/patches/c00511c7-7be60a84.patch.sql
@@ -302,12 +302,6 @@ CREATE TABLE IF NOT EXISTS `%TABLE_PREFIX%faq_topic` (
   PRIMARY KEY  (`faq_id`,`topic_id`)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
 
--- Drop columns we nolonger need - (must be at the very bottom or after session table is created)
-ALTER TABLE `%TABLE_PREFIX%config`
-    DROP COLUMN `ostversion`,
-    DROP COLUMN `timezone_offset`,
-    DROP COLUMN `api_passphrase`;
-
 
 UPDATE `%TABLE_PREFIX%config`
     SET `schema_signature`='7be60a8432e44989e782d5914ef784d2';