use gen_characteristics_local;

INSERT INTO scopes (`name`) VALUES ('Country');
INSERT INTO scopes (`name`) VALUES ('Program');
INSERT INTO scopes (`name`) VALUES ('Location');
INSERT INTO scopes (`name`) VALUES ('Stage Type');
INSERT INTO scopes (`name`) VALUES ('Stage');

select * from scopes;

INSERT INTO trees (`name`,`priority_array`) VALUES ('Stage','[5]');
select * from trees;

INSERT INTO `gen_characteristics_local`.`characteristics` (`name`,`tree_id`) VALUES('needsCompletitionFromApplicant',1);


SELECT `characteristics`.`id`,
    `characteristics`.`name`,
    `characteristics`.`tree_id`
FROM `gen_characteristics_local`.`characteristics`;

SELECT `characteristic_scope_values`.`id`,
    `characteristic_scope_values`.`scope_id`,
    `characteristic_scope_values`.`characteristic_id`,
    `characteristic_scope_values`.`reference_id`,
    `characteristic_scope_values`.`value`
FROM `gen_characteristics_local`.`characteristic_scope_values`;

