Files
kami-db-migrate/atlas.hcl
danial 6dbe9fe6b9 feat(database): 更新并重构数据库表结构与环境配置
- 添加本地环境配置,包含Schema和连接信息
- 在本地和生产环境配置中新增diff块支持
- 重新设计merchant_hidden_config表结构及命名调整
- 新增并重命名多个核心业务表,如order_profit_info改为merchant_hidden_record
- 调整camel_oil_account表与相关索引定义
- 重构account_history_info和card_apple_history_info相关表结构
- 统一并整理代付相关表payfor_info和merchant_load_info字段及索引
- 丰富并优化商户、代理、账户等多张业务表字段及索引配置
- 增加alembic_version表用于版本控制
- 对多张表字符集及排序规则进行了统一和优化调整
- 优化索引设置以提升查询性能和数据一致性保障
2025-12-14 20:00:27 +08:00

31 lines
558 B
HCL
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 本地环境配置
env "local" {
src = "file://schema.sql"
url = "mysql://root:mysql123@localhost:3306/kami"
dev = "mysql://root:mysql123@localhost:3306/kami_dev"
migration {
dir = "file://migrations"
}
diff {
// 留空或只包含已知属性例如
// skip { drop_table = false }
}
}
// 生产环境配置
env "prod" {
url = getenv("DB_URL")
src = "file://schema.sql"
migration {
dir = "file://migrations"
}
schema {
mode = "database"
}
diff {
// 留空或只包含已知属性
}
}