Skip to content

Commit c6dab85

Browse files
committed
Fix migration tests for mysql
1 parent c5f92e2 commit c6dab85

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

db/migrations/20250225132929_add_apps_file_based_service_binding_feature_columns.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def check_constraint_exists?(database)
3535
if database.database_type == :postgres
3636
database.check_constraints(:apps).include?(:only_one_sb_feature_enabled)
3737
elsif database.database_type == :mysql
38-
database[:information_schema__table_constraints].where(TABLE_NAME: 'apps', CONSTRAINT_TYPE: 'CHECK', CONSTRAINT_NAME: 'only_one_sb_feature_enabled').any?
38+
database[:information_schema__table_constraints].where(TABLE_SCHEMA: database.opts[:database], TABLE_NAME: 'apps', CONSTRAINT_TYPE: 'CHECK',
39+
CONSTRAINT_NAME: 'only_one_sb_feature_enabled').any?
3940
end
4041
end

0 commit comments

Comments
 (0)