diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-08-27 22:16:05 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-27 22:16:05 +0900 |
commit | 376e19c93e8bd03a19005ab04f5a8832182058e0 (patch) | |
tree | 36aadd3db67f71f48e28eda39d2c41e2c6c32ea6 /activerecord/lib/active_record/schema_dumper.rb | |
parent | 6f1c18308ebffc97d51440cdeed7be71de58f26a (diff) | |
download | rails-376e19c93e8bd03a19005ab04f5a8832182058e0.tar.gz rails-376e19c93e8bd03a19005ab04f5a8832182058e0.tar.bz2 rails-376e19c93e8bd03a19005ab04f5a8832182058e0.zip |
Prefer to place a table options before `force: :cascade` (#28005)
I was added a table options after `force: :cascade` in #17569 for not
touching existing tests (reducing diff). But `force: :cascade` is not an
important information. So I prefer to place a table options before
`force: :cascade`.
Diffstat (limited to 'activerecord/lib/active_record/schema_dumper.rb')
-rw-r--r-- | activerecord/lib/active_record/schema_dumper.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/schema_dumper.rb b/activerecord/lib/active_record/schema_dumper.rb index d2e1892ae7..8d0311fabd 100644 --- a/activerecord/lib/active_record/schema_dumper.rb +++ b/activerecord/lib/active_record/schema_dumper.rb @@ -132,14 +132,13 @@ HEADER else tbl.print ", id: false" end - tbl.print ", force: :cascade" table_options = @connection.table_options(table) if table_options.present? tbl.print ", #{format_options(table_options)}" end - tbl.puts " do |t|" + tbl.puts ", force: :cascade do |t|" # then dump all non-primary key columns columns.each do |column| |