refactor(data): remove MySQL and SQLite support

Use PostgreSQL as the only database backend across runtime, schema tooling, installation, Compose, and CI. Update regression tests and reject removed drivers explicitly.
This commit is contained in:
elky
2026-09-07 00:09:42 +08:00
parent b5ed802277
commit 2281f2b754
298 changed files with 793 additions and 134804 deletions
@@ -8,8 +8,6 @@ driver_schema_root="${schema_root}/drivers"
bootstrap_schema_root="${schema_root}/bootstrap/postgres"
adapters_root="${root}/../adapters"
postgres_migrations_root="${adapters_root}/postgres/migrations"
mysql_migrations_root="${adapters_root}/mysql/migrations"
sqlite_migrations_root="${adapters_root}/sqlite/migrations"
usage() {
cat <<'USAGE'
@@ -34,10 +32,6 @@ check_logical_generated() {
local args=()
local path
args+=(--require-tables-from "${postgres_migrations_root}/20260403000000_baseline.sql")
for path in "${mysql_migrations_root}/"*.sql "${sqlite_migrations_root}/"*.sql; do
[[ -f "${path}" ]] || continue
args+=(--require-tables-from "${path}")
done
(cd "${workspace_root}" && cargo run -q -p aether-data-schema --bin aether-schema -- check "${args[@]}")
printf 'ok generated logical schema\n'
}
@@ -58,12 +52,6 @@ output_path() {
postgres/baseline)
printf '%s/20260403000000_baseline.sql' "${postgres_migrations_root}"
;;
mysql/baseline)
printf '%s/20260403000000_baseline.sql' "${mysql_migrations_root}"
;;
sqlite/baseline)
printf '%s/20260403000000_baseline.sql' "${sqlite_migrations_root}"
;;
*)
printf 'unknown schema target: %s\n' "${target}" >&2
exit 2
@@ -185,52 +173,15 @@ check_bootstrap_sources() {
printf 'ok bootstrap/postgres source\n'
}
split_linear_baseline() {
local driver="$1"
local source
if [[ "${driver}" == "mysql" ]]; then
source="${mysql_migrations_root}/20260403000000_baseline.sql"
else
source="${sqlite_migrations_root}/20260403000000_baseline.sql"
fi
local target="${driver}/baseline"
write_manifest "${target}" \
"001_identity.sql" \
"002_provider_catalog.sql" \
"003_auth_config.sql" \
"004_proxy_nodes.sql" \
"005_wallet_billing.sql" \
"006_usage.sql"
if [[ "${driver}" == "mysql" ]]; then
split_fragment "${source}" "${target}" 001_identity.sql 1 121
split_fragment "${source}" "${target}" 002_provider_catalog.sql 122 417
split_fragment "${source}" "${target}" 003_auth_config.sql 418 487
split_fragment "${source}" "${target}" 004_proxy_nodes.sql 488 527
split_fragment "${source}" "${target}" 005_wallet_billing.sql 528 711
split_fragment "${source}" "${target}" 006_usage.sql 712 EOF
else
split_fragment "${source}" "${target}" 001_identity.sql 1 117
split_fragment "${source}" "${target}" 002_provider_catalog.sql 118 417
split_fragment "${source}" "${target}" 003_auth_config.sql 418 485
split_fragment "${source}" "${target}" 004_proxy_nodes.sql 486 525
split_fragment "${source}" "${target}" 005_wallet_billing.sql 526 728
split_fragment "${source}" "${target}" 006_usage.sql 729 EOF
fi
}
targets=(
"postgres/baseline"
"mysql/baseline"
"sqlite/baseline"
)
cmd="${1:-}"
case "${cmd}" in
split)
split_postgres_baseline
split_linear_baseline mysql
split_linear_baseline sqlite
;;
generate)
generate_logical_schema