CREATE TABLE IF NOT EXISTS 'text_data' ('id' INTEGER NOT NULL, 'category' INTEGER NOT NULL, 'index' INTEGER NOT NULL, 'text' TEXT NOT NULL, PRIMARY KEY('category','index')); -- SELECT * FROM text_data WHERE category IN (34, 35) AND "index" IN (SELECT race_track_id FROM race_course_set WHERE id IN (10301, 10811, 11103, 11203, 11504)); INSERT INTO text_data (id, category, "index", text) VALUES (34, 34, 10003, 'Niigata Racecourse'); INSERT INTO text_data (id, category, "index", text) VALUES (34, 34, 10008, 'Kyoto Racecourse'); INSERT INTO text_data (id, category, "index", text) VALUES (34, 34, 10101, 'Oi Racecourse'); INSERT INTO text_data (id, category, "index", text) VALUES (34, 34, 10105, 'Morioka Racecourse'); INSERT INTO text_data (id, category, "index", text) VALUES (34, 34, 10201, 'Longchamp Racecourse'); INSERT INTO text_data (id, category, "index", text) VALUES (35, 35, 10003, 'Niigata'); INSERT INTO text_data (id, category, "index", text) VALUES (35, 35, 10008, 'Kyoto'); INSERT INTO text_data (id, category, "index", text) VALUES (35, 35, 10101, 'Oi'); INSERT INTO text_data (id, category, "index", text) VALUES (35, 35, 10105, 'Morioka'); INSERT INTO text_data (id, category, "index", text) VALUES (35, 35, 10201, 'Longchamp'); CREATE TABLE IF NOT EXISTS 'race_course_set' ('id' INTEGER NOT NULL, 'race_track_id' INTEGER NOT NULL, 'distance' INTEGER NOT NULL, 'ground' INTEGER NOT NULL, 'inout' INTEGER NOT NULL, 'turn' INTEGER NOT NULL, 'fence_set' INTEGER NOT NULL, 'float_lane_max' INTEGER NOT NULL, 'course_set_status_id' INTEGER NOT NULL, 'finish_time_min' INTEGER NOT NULL, 'finish_time_min_random_range' INTEGER NOT NULL, 'finish_time_max' INTEGER NOT NULL, 'finish_time_max_random_range' INTEGER NOT NULL, PRIMARY KEY('id')); -- SELECT * FROM race_course_set WHERE id IN (10301, 10811, 11103, 11203, 11504); INSERT INTO race_course_set (id, race_track_id, distance, ground, inout, turn, fence_set, float_lane_max, course_set_status_id, finish_time_min, finish_time_min_random_range, finish_time_max, finish_time_max_random_range) VALUES (10301, 10003, 1000, 1, 1, 4, 10301, 13500, 3, 547000, 10000, 570000, 10000); INSERT INTO race_course_set (id, race_track_id, distance, ground, inout, turn, fence_set, float_lane_max, course_set_status_id, finish_time_min, finish_time_min_random_range, finish_time_max, finish_time_max_random_range) VALUES (10811, 10008, 3200, 1, 3, 1, 10811, 14100, 0, 1930000, 10000, 2040000, 10000); INSERT INTO race_course_set (id, race_track_id, distance, ground, inout, turn, fence_set, float_lane_max, course_set_status_id, finish_time_min, finish_time_min_random_range, finish_time_max, finish_time_max_random_range) VALUES (11103, 10101, 2000, 2, 1, 1, 11101, 12000, 2, 1219000, 10000, 1290000, 10000); INSERT INTO race_course_set (id, race_track_id, distance, ground, inout, turn, fence_set, float_lane_max, course_set_status_id, finish_time_min, finish_time_min_random_range, finish_time_max, finish_time_max_random_range) VALUES (11203, 10201, 2400, 1, 1, 1, 11203, 12000, 3, 1416000, 10000, 1490000, 10000); INSERT INTO race_course_set (id, race_track_id, distance, ground, inout, turn, fence_set, float_lane_max, course_set_status_id, finish_time_min, finish_time_min_random_range, finish_time_max, finish_time_max_random_range) VALUES (11504, 10105, 2000, 2, 1, 2, 11501, 13500, 2, 1210000, 10000, 1290000, 10000); CREATE TABLE IF NOT EXISTS 'race_course_set_status' ('course_set_status_id' INTEGER NOT NULL, 'target_status_1' INTEGER NOT NULL, 'target_status_2' INTEGER NOT NULL, PRIMARY KEY('course_set_status_id')); -- SELECT * FROM race_course_set_status; INSERT INTO race_course_set_status (course_set_status_id, target_status_1, target_status_2) VALUES (1, 1, 0); INSERT INTO race_course_set_status (course_set_status_id, target_status_1, target_status_2) VALUES (2, 2, 0); INSERT INTO race_course_set_status (course_set_status_id, target_status_1, target_status_2) VALUES (3, 3, 0); INSERT INTO race_course_set_status (course_set_status_id, target_status_1, target_status_2) VALUES (4, 4, 0); INSERT INTO race_course_set_status (course_set_status_id, target_status_1, target_status_2) VALUES (5, 5, 0); INSERT INTO race_course_set_status (course_set_status_id, target_status_1, target_status_2) VALUES (6, 1, 2); INSERT INTO race_course_set_status (course_set_status_id, target_status_1, target_status_2) VALUES (7, 2, 3); INSERT INTO race_course_set_status (course_set_status_id, target_status_1, target_status_2) VALUES (8, 2, 4); INSERT INTO race_course_set_status (course_set_status_id, target_status_1, target_status_2) VALUES (9, 3, 5); INSERT INTO race_course_set_status (course_set_status_id, target_status_1, target_status_2) VALUES (10, 2, 5); INSERT INTO race_course_set_status (course_set_status_id, target_status_1, target_status_2) VALUES (11, 4, 5); CREATE TABLE IF NOT EXISTS 'race_track' ('id' INTEGER NOT NULL, 'initial_lane_type' INTEGER NOT NULL, 'enable_half_gate' INTEGER NOT NULL, 'horse_num_gate_variation' INTEGER NOT NULL, 'turf_vision_type' INTEGER NOT NULL, 'footsmoke_color_type' INTEGER NOT NULL, 'area' INTEGER NOT NULL, 'flag_type' INTEGER NOT NULL, 'gate_panel_type' INTEGER NOT NULL, 'gate_lamp_type' INTEGER NOT NULL, 'board_condition_type' INTEGER NOT NULL, 'result_board_type' INTEGER NOT NULL, PRIMARY KEY('id')); -- SELECT * FROM race_track WHERE id IN (SELECT race_track_id FROM race_course_set WHERE id IN (10301, 10811, 11103, 11203, 11504)); INSERT INTO race_track (id, initial_lane_type, enable_half_gate, horse_num_gate_variation, turf_vision_type, footsmoke_color_type, area, flag_type, gate_panel_type, gate_lamp_type, board_condition_type, result_board_type) VALUES (10003, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 0); INSERT INTO race_track (id, initial_lane_type, enable_half_gate, horse_num_gate_variation, turf_vision_type, footsmoke_color_type, area, flag_type, gate_panel_type, gate_lamp_type, board_condition_type, result_board_type) VALUES (10008, 1, 1, 0, 1, 1, 3, 0, 1, 1, 2, 0); INSERT INTO race_track (id, initial_lane_type, enable_half_gate, horse_num_gate_variation, turf_vision_type, footsmoke_color_type, area, flag_type, gate_panel_type, gate_lamp_type, board_condition_type, result_board_type) VALUES (10101, 2, 0, 1, 2, 2, 2, 1, 1, 1, 3, 0); INSERT INTO race_track (id, initial_lane_type, enable_half_gate, horse_num_gate_variation, turf_vision_type, footsmoke_color_type, area, flag_type, gate_panel_type, gate_lamp_type, board_condition_type, result_board_type) VALUES (10105, 4, 1, 0, 2, 2, 1, 1, 1, 1, 4, 0); INSERT INTO race_track (id, initial_lane_type, enable_half_gate, horse_num_gate_variation, turf_vision_type, footsmoke_color_type, area, flag_type, gate_panel_type, gate_lamp_type, board_condition_type, result_board_type) VALUES (10201, 3, 1, 0, 1, 1, 5, 0, 2, 2, 1, 0);