diff options
author | Eileen M. Uchitelle <eileencodes@users.noreply.github.com> | 2019-06-14 14:17:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-14 14:17:49 -0400 |
commit | f813119aeca22a87adc68a4843edd7fa8a28272a (patch) | |
tree | 679421d4e547e82444d92539e90e2f5f6db0ccba /activerecord/test/cases/adapters/postgresql | |
parent | c2847716913d3fb72fd423009be1d4f124e4aa94 (diff) | |
parent | 7cc27d749c3563e6b278ad01d233cb92ea3b7935 (diff) | |
download | rails-f813119aeca22a87adc68a4843edd7fa8a28272a.tar.gz rails-f813119aeca22a87adc68a4843edd7fa8a28272a.tar.bz2 rails-f813119aeca22a87adc68a4843edd7fa8a28272a.zip |
Merge pull request #36439 from eileencodes/move-schema-migration-to-migration-context
Move SchemaMigration to migration_context
Diffstat (limited to 'activerecord/test/cases/adapters/postgresql')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/extension_migration_test.rb | 4 | ||||
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/uuid_test.rb | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/extension_migration_test.rb b/activerecord/test/cases/adapters/postgresql/extension_migration_test.rb index 0fd7b2c6ed..00ba549c97 100644 --- a/activerecord/test/cases/adapters/postgresql/extension_migration_test.rb +++ b/activerecord/test/cases/adapters/postgresql/extension_migration_test.rb @@ -50,7 +50,7 @@ class PostgresqlExtensionMigrationTest < ActiveRecord::PostgreSQLTestCase @connection.disable_extension("hstore") migrations = [EnableHstore.new(nil, 1)] - ActiveRecord::Migrator.new(:up, migrations).migrate + ActiveRecord::Migrator.new(:up, migrations, ActiveRecord::Base.connection.schema_migration).migrate assert @connection.extension_enabled?("hstore"), "extension hstore should be enabled" end @@ -58,7 +58,7 @@ class PostgresqlExtensionMigrationTest < ActiveRecord::PostgreSQLTestCase @connection.enable_extension("hstore") migrations = [DisableHstore.new(nil, 1)] - ActiveRecord::Migrator.new(:up, migrations).migrate + ActiveRecord::Migrator.new(:up, migrations, ActiveRecord::Base.connection.schema_migration).migrate assert_not @connection.extension_enabled?("hstore"), "extension hstore should not be enabled" end end diff --git a/activerecord/test/cases/adapters/postgresql/uuid_test.rb b/activerecord/test/cases/adapters/postgresql/uuid_test.rb index 2be67aae20..a1c985fc71 100644 --- a/activerecord/test/cases/adapters/postgresql/uuid_test.rb +++ b/activerecord/test/cases/adapters/postgresql/uuid_test.rb @@ -293,14 +293,14 @@ class PostgresqlUUIDGenerationTest < ActiveRecord::PostgreSQLTestCase create_table("pg_uuids_4", id: :uuid) end end.new - ActiveRecord::Migrator.new(:up, [migration]).migrate + ActiveRecord::Migrator.new(:up, [migration], ActiveRecord::Base.connection.schema_migration).migrate schema = dump_table_schema "pg_uuids_4" assert_match(/\bcreate_table "pg_uuids_4", id: :uuid, default: -> { "uuid_generate_v4\(\)" }/, schema) ensure drop_table "pg_uuids_4" ActiveRecord::Migration.verbose = @verbose_was - ActiveRecord::SchemaMigration.delete_all + ActiveRecord::Base.connection.schema_migration.delete_all end uses_transaction :test_schema_dumper_for_uuid_primary_key_default_in_legacy_migration end @@ -343,14 +343,14 @@ class PostgresqlUUIDTestNilDefault < ActiveRecord::PostgreSQLTestCase create_table("pg_uuids_4", id: :uuid, default: nil) end end.new - ActiveRecord::Migrator.new(:up, [migration]).migrate + ActiveRecord::Migrator.new(:up, [migration], ActiveRecord::Base.connection.schema_migration).migrate schema = dump_table_schema "pg_uuids_4" assert_match(/\bcreate_table "pg_uuids_4", id: :uuid, default: nil/, schema) ensure drop_table "pg_uuids_4" ActiveRecord::Migration.verbose = @verbose_was - ActiveRecord::SchemaMigration.delete_all + ActiveRecord::Base.connection.schema_migration.delete_all end uses_transaction :test_schema_dumper_for_uuid_primary_key_with_default_nil_in_legacy_migration end |