mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 09:20:22 +08:00
chore(migrations): 合并 ephemeral cache 迁移到 20260423000000,移除冗余迁移文件并同步 baseline cutoff
This commit is contained in:
@@ -32,3 +32,7 @@ WHERE p.id = pak.provider_id
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
ALTER TABLE public.stats_daily_model
|
||||||
|
ADD COLUMN IF NOT EXISTS cache_creation_ephemeral_5m_tokens bigint DEFAULT '0'::bigint NOT NULL,
|
||||||
|
ADD COLUMN IF NOT EXISTS cache_creation_ephemeral_1h_tokens bigint DEFAULT '0'::bigint NOT NULL;
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
ALTER TABLE public.stats_daily_model
|
|
||||||
ADD COLUMN IF NOT EXISTS cache_creation_ephemeral_5m_tokens bigint DEFAULT '0'::bigint NOT NULL,
|
|
||||||
ADD COLUMN IF NOT EXISTS cache_creation_ephemeral_1h_tokens bigint DEFAULT '0'::bigint NOT NULL;
|
|
||||||
@@ -8,7 +8,7 @@ use tracing::{error, info, warn};
|
|||||||
|
|
||||||
static MIGRATOR: Migrator = sqlx::migrate!("./migrations");
|
static MIGRATOR: Migrator = sqlx::migrate!("./migrations");
|
||||||
static BASELINE_V2_SQL: &str = include_str!("../bootstrap/20260413020000_baseline_v2.sql");
|
static BASELINE_V2_SQL: &str = include_str!("../bootstrap/20260413020000_baseline_v2.sql");
|
||||||
const BASELINE_V2_CUTOFF_VERSION: i64 = 20260423010000;
|
const BASELINE_V2_CUTOFF_VERSION: i64 = 20260423000000;
|
||||||
const MIGRATIONS_TABLE_EXISTS_SQL: &str =
|
const MIGRATIONS_TABLE_EXISTS_SQL: &str =
|
||||||
"SELECT to_regclass('public._sqlx_migrations') IS NOT NULL";
|
"SELECT to_regclass('public._sqlx_migrations') IS NOT NULL";
|
||||||
const PUBLIC_BASE_TABLE_COUNT_SQL: &str = r#"
|
const PUBLIC_BASE_TABLE_COUNT_SQL: &str = r#"
|
||||||
@@ -663,7 +663,6 @@ SELECT EXISTS (
|
|||||||
20260422110000,
|
20260422110000,
|
||||||
20260422120000,
|
20260422120000,
|
||||||
20260423000000,
|
20260423000000,
|
||||||
20260423010000,
|
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -811,7 +810,6 @@ SELECT EXISTS (
|
|||||||
20260422110000,
|
20260422110000,
|
||||||
20260422120000,
|
20260422120000,
|
||||||
20260423000000,
|
20260423000000,
|
||||||
20260423010000,
|
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user