From 376e19c93e8bd03a19005ab04f5a8832182058e0 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sun, 27 Aug 2017 22:16:05 +0900 Subject: 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`. --- activerecord/lib/active_record/schema_dumper.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'activerecord/lib/active_record/schema_dumper.rb') 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| -- cgit v1.2.3