--------------------------------------------------
-- 12/16/2020
-- Author: Tony Chen 
-- Following changes are made to add two new  
-- resources, expanse, and expanse-gpu for jobs run
-- on Expanse CPU and Expanse GPU. 
--------------------------------------------------

INSERT INTO `application_preferences` (`NAME`, `PREFERENCE`, `VALUE`) VALUES 
    ('PORTAL2', 'xsede.attribute.reporting.expanse.resources.enabled', '0')
;
-- --------------------------------------------------

-- Add a new column 'CHARGE_FACTOR'
ALTER TABLE `resource_conversion` 
    ADD COLUMN `CHARGE_FACTOR` DECIMAL(5,2) NOT NULL DEFAULT '1.00' AFTER `RESOURCE_FULL_NAME`
;

-- Change the data type of 'CONVERSION' to DECIMAL.
ALTER TABLE `resource_conversion` 
    CHANGE COLUMN `CONVERSION` `CONVERSION` DECIMAL(5,2) NOT NULL DEFAULT '1.00' 
;
-- --------------------------------------------------

INSERT INTO `version` (`VERSION`, `LAST_MODIFIED_TIME`) VALUES 
    ('2020-12-16', NOW())
;
-- --------------------------------------------------
