· 6 years ago · Dec 30, 2019, 09:16 PM
1BEGIN;
2
3-- CREATE TABLE "ps2_wallet" -----------------------------------
4CREATE TABLE "ps2_wallet"(
5 "points" Integer NOT NULL,
6 "premiumPoints" Integer NOT NULL,
7 "ownerId" Integer NOT NULL,
8 "id" Integer PRIMARY KEY AUTOINCREMENT,
9 CONSTRAINT "FK_1332519100" FOREIGN KEY ( "ownerId" ) REFERENCES "libk_player"( "id" )
10 ON DELETE Cascade
11 ON UPDATE Restrict
12 );
13-- -------------------------------------------------------------
14
15COMMIT;
16
17BEGIN;
18
19-- CREATE LINK "FK_1332519100" ---------------------------------
20PRAGMA legacy_alter_table=1;
21
22DROP TABLE IF EXISTS "__vs_temp_table";
23
24CREATE TABLE "__vs_temp_table"(
25 "points" Integer NOT NULL,
26 "premiumPoints" Integer NOT NULL,
27 "ownerId" Integer NOT NULL,
28 "id" Integer PRIMARY KEY AUTOINCREMENT,
29 CONSTRAINT "FK_1332519100" FOREIGN KEY ( "ownerId" ) REFERENCES "libk_player"( "id" )
30 ON DELETE Cascade
31 ON UPDATE Restrict
32 );
33
34INSERT INTO "__vs_temp_table"("points","premiumPoints","ownerId","id")
35 SELECT "points","premiumPoints","ownerId","id" FROM "ps2_wallet";
36
37DROP TABLE IF EXISTS "ps2_wallet";
38
39ALTER TABLE "__vs_temp_table" RENAME TO "ps2_wallet";
40
41PRAGMA legacy_alter_table=0;
42-- -------------------------------------------------------------
43
44COMMIT;
45BEGIN;
46
47-- CREATE TABLE "Sublime_Data" ---------------------------------
48CREATE TABLE "Sublime_Data"(
49 "ID" Integer PRIMARY KEY AUTOINCREMENT,
50 "ExperienceGained" Integer,
51 "LevelsGained" Integer );
52-- -------------------------------------------------------------
53
54COMMIT;