-- ------------------------------------------------
-- APM-260: Add license category etc.
-- Created 20120615
-- ------------------------------------------------

ALTER TABLE `um_user`
  ADD COLUMN `user_group` VARCHAR(12) NULL DEFAULT NULL  AFTER `test_container` , 
  ADD COLUMN `valid_from` DATE NULL DEFAULT NULL  AFTER `user_group` , 
  ADD COLUMN `valid_to` DATE NULL DEFAULT NULL  AFTER `valid_from` , 
  ADD COLUMN `account_id` VARCHAR(12) NULL DEFAULT NULL  AFTER `valid_to` , 
  ADD COLUMN `cost_center` VARCHAR(8) NULL DEFAULT NULL  AFTER `account_id` , 
  ADD COLUMN `type` CHAR(1) NULL DEFAULT NULL  AFTER `cost_center` , 
  ADD COLUMN `tzone` VARCHAR(6) NULL DEFAULT NULL  AFTER `type` , 
  ADD COLUMN `license_type` CHAR(2) NULL DEFAULT NULL  AFTER `tzone` ,
  ADD COLUMN `locked` CHAR(1) NULL DEFAULT NULL AFTER `license_type` ;

CREATE  TABLE `um_license_text` (
  `system` varchar(8) CHARACTER SET utf8 NOT NULL,
  `client` char(3) CHARACTER SET utf8 NOT NULL,
  `lang` CHAR(1) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NOT NULL ,
  `type` CHAR(2) NOT NULL ,
  `text` VARCHAR(30) NULL ,
  PRIMARY KEY (`system`, `client`, `lang`, `type`) );
