aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-07-02 09:41:52 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-07-02 09:41:52 -0300
commit5c87b5c5248154cf8aa76cce9a24a88769de022d (patch)
treeb726e91020591423c307bc539c03902256f2b4e3 /activerecord
parent4cb4e87b938da13125c57a005cc6924052b76b17 (diff)
downloadrails-5c87b5c5248154cf8aa76cce9a24a88769de022d.tar.gz
rails-5c87b5c5248154cf8aa76cce9a24a88769de022d.tar.bz2
rails-5c87b5c5248154cf8aa76cce9a24a88769de022d.zip
Revert "Merge pull request #15394 from morgoth/fix-automatic-maintaining-test-schema-for-sql-format"
This reverts commit 46139d33c06715e74ad450428ece3ee84da98579, reversing changes made to 8f247871bb18b2e3036a05df5f62cbfe3b402586. Conflicts: activerecord/CHANGELOG.md
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/CHANGELOG.md9
-rw-r--r--activerecord/lib/active_record/tasks/database_tasks.rb2
-rw-r--r--activerecord/lib/active_record/tasks/sqlite_database_tasks.rb6
3 files changed, 2 insertions, 15 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 7e40373163..462c7ae115 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -128,14 +128,7 @@
Serialized attributes on ActiveRecord models will no longer save when
unchanged. Fixes #8328.
- Sean Griffin
-
-* Fixed automatic maintaining test schema to properly handle sql structure
- schema format.
-
- Fixes #15394.
-
- *Wojciech Wnętrzak*
+ *Sean Griffin*
* Pluck now works when selecting columns from different tables with the same
name.
diff --git a/activerecord/lib/active_record/tasks/database_tasks.rb b/activerecord/lib/active_record/tasks/database_tasks.rb
index 4727469420..9bc23b5ec7 100644
--- a/activerecord/lib/active_record/tasks/database_tasks.rb
+++ b/activerecord/lib/active_record/tasks/database_tasks.rb
@@ -176,12 +176,10 @@ module ActiveRecord
when :ruby
file ||= File.join(db_dir, "schema.rb")
check_schema_file(file)
- purge(current_config)
load(file)
when :sql
file ||= File.join(db_dir, "structure.sql")
check_schema_file(file)
- purge(current_config)
structure_load(current_config, file)
else
raise ArgumentError, "unknown format #{format.inspect}"
diff --git a/activerecord/lib/active_record/tasks/sqlite_database_tasks.rb b/activerecord/lib/active_record/tasks/sqlite_database_tasks.rb
index 9ab64d0325..5688931db2 100644
--- a/activerecord/lib/active_record/tasks/sqlite_database_tasks.rb
+++ b/activerecord/lib/active_record/tasks/sqlite_database_tasks.rb
@@ -21,11 +21,7 @@ module ActiveRecord
FileUtils.rm(file) if File.exist?(file)
end
-
- def purge
- drop
- create
- end
+ alias :purge :drop
def charset
connection.encoding