diff --git a/db/post_migrate/20240222000000_remove_packages_protection_rules_package_name_pattern_ilike_query_column.rb b/db/post_migrate/20240222000000_remove_packages_protection_rules_package_name_pattern_ilike_query_column.rb
new file mode 100644
index 0000000000000000000000000000000000000000..5c7a05251311b61af1d52b0874d4ce5bfc73d34b
--- /dev/null
+++ b/db/post_migrate/20240222000000_remove_packages_protection_rules_package_name_pattern_ilike_query_column.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+class RemovePackagesProtectionRulesPackageNamePatternIlikeQueryColumn < Gitlab::Database::Migration[2.2]
+  milestone '16.10'
+
+  disable_ddl_transaction!
+
+  def up
+    if column_exists?(
+      :packages_protection_rules, :package_name_pattern_ilike_query)
+      with_lock_retries do
+        remove_column :packages_protection_rules, :package_name_pattern_ilike_query
+      end
+    end
+  end
+
+  def down
+    with_lock_retries do
+      unless column_exists?(
+        :packages_protection_rules, :package_name_pattern_ilike_query)
+        add_column :packages_protection_rules, :package_name_pattern_ilike_query, :text
+      end
+    end
+
+    add_text_limit :packages_protection_rules, :package_name_pattern_ilike_query, 255
+  end
+end
diff --git a/db/schema_migrations/20240222000000 b/db/schema_migrations/20240222000000
new file mode 100644
index 0000000000000000000000000000000000000000..d0626995211a54cc61a84f7c7e939a095649ba07
--- /dev/null
+++ b/db/schema_migrations/20240222000000
@@ -0,0 +1 @@
+f593130e4ff94eab9e0881ff92b21c3d5c133a8ad513d8af49e2fe7e722b95d8
\ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 408f3dee45ae4c090ebbbc27f8aec5ca6a16bd84..430115923b86f39c13639da28afd2a5c83b37b4d 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -12707,9 +12707,7 @@ CREATE TABLE packages_protection_rules (
     push_protected_up_to_access_level smallint NOT NULL,
     package_type smallint NOT NULL,
     package_name_pattern text NOT NULL,
-    package_name_pattern_ilike_query text,
-    CONSTRAINT check_d2d75d206d CHECK ((char_length(package_name_pattern) <= 255)),
-    CONSTRAINT check_ff47b09794 CHECK ((char_length(package_name_pattern_ilike_query) <= 255))
+    CONSTRAINT check_d2d75d206d CHECK ((char_length(package_name_pattern) <= 255))
 );
 
 CREATE SEQUENCE packages_protection_rules_id_seq