mirror of
https://github.com/ColdeZhang/Dominion.git
synced 2024-12-25 13:58:51 +08:00
修复了自动清理由于外键约束为设置联级删除而不生效的问题
This commit is contained in:
parent
d345656933
commit
350ba9585f
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>cn.lunadeer</groupId>
|
<groupId>cn.lunadeer</groupId>
|
||||||
<artifactId>Dominion</artifactId>
|
<artifactId>Dominion</artifactId>
|
||||||
<version>1.14.6-beta</version>
|
<version>1.14.7-beta</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>Dominion</name>
|
<name>Dominion</name>
|
||||||
|
@ -194,5 +194,18 @@ public class Database {
|
|||||||
// 1.12.0
|
// 1.12.0
|
||||||
sql = "ALTER TABLE dominion ADD COLUMN IF NOT EXISTS ender_man BOOLEAN NOT NULL DEFAULT FAlSE;";
|
sql = "ALTER TABLE dominion ADD COLUMN IF NOT EXISTS ender_man BOOLEAN NOT NULL DEFAULT FAlSE;";
|
||||||
query(sql);
|
query(sql);
|
||||||
|
|
||||||
|
// 1.14.7
|
||||||
|
sql = "ALTER TABLE dominion DROP CONSTRAINT IF EXISTS dominion_owner_fkey;";
|
||||||
|
sql += "ALTER TABLE dominion ADD CONSTRAINT dominion_owner_fkey FOREIGN KEY (owner) REFERENCES player_name(uuid) ON DELETE CASCADE;";
|
||||||
|
sql += "ALTER TABLE dominion DROP CONSTRAINT IF EXISTS dominion_parent_dom_id_fkey;";
|
||||||
|
sql += "ALTER TABLE dominion ADD CONSTRAINT dominion_parent_dom_id_fkey FOREIGN KEY (parent_dom_id) REFERENCES dominion(id) ON DELETE CASCADE;";
|
||||||
|
sql += "ALTER TABLE player_privilege DROP CONSTRAINT IF EXISTS player_privilege_player_uuid_fkey;";
|
||||||
|
sql += "ALTER TABLE player_privilege ADD CONSTRAINT player_privilege_player_uuid_fkey FOREIGN KEY (player_uuid) REFERENCES player_name(uuid) ON DELETE CASCADE;";
|
||||||
|
sql += "ALTER TABLE player_privilege DROP CONSTRAINT IF EXISTS player_privilege_dom_id_fkey;";
|
||||||
|
sql += "ALTER TABLE player_privilege ADD CONSTRAINT player_privilege_dom_id_fkey FOREIGN KEY (dom_id) REFERENCES dominion(id) ON DELETE CASCADE;";
|
||||||
|
query(sql);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user