forked from PseudoKnight/Stargate-Bukkit
-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
69f3d55
commit ff4a432
Showing
10 changed files
with
204 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
src/main/resources/migration/database/v-9/inter_server/step0.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Add a update on cascade constraint to the InterPortalPosition table | ||
* This is the only way of doing it in sqlite (by recreating the table) | ||
*/ | ||
|
||
|
||
CREATE TABLE IF NOT EXISTS {InterPortalPosition}1 | ||
( | ||
portalName NVARCHAR (180) NOT NULL, | ||
networkName NVARCHAR (180) NOT NULL, | ||
xCoordinate INTEGER NOT NULL, | ||
yCoordinate INTEGER NOT NULL, | ||
zCoordinate INTEGER NOT NULL, | ||
positionType INTEGER NOT NULL, | ||
metaData TEXT, | ||
pluginName VARCHAR(255) DEFAULT "Stargate", | ||
PRIMARY KEY | ||
( | ||
portalName, | ||
networkName, | ||
xCoordinate, | ||
yCoordinate, | ||
zCoordinate | ||
), | ||
FOREIGN KEY | ||
( | ||
portalName, | ||
networkName | ||
) | ||
REFERENCES {InterPortal} | ||
( | ||
name, | ||
network | ||
) | ||
ON UPDATE CASCADE | ||
ON DELETE CASCADE, | ||
FOREIGN KEY (positionType) REFERENCES {PositionType} (id) | ||
); | ||
|
||
INSERT INTO {InterPortalPosition}1 SELECT * | ||
FROM | ||
{InterPortalPosition}; | ||
|
||
DROP TABLE {InterPortalPosition}; | ||
|
||
ALTER TABLE {InterPortalPosition}1 RENAME TO {InterPortalPosition}; |
42 changes: 42 additions & 0 deletions
42
src/main/resources/migration/database/v-9/inter_server/step1.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Add a update on cascade constraint to the InterPortalFlagRelation table | ||
* This is the only way of doing it in sqlite (by recreating the table) | ||
*/ | ||
|
||
CREATE TABLE IF NOT EXISTS {InterPortalFlagRelation}1 | ||
( | ||
name NVARCHAR (180) NOT NULL, | ||
network NVARCHAR (180) NOT NULL, | ||
flag INTEGER NOT NULL, | ||
PRIMARY KEY | ||
( | ||
name, | ||
network, | ||
flag | ||
), | ||
FOREIGN KEY | ||
( | ||
name, | ||
network | ||
) | ||
REFERENCES {InterPortal} | ||
( | ||
name, | ||
network | ||
) | ||
ON UPDATE CASCADE | ||
ON DELETE CASCADE, | ||
FOREIGN KEY (flag) REFERENCES {Flag} (id) | ||
); | ||
|
||
INSERT INTO {InterPortalFlagRelation}1 SELECT * | ||
FROM | ||
{InterPortalFlagRelation}; | ||
|
||
DROP VIEW {InterPortalView}; | ||
|
||
DROP TABLE {InterPortalFlagRelation}; | ||
|
||
ALTER TABLE {InterPortalFlagRelation}1 RENAME TO {InterPortalFlagRelation}; | ||
|
||
CREATE_VIEW_INTER_PORTAL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Add a update on cascade constraint to the PortalPosition table | ||
* This is the only way of doing it in sqlite (by recreating the table) | ||
*/ | ||
|
||
CREATE TABLE IF NOT EXISTS {PortalPosition}1 | ||
( | ||
portalName NVARCHAR (180) NOT NULL, | ||
networkName NVARCHAR (180) NOT NULL, | ||
xCoordinate INTEGER NOT NULL, | ||
yCoordinate INTEGER NOT NULL, | ||
zCoordinate INTEGER NOT NULL, | ||
positionType INTEGER NOT NULL, | ||
metaData TEXT, | ||
pluginName VARCHAR(255) DEFAULT "Stargate", | ||
PRIMARY KEY | ||
( | ||
portalName, | ||
networkName, | ||
xCoordinate, | ||
yCoordinate, | ||
zCoordinate | ||
), | ||
FOREIGN KEY | ||
( | ||
portalName, | ||
networkName | ||
) | ||
REFERENCES {Portal} | ||
( | ||
name, | ||
network | ||
) | ||
ON UPDATE CASCADE | ||
ON DELETE CASCADE, | ||
FOREIGN KEY (positionType) REFERENCES {PositionType} (id) | ||
); | ||
|
||
INSERT INTO {PortalPosition}1 SELECT * | ||
FROM | ||
{PortalPosition}; | ||
|
||
DROP TABLE {PortalPosition}; | ||
|
||
ALTER TABLE {PortalPosition}1 RENAME TO {PortalPosition}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Add a update on cascade constraint to the InterPortalFlagRelation table | ||
* This is the only way of doing it in sqlite (by recreating the table) | ||
*/ | ||
|
||
CREATE TABLE IF NOT EXISTS {PortalFlagRelation}1 | ||
( | ||
name NVARCHAR (180) NOT NULL, | ||
network NVARCHAR (180) NOT NULL, | ||
flag INTEGER NOT NULL, | ||
PRIMARY KEY | ||
( | ||
name, | ||
network, | ||
flag | ||
), | ||
FOREIGN KEY | ||
( | ||
name, | ||
network | ||
) | ||
REFERENCES {Portal} | ||
( | ||
name, | ||
network | ||
) | ||
ON UPDATE CASCADE | ||
ON DELETE CASCADE, | ||
FOREIGN KEY (flag) REFERENCES {Flag} (id) | ||
); | ||
|
||
INSERT INTO {PortalFlagRelation}1 SELECT * | ||
FROM | ||
{PortalFlagRelation}; | ||
|
||
DROP VIEW {PortalView}; | ||
|
||
DROP TABLE {PortalFlagRelation}; | ||
|
||
ALTER TABLE {PortalFlagRelation}1 RENAME TO {PortalFlagRelation}; | ||
|
||
CREATE_VIEW_PORTAL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters