11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/llm_cost_tracker/ledger/schema/period_totals.rb', line 11
def current_schema_errors
connection = Ledger::Call.connection
table_name = Ledger::Period::Total.table_name
return ["llm_cost_tracker_period_totals table is missing"] unless connection.data_source_exists?(table_name)
errors = []
missing = REQUIRED_COLUMNS - Ledger::Period::Total.columns_hash.keys
errors << "missing columns: #{missing.join(', ')}" if missing.any?
errors << "missing unique index: period, period_start" unless unique_period_index?(connection, table_name)
errors
end
|