Skip to content

Commit c36fc65

Browse files
committed
fix json schema path information
1 parent d4bb309 commit c36fc65

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

lib/rails_stats/json_formatter.rb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,16 @@ def stat_hash(name, statistics)
5656
def schema_info
5757
if File.exist?(calculator.schema_path)
5858
{
59-
"schema_stats" => calculator.schema,
60-
"create_table_calls" => calculator.create_table_calls
59+
"schema_path" => calculator.schema_path,
60+
"create_table calls count" => calculator.schema,
61+
}
62+
elsif File.exist?(calculator.structure_path)
63+
{
64+
"structure_path" => calculator.structure_path,
65+
"create_table calls count" => calculator.schema
6166
}
6267
else
63-
{ "schema_stats" => "No schema.rb file found" }
68+
{ "schema_stats" => "No schema.rb or structure.sql file found" }
6469
end
6570
end
6671
end

0 commit comments

Comments
 (0)