CREATE TABLE ongeki_user_option_new
(
    id                INTEGER,
    "abort"           INTEGER NOT NULL,
    color_field       INTEGER NOT NULL,
    color_lane        INTEGER NOT NULL,
    color_lane_bright INTEGER NOT NULL,
    color_side        INTEGER NOT NULL,
    dispbp            INTEGER NOT NULL,
    disp_player_lv    INTEGER NOT NULL,
    disp_rating       INTEGER NOT NULL,
    effect_damage     INTEGER NOT NULL,
    effect_pos        INTEGER NOT NULL,
    headphone         INTEGER NOT NULL,
    judge_break       INTEGER NOT NULL,
    judge_disp        INTEGER NOT NULL,
    judge_hit         INTEGER NOT NULL,
    judge_pos         INTEGER NOT NULL,
    judge_timing      INTEGER NOT NULL,
    judge_adjustment  INTEGER NOT NULL,
    matching          INTEGER NOT NULL,
    mirror            INTEGER NOT NULL,
    option_set        INTEGER NOT NULL,
    speed             INTEGER NOT NULL,
    tap_sound         INTEGER NOT NULL,
    vol_all           INTEGER NOT NULL,
    vol_bell          INTEGER NOT NULL,
    vol_cr_tap        INTEGER NOT NULL,
    vol_damage        INTEGER NOT NULL,
    vol_enemy         INTEGER NOT NULL,
    vol_flick         INTEGER NOT NULL,
    vol_guide         INTEGER NOT NULL,
    vol_hold          INTEGER NOT NULL,
    vol_side          INTEGER NOT NULL,
    vol_skill         INTEGER NOT NULL,
    vol_tap           INTEGER NOT NULL,
    user_id           BIGINT REFERENCES ongeki_user_data (id) ON DELETE CASCADE
        UNIQUE ON CONFLICT REPLACE,
    PRIMARY KEY (
                 id
        )
);

INSERT INTO ongeki_user_option_new (
    id,
    "abort",
    color_field,
    color_lane,
    color_lane_bright,
    color_side,
    dispbp,
    disp_player_lv,
    disp_rating,
    effect_damage,
    effect_pos,
    headphone,
    judge_break,
    judge_disp,
    judge_hit,
    judge_pos,
    judge_timing,
    matching,
    mirror,
    option_set,
    speed,
    tap_sound,
    vol_all,
    vol_bell,
    vol_cr_tap,
    vol_damage,
    vol_enemy,
    vol_flick,
    vol_guide,
    vol_hold,
    vol_side,
    vol_skill,
    vol_tap,
    user_id,
    judge_adjustment
)
SELECT id,
       "abort",
       color_field,
       color_lane,
       color_lane_bright,
       color_side,
       dispbp,
       disp_player_lv,
       disp_rating,
       effect_damage,
       effect_pos,
       headphone,
       judge_break,
       judge_disp,
       judge_hit,
       judge_pos,
       judge_timing,
       matching,
       mirror,
       option_set,
       speed,
       tap_sound,
       vol_all,
       vol_bell,
       vol_cr_tap,
       vol_damage,
       vol_enemy,
       vol_flick,
       vol_guide,
       vol_hold,
       vol_side,
       vol_skill,
       vol_tap,
       user_id,
       20
FROM ongeki_user_option;

ALTER TABLE ongeki_user_option RENAME TO bak_ongeki_user_option;
ALTER TABLE ongeki_user_option_new RENAME TO ongeki_user_option;