Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 3678

Show
Ignore:
Timestamp:
02/27/06 00:23:49 (4 years ago)
Author:
david
Message:

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]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activerecord/lib/active_record/base.rb

    r3671 r3678  
    325325    # adapters for, e.g., your development and test environments. 
    326326    cattr_accessor :schema_format  
    327     @@schema_format = :sql 
     327    @@schema_format = :ruby 
    328328 
    329329    class << self # Class methods 
  • trunk/railties/CHANGELOG

    r3672 r3678  
    11*SVN* 
     2 
     3* 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] 
    24 
    35* 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] 
  • trunk/railties/environments/environment.rb

    r3645 r3678  
    2525  # config.action_controller.session_store = :active_record_store 
    2626 
    27   # Use Active Record's schema dumper instead of SQL when creating the test database 
    28   # (enables use of different database adapters for development and test environments) 
    29   # config.active_record.schema_format = :ruby 
     27  # Use SQL instead of Active Record's schema dumper when creating the test database. 
     28  # This is necessary if your schema can't be completely dumped by the schema dumper,  
     29  # like if you have constraints or database-specific column types 
     30  # config.active_record.schema_format = :sql 
    3031 
    3132  # Activate observers that should always be running