2
我今天開始測試grails數據庫遷移插件。我對域進行了初始同步,然後基於運行diff命令創建了一個新的更新日誌。這應該與重命名列和(重新)將索引分配給該列一樣簡單。所以我期望看到以下...遷移文件中的所有額外垃圾是什麼?
changeSet(author: "gdboling (generated)", id: "1306242441630-1") {
addColumn(tableName: "manuscript_review_reviewer") {
column(name: "reviewer_id", type: "bigint") {
constraints(nullable: "false")
}
}
}
changeSet(author: "gdboling (generated)", id: "1306242441630-2") {
addPrimaryKey(columnNames: "manuscript_review_id, reviewer_id", constraintName: "manuscript_rePK", tableName: "manuscript_review_reviewer")
}
changeSet(author: "gdboling (generated)", id: "1306242441630-3") {
dropPrimaryKey(tableName: "manuscript_review_reviewer")
}
changeSet(author: "gdboling (generated)", id: "1306242441630-4") {
dropForeignKeyConstraint(baseTableName: "manuscript_review_reviewer", baseTableSchemaName: "manning_main_dev", constraintName: "FK9BEFBBB34863C659")
}
changeSet(author: "gdboling (generated)", id: "1306242441630-179") {
addForeignKeyConstraint(baseColumnNames: "reviewer_id", baseTableName: "manuscript_review_reviewer", constraintName: "FK9BEFBBB3A28B41DF", deferrable: "false", initiallyDeferred: "false", referencedColumnNames: "id", referencedTableName: "user", referencesUniqueColumn: "false")
}
changeSet(author: "gdboling (generated)", id: "1306242441630-212") {
dropColumn(columnName: "user_id", tableName: "manuscript_review_reviewer")
}
這一切都很好,很好。但是,我也看到很多dropIndex和createIndex塊與我的更改無關。任何人都知道爲什麼會這樣?