ALTER TABLE hw2_user ADD COLUMN country_id int(11) NOT NULL DEFAULT 233;
ALTER TABLE hw2_user ADD FOREIGN KEY (country_id) REFERENCES hw2_country_identifier(id);
ALTER TABLE hw2_order DROP COLUMN necropsy;
ALTER TABLE hw2_order ADD COLUMN deprecated_info varchar(1024) DEFAULT NULL;
ALTER TABLE hw2_order ADD COLUMN requires_manual_review tinyint(1) NOT NULL DEFAULT FALSE;
ALTER TABLE hw2_order ADD COLUMN used_free_trial tinyint(1) NOT NULL DEFAULT FALSE;
ALTER TABLE hw2_order ADD COLUMN routine_histology tinyint(1) NOT NULL DEFAULT FALSE;
ALTER TABLE hw2_order ADD COLUMN long_term_data_mgmt tinyint(1) NOT NULL DEFAULT FALSE;
ALTER TABLE hw2_histology_service MODIFY COLUMN special_instructions varchar(512) DEFAULT NULL;
ALTER TABLE hw2_histology_service ADD COLUMN auto_image_analysis tinyint(1) NOT NULL DEFAULT FALSE;
ALTER TABLE hw2_histology_service ADD COLUMN ihc tinyint(1) NOT NULL DEFAULT FALSE;
ALTER TABLE hw2_histology_service ADD COLUMN thickness int(11) DEFAULT NULL;
ALTER TABLE hw2_histology_service ADD COLUMN whole_slide_imaging tinyint(1) NOT NULL DEFAULT FALSE;
INSERT INTO hw2_ihc_antigen (name) SELECT distinct antigen_name FROM hw2_ihc_stain;
ALTER TABLE hw2_ihc_stain ADD COLUMN antigen_id int(11) NOT NULL;
UPDATE hw2_ihc_stain
INNER JOIN
hw2_ihc_antigen
ON hw2_ihc_stain.antigen_name = hw2_ihc_antigen.name
SET hw2_ihc_stain.antigen_id = hw2_ihc_antigen.id;
ALTER TABLE hw2_ihc_stain ADD FOREIGN KEY fk_hw2_antigen(antigen_id) REFERENCES hw2_ihc_antigen(id);
ALTER TABLE hw2_ihc_stain DROP COLUMN antigen_name;
ALTER TABLE hw2_ihc_stain ADD COLUMN custom_antigen VARCHAR(64) DEFAULT NULL;
ALTER TABLE hw2_slide MODIFY COLUMN stain_id int(11) DEFAULT NULL;
ALTER TABLE hw2_slide ADD COLUMN order_id int(11) NOT NULL;
ALTER TABLE hw2_slide ADD FOREIGN KEY fk_hw2_slide_order(order_id) REFERENCES hw2_order(id);
ALTER TABLE hw2_sample DROP COLUMN scan_at_40x;
ALTER TABLE hw2_sample DROP COLUMN scientific_info;
ALTER TABLE hw2_stain DROP COLUMN scientific_info;
ALTER TABLE hw2_order DROP COLUMN science_info;
ALTER TABLE hw2_histology_service ADD COLUMN process_and_embed_only tinyint(1) NOT NULL DEFAULT FALSE;