Permalink
Browse files

CHANGED DEFAULT: ActiveRecord::Base.schema_format is now :ruby by def…

…ault instead of :sql. This means that we'll assume you want to live in the world of db/schema.rb where the grass is green and the girls are pretty. If your schema contains un-dumpable elements, such as constraints or database-specific column types, you just got an invitation to either 1) patch the dumper to include foreign key support, 2) stop being db specific, or 3) just change the default in config/environment.rb to config.active_record.schema_format = :sql -- we even include an example for that on new Rails skeletons now. Brought to you by the federation of opinionated framework builders! [DHH]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3678 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent c5ff33c commit 660952e5b0a50fb55c1b2f3d7fbe85d7eb9c86cc @dhh dhh committed Feb 27, 2006
Showing with 7 additions and 4 deletions.
  1. +1 −1 activerecord/lib/active_record/base.rb
  2. +2 −0 railties/CHANGELOG
  3. +4 −3 railties/environments/environment.rb
View
2 activerecord/lib/active_record/base.rb
@@ -324,7 +324,7 @@ def self.reset_subclasses
# 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
+ @@schema_format = :ruby
class << self # Class methods
# Find operates with three different retrieval approaches:
View
2 railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* CHANGED DEFAULT: ActiveRecord::Base.schema_format is now :ruby by default instead of :sql. This means that we'll assume you want to live in the world of db/schema.rb where the grass is green and the girls are pretty. If your schema contains un-dumpable elements, such as constraints or database-specific column types, you just got an invitation to either 1) patch the dumper to include foreign key support, 2) stop being db specific, or 3) just change the default in config/environment.rb to config.active_record.schema_format = :sql -- we even include an example for that on new Rails skeletons now. Brought to you by the federation of opinionated framework builders! [DHH]
+
* Added -r/--repeat option to script/process/spawner that offers the same loop protection as the spinner did. This deprecates the script/process/spinner, so it's no longer included in the default Rails skeleton, but still available for backwards compatibility #3461 [ror@andreas-s.net]
* Added collision option to template generation in generators #3329 [anna@wota.jp]. Examples:
View
7 railties/environments/environment.rb
@@ -24,9 +24,10 @@
# (create the session table with 'rake create_sessions_table')
# config.action_controller.session_store = :active_record_store
- # Use Active Record's schema dumper instead of SQL when creating the test database
- # (enables use of different database adapters for development and test environments)
- # config.active_record.schema_format = :ruby
+ # Use SQL instead of Active Record's schema dumper when creating the test database.
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
+ # like if you have constraints or database-specific column types
+ # config.active_record.schema_format = :sql
# Activate observers that should always be running
# config.active_record.observers = :cacher, :garbage_collector

0 comments on commit 660952e

Please sign in to comment.