-
Notifications
You must be signed in to change notification settings - Fork 22k
Make create_schema / drop_schema reversible in migrations #52451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@afn can you add a changelog entry? |
f724c10
to
45f2fe3
Compare
Done |
yahonda
reviewed
Aug 2, 2024
45f2fe3
to
e800fc6
Compare
yahonda
added a commit
to yahonda/rails
that referenced
this pull request
Aug 7, 2024
… error This commit addresses this CI failure. https://buildkite.com/rails/rails/builds/109886#01912bdf-2f48-47e3-af85-cbc17d9824bd/1289-1300 ```ruby $ ARCONN=postgresql bin/test test/cases/adapters/postgresql/postgresql_adapter_test.rb test/cases/invertible_migration_test.rb -n "/^(?:ActiveRecord::InvertibleMigrationTest#(?:test_migrate_enable_and_disable_extension)|ActiveRecord::ConnectionAdapters::PostgreSQLAdapterTest#(?:test_disable_extension_without_schema))$/" --seed 45290 Using postgresql Run options: -n "/^(?:ActiveRecord::InvertibleMigrationTest#(?:test_migrate_enable_and_disable_extension)|ActiveRecord::ConnectionAdapters::PostgreSQLAdapterTest#(?:test_disable_extension_without_schema))$/" --seed 45290 .E Error: ActiveRecord::ConnectionAdapters::PostgreSQLAdapterTest#test_disable_extension_without_schema: ActiveRecord::StatementInvalid: PG::DuplicateObject: ERROR: extension "hstore" already exists lib/active_record/connection_adapters/postgresql/database_statements.rb:160:in `exec' lib/active_record/connection_adapters/postgresql/database_statements.rb:160:in `perform_query' lib/active_record/connection_adapters/abstract/database_statements.rb:556:in `block (2 levels) in raw_execute' lib/active_record/connection_adapters/abstract_adapter.rb:1004:in `block in with_raw_connection' /home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/concurrency/null_lock.rb:9:in `synchronize' lib/active_record/connection_adapters/abstract_adapter.rb:976:in `with_raw_connection' lib/active_record/connection_adapters/abstract/database_statements.rb:555:in `block in raw_execute' /home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/notifications/instrumenter.rb:58:in `instrument' lib/active_record/connection_adapters/abstract_adapter.rb:1122:in `log' lib/active_record/connection_adapters/abstract/database_statements.rb:554:in `raw_execute' lib/active_record/connection_adapters/abstract/database_statements.rb:591:in `internal_execute' lib/active_record/connection_adapters/abstract/database_statements.rb:137:in `execute' lib/active_record/connection_adapters/abstract/query_cache.rb:26:in `execute' lib/active_record/connection_adapters/postgresql/database_statements.rb:40:in `execute' test/cases/adapters/postgresql/postgresql_adapter_test.rb:687:in `test_disable_extension_without_schema' bin/test test/cases/adapters/postgresql/postgresql_adapter_test.rb:686 Finished in 0.127199s, 15.7234 runs/s, 39.3085 assertions/s. 2 runs, 5 assertions, 0 failures, 1 errors, 0 skips $ ``` It also applies to the similar `test_disable_extension_with_schema` test that did not fail yet. Follow up rails#52452 rails#52451
4 tasks
DanielaVelasquez
pushed a commit
to DanielaVelasquez/rails
that referenced
this pull request
Oct 3, 2024
… error This commit addresses this CI failure. https://buildkite.com/rails/rails/builds/109886#01912bdf-2f48-47e3-af85-cbc17d9824bd/1289-1300 ```ruby $ ARCONN=postgresql bin/test test/cases/adapters/postgresql/postgresql_adapter_test.rb test/cases/invertible_migration_test.rb -n "/^(?:ActiveRecord::InvertibleMigrationTest#(?:test_migrate_enable_and_disable_extension)|ActiveRecord::ConnectionAdapters::PostgreSQLAdapterTest#(?:test_disable_extension_without_schema))$/" --seed 45290 Using postgresql Run options: -n "/^(?:ActiveRecord::InvertibleMigrationTest#(?:test_migrate_enable_and_disable_extension)|ActiveRecord::ConnectionAdapters::PostgreSQLAdapterTest#(?:test_disable_extension_without_schema))$/" --seed 45290 .E Error: ActiveRecord::ConnectionAdapters::PostgreSQLAdapterTest#test_disable_extension_without_schema: ActiveRecord::StatementInvalid: PG::DuplicateObject: ERROR: extension "hstore" already exists lib/active_record/connection_adapters/postgresql/database_statements.rb:160:in `exec' lib/active_record/connection_adapters/postgresql/database_statements.rb:160:in `perform_query' lib/active_record/connection_adapters/abstract/database_statements.rb:556:in `block (2 levels) in raw_execute' lib/active_record/connection_adapters/abstract_adapter.rb:1004:in `block in with_raw_connection' /home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/concurrency/null_lock.rb:9:in `synchronize' lib/active_record/connection_adapters/abstract_adapter.rb:976:in `with_raw_connection' lib/active_record/connection_adapters/abstract/database_statements.rb:555:in `block in raw_execute' /home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/notifications/instrumenter.rb:58:in `instrument' lib/active_record/connection_adapters/abstract_adapter.rb:1122:in `log' lib/active_record/connection_adapters/abstract/database_statements.rb:554:in `raw_execute' lib/active_record/connection_adapters/abstract/database_statements.rb:591:in `internal_execute' lib/active_record/connection_adapters/abstract/database_statements.rb:137:in `execute' lib/active_record/connection_adapters/abstract/query_cache.rb:26:in `execute' lib/active_record/connection_adapters/postgresql/database_statements.rb:40:in `execute' test/cases/adapters/postgresql/postgresql_adapter_test.rb:687:in `test_disable_extension_without_schema' bin/test test/cases/adapters/postgresql/postgresql_adapter_test.rb:686 Finished in 0.127199s, 15.7234 runs/s, 39.3085 assertions/s. 2 runs, 5 assertions, 0 failures, 1 errors, 0 skips $ ``` It also applies to the similar `test_disable_extension_with_schema` test that did not fail yet. Follow up rails#52452 rails#52451
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR makes
create_schema
/drop_schema
reversible in migrations. See #52312 for context.Checklist
Before submitting the PR make sure the following are checked:
[Fix #issue-number]