-- delete project and workflows
TRUNCATE `tbg_customfieldoptions`;
TRUNCATE `tbg_customfields`;
TRUNCATE `tbg_issuefields`;
TRUNCATE `tbg_issuetypes`;
TRUNCATE `tbg_issuetype_schemes`;
TRUNCATE `tbg_issuetype_scheme_link`;
TRUNCATE `tbg_projectassignedteams`;
TRUNCATE `tbg_projectassignedusers`;
TRUNCATE `tbg_projects`;
TRUNCATE `tbg_report`;
TRUNCATE `tbg_savedsearches`;
TRUNCATE `tbg_savedsearchfilters`;
TRUNCATE `tbg_workflows`;
TRUNCATE `tbg_workflow_issuetype`;
TRUNCATE `tbg_workflow_schemes`;
TRUNCATE `tbg_workflow_steps`;
TRUNCATE `tbg_workflow_step_transitions`;
TRUNCATE `tbg_workflow_transitions`;
TRUNCATE `tbg_workflow_transition_actions`;
TRUNCATE `tbg_workflow_transition_validation_rules`;

-- delete wiky
TRUNCATE `tbg_articlecategories`;
TRUNCATE `tbg_articlefiles`;
TRUNCATE `tbg_articlehistory`;
TRUNCATE `tbg_articlelinks`;
TRUNCATE `tbg_articles`;
TRUNCATE `tbg_articleviews`;
TRUNCATE `tbg_userarticles`;

-- datos iniciales
INSERT INTO  `tbg_workflows` (
`name` ,
`description` ,
`is_active` ,
`initial_transition_id` ,
`scope` ,
`id` ,
`json_grafico`
)
VALUES (
'Default workflow', 'This is the default workflow. It is used by all projects with no specific workflow selected, and for issue types with no specific workflow specified. This workflow cannot be edited or removed.', '1',  '13',  '1',  '1', NULL
);

INSERT INTO  `tbg_issuetype_schemes` (
`name` ,
`description` ,
`scope` ,
`id`
)
VALUES (
'Default issuetype scheme', 'This is the default issuetype scheme. It is used by all projects with no specific issuetype scheme selected. This scheme cannot be edited or removed.', '1',  '1'
);

INSERT INTO  `tbg_workflow_schemes` (
`name` ,
`description` ,
`scope` ,
`id`
)
VALUES (
'Default workflow scheme', 'This is the default workflow scheme. It is used by all projects with no specific workflow scheme selected. This scheme cannot be edited or removed.', '1',  '1'
);
