Cleaned up various files by removing unused or redundant import statements to improve code readability and reduce potential confusion. No functional changes were made.
create_all
将数据库初始化过程从直接调用 `Base.metadata.create_all` 修改为调用新的 `check_and_migrate_database` 函数。 这一更改旨在实现更灵活的数据库模式管理,允许在不丢失现有数据的情况下,自动检查并添加新的列或表,从而增强了数据库迁移的健壮性。