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 (147, 172) AND "index" in (101, 102, 103, 201, 202, 203, 1101, 1102, 1103, 1000101, 1000102, 1000103, 2000101, 2000102, 2000103, 3000101, 3000102, 3000103, 10010101, 10010102, 10010103);
INSERT INTO text_data VALUES(147,147,101,'Speed');
INSERT INTO text_data VALUES(147,147,102,'Speed');
INSERT INTO text_data VALUES(147,147,103,'Speed');
INSERT INTO text_data VALUES(147,147,201,'Stamina');
INSERT INTO text_data VALUES(147,147,202,'Stamina');
INSERT INTO text_data VALUES(147,147,203,'Stamina');
INSERT INTO text_data VALUES(147,147,1101,'Turf');
INSERT INTO text_data VALUES(147,147,1102,'Turf');
INSERT INTO text_data VALUES(147,147,1103,'Turf');
INSERT INTO text_data VALUES(147,147,1000101,'February S.');
INSERT INTO text_data VALUES(147,147,1000102,'February S.');
INSERT INTO text_data VALUES(147,147,1000103,'February S.');
INSERT INTO text_data VALUES(147,147,2000101,'Right-Handed ○');
INSERT INTO text_data VALUES(147,147,2000102,'Right-Handed ○');
INSERT INTO text_data VALUES(147,147,2000103,'Right-Handed ○');
INSERT INTO text_data VALUES(147,147,3000101,'URA Finale');
INSERT INTO text_data VALUES(147,147,3000102,'URA Finale');
INSERT INTO text_data VALUES(147,147,3000103,'URA Finale');
INSERT INTO text_data VALUES(147,147,10010101,'Shooting Star');
INSERT INTO text_data VALUES(147,147,10010102,'Shooting Star');
INSERT INTO text_data VALUES(147,147,10010103,'Shooting Star');
INSERT INTO text_data VALUES(172,172,101,'A Spark that increases Speed.');
INSERT INTO text_data VALUES(172,172,102,'A Spark that increases Speed.');
INSERT INTO text_data VALUES(172,172,103,'A Spark that increases Speed.');
INSERT INTO text_data VALUES(172,172,201,'A Spark that increases Stamina.');
INSERT INTO text_data VALUES(172,172,202,'A Spark that increases Stamina.');
INSERT INTO text_data VALUES(172,172,203,'A Spark that increases Stamina.');
INSERT INTO text_data VALUES(172,172,1101,'A Spark that increases Turf Aptitude.');
INSERT INTO text_data VALUES(172,172,1102,'A Spark that increases Turf Aptitude.');
INSERT INTO text_data VALUES(172,172,1103,'A Spark that increases Turf Aptitude.');
INSERT INTO text_data VALUES(172,172,1000101,'A Spark that increases Power and gives a skill hint for "Winter Runner ○".');
INSERT INTO text_data VALUES(172,172,1000102,'A Spark that increases Power and gives a skill hint for "Winter Runner ○".');
INSERT INTO text_data VALUES(172,172,1000103,'A Spark that increases Power and gives a skill hint for "Winter Runner ○".');
INSERT INTO text_data VALUES(172,172,2000101,'A Spark that gives a skill hint for "Right-Handed ○".');
INSERT INTO text_data VALUES(172,172,2000102,'A Spark that gives a skill hint for "Right-Handed ○".');
INSERT INTO text_data VALUES(172,172,2000103,'A Spark that gives a skill hint for "Right-Handed ○".');
INSERT INTO text_data VALUES(172,172,3000101,'A Spark that increases Speed and Stamina.');
INSERT INTO text_data VALUES(172,172,3000102,'A Spark that increases Speed and Stamina.');
INSERT INTO text_data VALUES(172,172,3000103,'A Spark that increases Speed and Stamina.');
INSERT INTO text_data VALUES(172,172,10010101,'A Spark that gives a skill hint for "Shooting Star".');
INSERT INTO text_data VALUES(172,172,10010102,'A Spark that gives a skill hint for "Shooting Star".');
INSERT INTO text_data VALUES(172,172,10010103,'A Spark that gives a skill hint for "Shooting Star".');

CREATE TABLE IF NOT EXISTS 'succession_factor' ('factor_id' INTEGER NOT NULL, 'factor_group_id' INTEGER NOT NULL, 'rarity' INTEGER NOT NULL, 'grade' INTEGER NOT NULL, 'factor_type' INTEGER NOT NULL, 'effect_group_id' INTEGER NOT NULL, 'start_date' INTEGER NOT NULL, 'end_date' INTEGER NOT NULL, PRIMARY KEY('factor_id'));
-- SELECT * FROM succession_factor WHERE factor_id IN (101, 102, 103, 201, 202, 203, 1101, 1102, 1103, 1000101, 1000102, 1000103, 2000101, 2000102, 2000103, 3000101, 3000102, 3000103, 10010101, 10010102, 10010103);
INSERT INTO succession_factor VALUES(101,1,1,1,1,11,1483228800,2524608000);
INSERT INTO succession_factor VALUES(102,1,2,1,1,12,1483228800,2524608000);
INSERT INTO succession_factor VALUES(103,1,3,1,1,13,1483228800,2524608000);
INSERT INTO succession_factor VALUES(201,2,1,1,1,11,1483228800,2524608000);
INSERT INTO succession_factor VALUES(202,2,2,1,1,12,1483228800,2524608000);
INSERT INTO succession_factor VALUES(203,2,3,1,1,13,1483228800,2524608000);
INSERT INTO succession_factor VALUES(1101,11,1,1,2,21,1483228800,2524608000);
INSERT INTO succession_factor VALUES(1102,11,2,1,2,22,1483228800,2524608000);
INSERT INTO succession_factor VALUES(1103,11,3,1,2,23,1483228800,2524608000);
INSERT INTO succession_factor VALUES(1000101,10001,1,1,5,51,1483228800,2524608000);
INSERT INTO succession_factor VALUES(1000102,10001,2,1,5,52,1483228800,2524608000);
INSERT INTO succession_factor VALUES(1000103,10001,3,1,5,53,1483228800,2524608000);
INSERT INTO succession_factor VALUES(2000101,20001,1,1,4,41,1483228800,2524608000);
INSERT INTO succession_factor VALUES(2000102,20001,2,1,4,42,1483228800,2524608000);
INSERT INTO succession_factor VALUES(2000103,20001,3,1,4,43,1483228800,2524608000);
INSERT INTO succession_factor VALUES(3000101,30001,1,1,6,51,1483228800,2524608000);
INSERT INTO succession_factor VALUES(3000102,30001,2,1,6,52,1483228800,2524608000);
INSERT INTO succession_factor VALUES(3000103,30001,3,1,6,53,1483228800,2524608000);
INSERT INTO succession_factor VALUES(10010101,100101,1,2,3,31,1483228800,2524608000);
INSERT INTO succession_factor VALUES(10010102,100101,2,2,3,32,1483228800,2524608000);
INSERT INTO succession_factor VALUES(10010103,100101,3,2,3,33,1483228800,2524608000);

