Method: ActiveRecord::DatabaseConfigurations::HashConfig#schema_dump
- Defined in:
- activerecord/lib/active_record/database_configurations/hash_config.rb
#schema_dump(format = ActiveRecord.schema_format) ⇒ Object
Determines whether to dump the schema/structure files and the filename that should be used.
If configuration_hash[:schema_dump] is set to false or nil the schema will not be dumped.
If the config option is set that will be used. Otherwise Rails will generate the filename from the database config name.
141 142 143 144 145 146 147 148 149 150 151 |
# File 'activerecord/lib/active_record/database_configurations/hash_config.rb', line 141 def schema_dump(format = ActiveRecord.schema_format) if configuration_hash.key?(:schema_dump) if config = configuration_hash[:schema_dump] config end elsif primary? schema_file_type(format) else "#{name}_#{schema_file_type(format)}" end end |