diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-10-27 21:07:03 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-10-27 21:07:03 -0200 |
commit | 6fb056e3b63adee0ef9f5ae00ba50736abf455e1 (patch) | |
tree | 93ea5d4613d4aa07bc7f31b89bd7dc78ba6a5a3b /activerecord/lib/active_record/model_schema.rb | |
parent | 745d8a8e80d03e3e30d0d96336b0a052c1dd0219 (diff) | |
parent | 26638f0ac939edb00d12b55442bbdb138d5d9449 (diff) | |
download | rails-6fb056e3b63adee0ef9f5ae00ba50736abf455e1.tar.gz rails-6fb056e3b63adee0ef9f5ae00ba50736abf455e1.tar.bz2 rails-6fb056e3b63adee0ef9f5ae00ba50736abf455e1.zip |
Merge pull request #12578 from jeradphelps/configurable_schema_migrations_table_name
Configurable name for schema_migrations table
Conflicts:
activerecord/CHANGELOG.md
Diffstat (limited to 'activerecord/lib/active_record/model_schema.rb')
-rw-r--r-- | activerecord/lib/active_record/model_schema.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/model_schema.rb b/activerecord/lib/active_record/model_schema.rb index 75c0c1bda8..dc5ff02882 100644 --- a/activerecord/lib/active_record/model_schema.rb +++ b/activerecord/lib/active_record/model_schema.rb @@ -34,6 +34,12 @@ module ActiveRecord ## # :singleton-method: + # Accessor for the name of the schema migrations table. By default, the value is "schema_migrations" + class_attribute :schema_migrations_table_name, instance_accessor: false + self.schema_migrations_table_name = "schema_migrations" + + ## + # :singleton-method: # Indicates whether table names should be the pluralized versions of the corresponding class names. # If true, the default table name for a Product class will be +products+. If false, it would just be +product+. # See table_name for the full rules on table/class naming. This is true, by default. |