From 1dc1d52c4cef06183788b217453f9fa7ca9b25e9 Mon Sep 17 00:00:00 2001 From: justin talbott Date: Thu, 11 Jan 2024 12:27:45 -0500 Subject: [PATCH] stree --- lib/hoardable/schema_dumper.rb | 3 +-- test/test_schema_dumper.rb | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/hoardable/schema_dumper.rb b/lib/hoardable/schema_dumper.rb index 2947eb7..e0a4198 100644 --- a/lib/hoardable/schema_dumper.rb +++ b/lib/hoardable/schema_dumper.rb @@ -14,8 +14,7 @@ def tables(stream) end private def dump_inherited_tables(stream) - sorted_tables = - @connection.tables.filter { |table| @connection.inherited_table?(table) }.sort + sorted_tables = @connection.tables.filter { |table| @connection.inherited_table?(table) }.sort sorted_tables.each do |table_name| table(table_name, stream) foreign_keys(table_name, stream) diff --git a/test/test_schema_dumper.rb b/test/test_schema_dumper.rb index 0a73b1f..6b3e3f6 100644 --- a/test/test_schema_dumper.rb +++ b/test/test_schema_dumper.rb @@ -22,7 +22,9 @@ class TestSchemaDumper < ActiveSupport::TestCase output = dump_table_schema("post_versions", "posts") assert posts_index = output.index(/create_table "posts"/) assert post_versions_index = output.index(/create_table "post_versions"/) - assert post_versions_trigger_index = output.index(/create_trigger :post_versions_prevent_update/) + assert( + post_versions_trigger_index = output.index(/create_trigger :post_versions_prevent_update/) + ) assert post_versions_index > posts_index assert post_versions_trigger_index > post_versions_index end