feat: 新增类级 @TableIndex 注解(复合/唯一/部分索引,对齐 .NET [Index(...)])、索引 diff 统一为 IndexSpec、快照升级 v4、迁移源码还原 filter,版本 1.3.0
This commit is contained in:
@@ -211,7 +211,10 @@ public class MigrationFileGenerator {
|
||||
sb.append("${indent}builder.renameColumn(\"${escape(op.tableName)}\", \"${escape(op.columnName)}\", \"${escape(op.newColumnName)}\")\n")
|
||||
case MigrationOperationKind.CreateIndex =>
|
||||
sb.append("${indent}builder.createIndex(\"${escape(op.indexName)}\", \"${escape(op.tableName)}\", ArrayList<String>([${colList(op.columnNames)}])")
|
||||
if (op.unique) {
|
||||
if (op.filter != "") {
|
||||
let uniqueLiteral = if (op.unique) { "true" } else { "false" }
|
||||
sb.append(", ${uniqueLiteral}, \"${escape(op.filter)}\"")
|
||||
} else if (op.unique) {
|
||||
sb.append(", true")
|
||||
}
|
||||
sb.append(")\n")
|
||||
|
||||
Reference in New Issue
Block a user