33
34
35
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/llm_cost_tracker/ledger/schema/call_line_items.rb', line 33
def current_schema_errors
connection = LlmCostTracker::Call.connection
Adapter.ensure_supported!(connection)
table_name = LlmCostTracker::CallLineItem.table_name
return ["#{table_name} table is missing"] unless connection.data_source_exists?(table_name)
columns = LlmCostTracker::CallLineItem.columns_hash
errors = []
missing = REQUIRED_COLUMNS - columns.keys
errors << "missing columns: #{missing.join(', ')}" if missing.any?
errors.concat(Adapter.json_column_errors(columns["details"], connection, "details"))
errors
end
|