是否有计划针对Sync2的分区表自动创建 #2141
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#2141
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
通过Sync2方法对MySQL,PostgreSQL等的常见数据库的分区表创建自动创建.目前在XORM中使用例如PG的分区表需要手动创建表并且手动处理分区创建之后才能使用Sync2进行表结构映射,直接使用Sync2会将表结构映射为普通表.
如果有计划支持分区表创建,可以适当参考一下这种方式
其中
range|list|hash|key
分别对应分区方式,如果Sync2检查到这类TAG就可以认为该表是一个分区表而非普通表Range
分区List
分区Hash
分区Key
分区 (MySQL only)分区参照
MonthOfYear
字段生成后缀,对应PGSQL的RAW SQL语句如下:当然以这种方式实现,Sync2仅用于分区表的自动创建与结构映射,开发者还需要自行处理分区表的分区创建策略并创建对应分区