diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-27 06:09:18 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-27 06:09:18 +0300 |
commit | 0e1350d51ca2135e37743dfb7af98eae43c72892 (patch) | |
tree | 10a5c3f27cebc539b5b8fe42d4907aec767949b1 /spec/support | |
parent | 417ef56d244c6c22016fda7c78e69071d14887c3 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/database/prevent_cross_joins.rb | 2 | ||||
-rw-r--r-- | spec/support/helpers/database/database_helpers.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/support/database/prevent_cross_joins.rb b/spec/support/database/prevent_cross_joins.rb index 8e08824c464..c44bf96a268 100644 --- a/spec/support/database/prevent_cross_joins.rb +++ b/spec/support/database/prevent_cross_joins.rb @@ -40,7 +40,7 @@ module Database return end - schemas = ::Gitlab::Database::GitlabSchema.table_schemas(tables) + schemas = ::Gitlab::Database::GitlabSchema.table_schemas!(tables) schemas.subtract(IGNORED_SCHEMAS) if schemas.many? diff --git a/spec/support/helpers/database/database_helpers.rb b/spec/support/helpers/database/database_helpers.rb index ecc42041e93..a7f6b4e5cc2 100644 --- a/spec/support/helpers/database/database_helpers.rb +++ b/spec/support/helpers/database/database_helpers.rb @@ -6,9 +6,9 @@ module Database # we can swapout the view for a table of identical structure. def swapout_view_for_table(view, connection:) connection.execute(<<~SQL.squish) - CREATE TABLE #{view}_copy (LIKE #{view}); + CREATE TABLE _test_#{view}_copy (LIKE #{view}); DROP VIEW #{view}; - ALTER TABLE #{view}_copy RENAME TO #{view}; + ALTER TABLE _test_#{view}_copy RENAME TO #{view}; SQL end |