/*
 * clone genomics to genomics_v3 nightly backup:  mysql -uraj -p genomics_v3 < genomics.sql
 * create backup of lab_sections, lab_tests, screens, etc tables (this script)
  * run genomics_cancer_v3.sql
*/

USE `genomics_v3`;

DROP TABLE IF EXISTS _lab_sections;
CREATE TABLE _lab_sections LIKE lab_sections;
INSERT INTO _lab_sections SELECT * FROM lab_sections;

DROP TABLE IF EXISTS _lab_tests;
CREATE TABLE _lab_tests LIKE lab_tests;
INSERT INTO _lab_tests SELECT * FROM lab_tests;

DROP TABLE IF EXISTS _lab_test_result_data_types;
CREATE TABLE _lab_test_result_data_types LIKE lab_test_result_data_types;
INSERT INTO _lab_test_result_data_types SELECT * FROM lab_test_result_data_types;

DROP TABLE IF EXISTS _lab_test_data_type;
CREATE TABLE _lab_test_data_type LIKE lab_test_data_type;
INSERT INTO _lab_test_data_type SELECT * FROM lab_test_data_type;

DROP TABLE IF EXISTS _lab_test_result_options;
CREATE TABLE _lab_test_result_options LIKE lab_test_result_options;
INSERT INTO _lab_test_result_options SELECT * FROM lab_test_result_options;

DROP TABLE IF EXISTS _screen_category;
CREATE TABLE _screen_category LIKE screen_category;
INSERT INTO _screen_category SELECT * FROM screen_category;

DROP TABLE IF EXISTS _screens;
CREATE TABLE _screens LIKE screens;
INSERT INTO _screens SELECT * FROM screens;
