merge(test): 合并 main 并解决前端筛选器冲突
This commit is contained in:
14
backend/migrations/054_drop_legacy_cache_columns.sql
Normal file
14
backend/migrations/054_drop_legacy_cache_columns.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
-- Drop legacy cache token columns that lack the underscore separator.
|
||||
-- These were created by GORM's automatic snake_case conversion:
|
||||
-- CacheCreation5mTokens → cache_creation5m_tokens (incorrect)
|
||||
-- CacheCreation1hTokens → cache_creation1h_tokens (incorrect)
|
||||
--
|
||||
-- The canonical columns are:
|
||||
-- cache_creation_5m_tokens (defined in 001_init.sql)
|
||||
-- cache_creation_1h_tokens (defined in 001_init.sql)
|
||||
--
|
||||
-- Migration 009 already copied data from legacy → canonical columns.
|
||||
-- This migration drops the legacy columns to avoid confusion.
|
||||
|
||||
ALTER TABLE usage_logs DROP COLUMN IF EXISTS cache_creation5m_tokens;
|
||||
ALTER TABLE usage_logs DROP COLUMN IF EXISTS cache_creation1h_tokens;
|
||||
Reference in New Issue
Block a user