mirror of https://github.com/hykilpikonna/AquaDX
[ongeki] fix chapter jewel not saved
parent
8feed030f6
commit
ecf91763a6
|
@ -34,6 +34,14 @@ public class UserStory implements Serializable {
|
||||||
|
|
||||||
private int lastChapterId;
|
private int lastChapterId;
|
||||||
|
|
||||||
|
private int jewelCount;
|
||||||
|
|
||||||
|
private int lastPlayMusicId;
|
||||||
|
|
||||||
|
private int lastPlayMusicCategory;
|
||||||
|
|
||||||
|
private int lastPlayMusicLevel;
|
||||||
|
|
||||||
public UserStory(UserData userData) {
|
public UserStory(UserData userData) {
|
||||||
this.user = userData;
|
this.user = userData;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
ALTER TABLE `ongeki_user_story`
|
||||||
|
ADD COLUMN `jewel_count` int(11),
|
||||||
|
ADD COLUMN `last_play_music_id` int(11),
|
||||||
|
ADD COLUMN `last_play_music_category` int(11),
|
||||||
|
ADD COLUMN `last_play_music_level` int(11);
|
|
@ -0,0 +1,36 @@
|
||||||
|
PRAGMA foreign_keys = 0;
|
||||||
|
|
||||||
|
CREATE TABLE ongeki_user_story_new (
|
||||||
|
id INTEGER,
|
||||||
|
last_chapter_id INTEGER NOT NULL,
|
||||||
|
story_id INTEGER NOT NULL,
|
||||||
|
jewel_count INTEGER,
|
||||||
|
last_play_music_id INTEGER,
|
||||||
|
last_play_music_category INTEGER,
|
||||||
|
last_play_music_level INTEGER,
|
||||||
|
user_id BIGINT REFERENCES ongeki_user_data (id) ON DELETE CASCADE,
|
||||||
|
PRIMARY KEY (
|
||||||
|
id
|
||||||
|
),
|
||||||
|
CONSTRAINT ongeki_user_story_uq UNIQUE (
|
||||||
|
story_id,
|
||||||
|
user_id
|
||||||
|
) ON CONFLICT REPLACE
|
||||||
|
);
|
||||||
|
|
||||||
|
INSERT INTO ongeki_user_story_new (
|
||||||
|
id,
|
||||||
|
last_chapter_id,
|
||||||
|
story_id,
|
||||||
|
user_id
|
||||||
|
)
|
||||||
|
SELECT id,
|
||||||
|
last_chapter_id,
|
||||||
|
story_id,
|
||||||
|
user_id
|
||||||
|
FROM ongeki_user_story;
|
||||||
|
|
||||||
|
ALTER TABLE ongeki_user_story RENAME TO bak_ongeki_user_story;
|
||||||
|
ALTER TABLE ongeki_user_story_new RENAME TO ongeki_user_story;
|
||||||
|
|
||||||
|
PRAGMA foreign_keys = 1;
|
Loading…
Reference in New Issue