/*
 Navicat Premium Data Transfer

 Source Server         : Localhost
 Source Server Type    : MySQL
 Source Server Version : 50534
 Source Host           : localhost
 Source Database       : itrims_angular

 Target Server Type    : MySQL
 Target Server Version : 50534
 File Encoding         : utf-8

 Date: 11/14/2016 15:06:19 PM
*/

SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `credentialing_affs`
-- ----------------------------
DROP TABLE IF EXISTS `credentialing_affs`;
CREATE TABLE `credentialing_affs` (
  `application_id` int(10) unsigned NOT NULL,
  `name` varchar(100) NOT NULL,
  `date_from` char(7) NOT NULL,
  `date_to` char(7) DEFAULT NULL,
  `street` varchar(100) NOT NULL,
  `city` varchar(100) NOT NULL,
  `state_id` char(2) DEFAULT NULL,
  `country_id` char(2) DEFAULT NULL,
  `zip` varchar(10) NOT NULL,
  `phone` varchar(50) NOT NULL,
  `phone_ext` varchar(20) DEFAULT NULL,
  `fax` varchar(50) DEFAULT NULL,
  `fax_ext` varchar(20) DEFAULT NULL,
  `supervisor` varchar(100) NOT NULL,
  `medical_staff_status` varchar(20) NOT NULL,
  `medical_staff_category` varchar(20) DEFAULT NULL,
  `admitting_privilege` varchar(20) NOT NULL,
  `ord` tinyint(3) unsigned NOT NULL,
  KEY `state_id` (`state_id`),
  KEY `FK_credentialing_empls_applications` (`application_id`),
  KEY `country_id` (`country_id`),
  CONSTRAINT `credentialing_affs_ibfk_1` FOREIGN KEY (`application_id`) REFERENCES `applications` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

SET FOREIGN_KEY_CHECKS = 1;
