Skip to content

Commit e5d0aca

Browse files
committed
fix json schema path information
1 parent 12903d9 commit e5d0aca

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
@@ -48,11 +48,16 @@ def stat_hash(name, statistics)
4848
def schema_info
4949
if File.exist?(calculator.schema_path)
5050
{
51-
"schema_stats" => calculator.schema,
52-
"create_table_calls" => calculator.create_table_calls
51+
"schema_path" => calculator.schema_path,
52+
"create_table calls count" => calculator.schema,
53+
}
54+
elsif File.exist?(calculator.structure_path)
55+
{
56+
"structure_path" => calculator.structure_path,
57+
"create_table calls count" => calculator.schema
5358
}
5459
else
55-
{ "schema_stats" => "No schema.rb file found" }
60+
{ "schema_stats" => "No schema.rb or structure.sql file found" }
5661
end
5762
end
5863
end

0 commit comments

Comments
 (0)