Skip to content

Commit f20355a

Browse files
committed
Fix postgres test for rake db:structure:dump and db:structure:load
1 parent 2abd4c7 commit f20355a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/rake_test_support.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,12 @@ def new_application
122122
# (Test) Helpers :
123123

124124
def create_schema_migrations_table(connection = ActiveRecord::Base.connection)
125-
schema_migration = ActiveRecord::SchemaMigration.table_name
126-
return if connection.data_source_exists?(schema_migration)
127-
connection.create_table(schema_migration, :id => false) do |t|
128-
t.column :version, :string, :null => false
125+
schema_migration = connection.schema_migration
126+
127+
return if schema_migration.table_exists?
128+
129+
connection.create_table(schema_migration.table_name, id: false) do |t|
130+
t.column :version, :string, null: false
129131
end
130132
end
131133

0 commit comments

Comments
 (0)