aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorSam Stephenson <sam@37signals.com>2005-10-13 04:12:32 +0000
committerSam Stephenson <sam@37signals.com>2005-10-13 04:12:32 +0000
commit24c3599cc0f9987d48f2f1c4fe85fc84a6be3d31 (patch)
tree66730b24a1957dd7cf878fca1c62bc30505769bd /activerecord/lib
parent140a5f8f7b7deea713b5c7cbccbc8b57fecb2c7d (diff)
downloadrails-24c3599cc0f9987d48f2f1c4fe85fc84a6be3d31.tar.gz
rails-24c3599cc0f9987d48f2f1c4fe85fc84a6be3d31.tar.bz2
rails-24c3599cc0f9987d48f2f1c4fe85fc84a6be3d31.zip
Support using different database adapters for development and test with ActiveRecord::Base.schema_format = :ruby
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2549 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-xactiverecord/lib/active_record/base.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index b28247769f..3f0201a202 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -310,6 +310,15 @@ module ActiveRecord #:nodoc:
# mode, because the methods would be regenerated on each request.
cattr_accessor :generate_read_methods
@@generate_read_methods = true
+
+ # Specifies the format to use when dumping the database schema with Rails'
+ # Rakefile. If :sql, the schema is dumped as (potentially database-
+ # specific) SQL statements. If :ruby, the schema is dumped as an
+ # ActiveRecord::Schema file which can be loaded into any database that
+ # supports migrations. Use :ruby if you want to have different database
+ # adapters for, e.g., your development and test environments.
+ cattr_accessor :schema_format
+ @@schema_format = :sql
class << self # Class methods
# Find operates with three different retrieval approaches: