CREATE TABLE roaming_data_request_types (
	id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
	name VARCHAR(255) NOT NULL,
	code VARCHAR(32) NOT NULL UNIQUE
);

INSERT INTO roaming_data_request_types (id, name, code) VALUES
	(1, 'Data Pack', 'data'),
	(2, 'Voice Plan', 'voice');

ALTER TABLE roaming_data_requests ADD COLUMN request_type_id INT NOT NULL AFTER id;
UPDATE roaming_data_requests SET request_type_id = 1;
ALTER TABLE roaming_data_requests ADD FOREIGN KEY idx_request_type (request_type_id) REFERENCES roaming_data_request_types (id);

ALTER TABLE roaming_data_data_plans ADD COLUMN request_type_id INT NOT NULL;
UPDATE roaming_data_data_plans SET request_type_id = 1;

ALTER TABLE roaming_data_data_plans ADD FOREIGN KEY idx_request_type (request_type_id) REFERENCES roaming_data_request_types (id);

INSERT INTO roaming_data_data_plans (id, cost, included_allowance, request_type_id) VALUES
	(8, 100, 90, 2);