CREATE TABLE IF NOT EXISTS 'succession_factor_effect' ('id' INTEGER NOT NULL, 'factor_group_id' INTEGER NOT NULL, 'effect_id' INTEGER NOT NULL, 'target_type' INTEGER NOT NULL, 'value_1' INTEGER NOT NULL, 'value_2' INTEGER NOT NULL, PRIMARY KEY('id'));
-- SELECT * FROM succession_factor_effect WHERE factor_group_id IN (SELECT factor_group_id FROM succession_factor WHERE factor_id IN (101, 102, 103, 201, 202, 203, 1101, 1102, 1103, 1000101, 1000102, 1000103, 2000101, 2000102, 2000103, 3000101, 3000102, 3000103, 10010101, 10010102, 10010103));
INSERT INTO succession_factor_effect VALUES(1,1,1,1,1,0);
INSERT INTO succession_factor_effect VALUES(2,1,2,1,4,0);
INSERT INTO succession_factor_effect VALUES(3,1,3,1,7,0);
INSERT INTO succession_factor_effect VALUES(4,1,4,1,10,0);
INSERT INTO succession_factor_effect VALUES(5,1,5,1,13,0);
INSERT INTO succession_factor_effect VALUES(6,1,6,1,16,0);
INSERT INTO succession_factor_effect VALUES(7,1,7,1,19,0);
INSERT INTO succession_factor_effect VALUES(8,1,8,1,22,0);
INSERT INTO succession_factor_effect VALUES(9,1,9,1,25,0);
INSERT INTO succession_factor_effect VALUES(10,1,10,1,28,0);
INSERT INTO succession_factor_effect VALUES(11,2,1,2,1,0);
INSERT INTO succession_factor_effect VALUES(12,2,2,2,4,0);
INSERT INTO succession_factor_effect VALUES(13,2,3,2,7,0);
INSERT INTO succession_factor_effect VALUES(14,2,4,2,10,0);
INSERT INTO succession_factor_effect VALUES(15,2,5,2,13,0);
INSERT INTO succession_factor_effect VALUES(16,2,6,2,16,0);
INSERT INTO succession_factor_effect VALUES(17,2,7,2,19,0);
INSERT INTO succession_factor_effect VALUES(18,2,8,2,22,0);
INSERT INTO succession_factor_effect VALUES(19,2,9,2,25,0);
INSERT INTO succession_factor_effect VALUES(20,2,10,2,28,0);
INSERT INTO succession_factor_effect VALUES(51,11,1,11,1,0);
INSERT INTO succession_factor_effect VALUES(52,11,2,11,2,0);
INSERT INTO succession_factor_effect VALUES(1144,10001,1,3,3,0);
INSERT INTO succession_factor_effect VALUES(1145,10001,1,41,200202,1);
INSERT INTO succession_factor_effect VALUES(1146,10001,2,3,6,0);
INSERT INTO succession_factor_effect VALUES(1147,10001,2,41,200202,1);
INSERT INTO succession_factor_effect VALUES(1148,10001,3,3,9,0);
INSERT INTO succession_factor_effect VALUES(1149,10001,3,41,200202,1);
INSERT INTO succession_factor_effect VALUES(344,20001,1,41,200012,1);
INSERT INTO succession_factor_effect VALUES(345,20001,2,41,200012,2);
INSERT INTO succession_factor_effect VALUES(346,20001,3,41,200012,3);
INSERT INTO succession_factor_effect VALUES(347,20001,4,41,200012,4);
INSERT INTO succession_factor_effect VALUES(348,20001,5,41,200012,5);
INSERT INTO succession_factor_effect VALUES(1324,30001,1,1,10,0);
INSERT INTO succession_factor_effect VALUES(1325,30001,1,2,10,0);
INSERT INTO succession_factor_effect VALUES(1326,30001,2,1,20,0);
INSERT INTO succession_factor_effect VALUES(1327,30001,2,2,20,0);
INSERT INTO succession_factor_effect VALUES(1328,30001,3,1,30,0);
INSERT INTO succession_factor_effect VALUES(1329,30001,3,2,30,0);
INSERT INTO succession_factor_effect VALUES(71,100101,1,41,900011,1);
INSERT INTO succession_factor_effect VALUES(73,100101,2,41,900011,2);
INSERT INTO succession_factor_effect VALUES(75,100101,3,41,900011,3);