-- ------------------------------------------------
-- Tables for Role Journal attributes
-- Created 20131023
-- ------------------------------------------------

CREATE TABLE IF NOT EXISTS `um_attributes` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `attribute` VARCHAR(100) NOT NULL,
  `system` VARCHAR(8) NOT NULL,
  `client` VARCHAR(3) NOT NULL,
  PRIMARY KEY (`id`));

CREATE TABLE IF NOT EXISTS `um_attribute_choices` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `attribute_id` INT NOT NULL,
  `choice` VARCHAR(100) NOT NULL,
  PRIMARY KEY (`id`));

CREATE TABLE IF NOT EXISTS `um_role_attributes` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `role_id` INT NOT NULL,
  `attribute_choice_id` INT NOT NULL,
  PRIMARY KEY (`id`));
 