Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: anjoy8/Blog.Core
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: anjoy8/Blog.Core
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: new-migrate
Choose a head ref
  • 3 commits
  • 125 files changed
  • 1 contributor

Commits on Dec 28, 2024

  1. ✨🎨⚡️重大更新:完善数据库迁移

    随着日益增多的业务表,每次程序启动要扫描一遍表对比结构,会严重影响启动速度,故此优化
    
    1.增加特性[MigrateVersionAttribute]用于标记Model版本,切记再修改Model结构后,修改版本号以便同步结构
    2.增加特性[MigrateAttribute]用于标记是否迁移表,默认迁移
    3.统一迁移逻辑,核心类:[MigrateCore.cs],增加表:[TableVersion],记录表版本号同EF逻辑一般
    4.统一多表、多库迁移逻辑。例如:业务表A结构迁移,会同步所有租户的结构
    
    迁移核心逻辑:
    1.Model标记不迁移->程序不做任何处理 return
    2.如果没有标记版本号,默认只会初始化,后续修改表结构也不会同步
    3.调整表结构后,修改表版本号,程序启动时对比表[TableVersion]中已经记录的版本号:
       比记录大(>):会同步结构;
       比记录小或等(<=):跳过同步;
    LemonNoCry committed Dec 28, 2024
    Copy the full SHA
    ed5e1df View commit details

Commits on Dec 31, 2024

  1. 🎨优化调整迁移

    LemonNoCry committed Dec 31, 2024
    Copy the full SHA
    bdb7ca1 View commit details
  2. ✨增加分表测试

    LemonNoCry committed Dec 31, 2024
    Copy the full SHA
    0960f8e View commit details

This comparison is taking too long to generate.

Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.

You can try running this command locally to see the comparison on your machine:
git diff master...new-migrate