From c0732beccf2a2f3e9c18725a21e3691823f87312 Mon Sep 17 00:00:00 2001
From: houxiao <houxiao@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期四, 16 三月 2017 11:18:45 +0800
Subject: [PATCH] update sql

---
 VisitFace/script/face_discern.mysql.sql |   52 ++++++++++++++++++++++++++--------------------------
 1 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/VisitFace/script/face_discern.mysql.txt b/VisitFace/script/face_discern.mysql.sql
similarity index 87%
rename from VisitFace/script/face_discern.mysql.txt
rename to VisitFace/script/face_discern.mysql.sql
index 8ff90aa..3c73c48 100644
--- a/VisitFace/script/face_discern.mysql.txt
+++ b/VisitFace/script/face_discern.mysql.sql
@@ -20,7 +20,7 @@
 -- ----------------------------
 DROP TABLE IF EXISTS `calling`;
 CREATE TABLE `calling` (
-  `id` int(32) NOT NULL AUTO_INCREMENT COMMENT '绛惧埌浜嬩欢涓婚敭',
+  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '绛惧埌浜嬩欢涓婚敭',
   `call_dt` datetime DEFAULT NULL COMMENT '鍛煎彨鏃堕棿',
   `caller_person_id` int(10) DEFAULT NULL COMMENT '鍛煎彨浜哄憳涓婚敭',
   `callee_person_id` int(10) DEFAULT NULL COMMENT '琚懠鍙汉鍛樹富閿�',
@@ -39,11 +39,11 @@
 -- ----------------------------
 DROP TABLE IF EXISTS `checking`;
 CREATE TABLE `checking` (
-  `id` int(32) NOT NULL AUTO_INCREMENT COMMENT '绛惧埌浜嬩欢涓婚敭',
+  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '绛惧埌浜嬩欢涓婚敭',
   `status_id` tinyint(2) DEFAULT NULL COMMENT '绛惧埌鐘舵��',
   `status_dt` datetime DEFAULT NULL COMMENT '绛惧埌鏃堕棿',
-  `person_id` int(32) DEFAULT NULL COMMENT '浜哄憳涓婚敭',
-  `place_id` int(32) DEFAULT NULL COMMENT '绛惧埌浣嶇疆',
+  `person_id` int(10) DEFAULT NULL COMMENT '浜哄憳涓婚敭',
+  `place_id` int(10) DEFAULT NULL COMMENT '绛惧埌浣嶇疆',
   PRIMARY KEY (`id`),
   KEY `person_id` (`person_id`),
   KEY `place_id` (`place_id`),
@@ -56,8 +56,8 @@
 -- ----------------------------
 DROP TABLE IF EXISTS `checking_company`;
 CREATE TABLE `checking_company` (
-  `person_id` int(32) NOT NULL COMMENT '浜哄憳涓婚敭',
-  `company_id` int(32) NOT NULL COMMENT '鍏徃涓婚敭',
+  `person_id` int(10) NOT NULL COMMENT '浜哄憳涓婚敭',
+  `company_id` int(10) NOT NULL COMMENT '鍏徃涓婚敭',
   PRIMARY KEY (`person_id`,`company_id`),
   KEY `company_id` (`company_id`),
   CONSTRAINT `checking_company_ibfk_1` FOREIGN KEY (`person_id`) REFERENCES `person` (`id`),
@@ -70,7 +70,7 @@
 DROP TABLE IF EXISTS `company`;
 CREATE TABLE `company` (
   `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '鍏徃涓婚敭',
-  `name` varchar(255) DEFAULT NULL COMMENT '鍏徃鍚嶇О',
+  `name` varchar(50) DEFAULT NULL COMMENT '鍏徃鍚嶇О',
   PRIMARY KEY (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 
@@ -108,7 +108,7 @@
 DROP TABLE IF EXISTS `image`;
 CREATE TABLE `image` (
   `person_id` int(10) DEFAULT NULL COMMENT '浜哄憳涓婚敭',
-  `image_type` varchar(32) DEFAULT NULL COMMENT '鍥剧墖绫诲瀷',
+  `image_type` int(10) DEFAULT NULL COMMENT '鍥剧墖绫诲瀷',
   `image_path` varchar(255) DEFAULT NULL COMMENT '鍥剧墖鍦板潃',
   KEY `person_id` (`person_id`),
   CONSTRAINT `image_ibfk_1` FOREIGN KEY (`person_id`) REFERENCES `person` (`id`)
@@ -129,8 +129,8 @@
   `birthday` date DEFAULT NULL COMMENT '鍑虹敓鏃ユ湡',
   `phone` char(12) DEFAULT NULL COMMENT '搴ф満鐢佃瘽',
   `mobile_phone` char(15) DEFAULT NULL COMMENT '绉诲姩鐢佃瘽',
-  `identity_type` char(40) DEFAULT NULL COMMENT '璇佷欢绫诲瀷',
-  `identify` varchar(255) DEFAULT NULL COMMENT '璇佷欢缂栧彿',
+  `identity_type` int(10) DEFAULT NULL COMMENT '璇佷欢绫诲瀷',
+  `identify` varchar(100) DEFAULT NULL COMMENT '璇佷欢缂栧彿',
   `company_id` int(10) DEFAULT NULL COMMENT '鍏徃涓婚敭',
   `department_id` int(10) DEFAULT NULL COMMENT '閮ㄩ棬涓婚敭',
   `post_id` int(10) DEFAULT NULL COMMENT '鑱屽姟涓婚敭',
@@ -150,7 +150,7 @@
 -- ----------------------------
 DROP TABLE IF EXISTS `person_ext`;
 CREATE TABLE `person_ext` (
-  `person_id` int(32) DEFAULT NULL COMMENT '浜哄憳涓婚敭',
+  `person_id` int(10) DEFAULT NULL COMMENT '浜哄憳涓婚敭',
   KEY `person_id` (`person_id`),
   CONSTRAINT `person_ext_ibfk_1` FOREIGN KEY (`person_id`) REFERENCES `person` (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
@@ -184,12 +184,12 @@
 -- ----------------------------
 DROP TABLE IF EXISTS `visit`;
 CREATE TABLE `visit` (
-  `id` int(32) NOT NULL AUTO_INCREMENT COMMENT '璁块棶浜嬩欢涓婚敭',
-  `visitor_person_id` int(32) DEFAULT NULL COMMENT '璁块棶浜哄憳涓婚敭',
-  `visitee_person_id` int(32) DEFAULT NULL COMMENT '琚闂汉鍛樹富閿�',
-  `matter_id` int(32) DEFAULT NULL COMMENT '璁块棶浜嬬敱涓婚敭',
+  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '璁块棶浜嬩欢涓婚敭',
+  `visitor_person_id` int(10) DEFAULT NULL COMMENT '璁块棶浜哄憳涓婚敭',
+  `visitee_person_id` int(10) DEFAULT NULL COMMENT '琚闂汉鍛樹富閿�',
+  `matter_id` int(10) DEFAULT NULL COMMENT '璁块棶浜嬬敱涓婚敭',
   `remark` varchar(255) DEFAULT NULL COMMENT '璁块棶澶囨敞',
-  `last_status` int(40) DEFAULT NULL COMMENT '鏈�鏂扮殑璁块棶鐘舵��',
+  `last_status` int(10) DEFAULT NULL COMMENT '鏈�鏂扮殑璁块棶鐘舵��',
   `start_time` datetime DEFAULT NULL COMMENT '鏉ヨ鏃堕棿',
   `last_time` datetime DEFAULT NULL COMMENT '绛剧鏃堕棿',
   `visitor_company_id` int(10) DEFAULT NULL,
@@ -233,10 +233,10 @@
 -- ----------------------------
 DROP TABLE IF EXISTS `visitor_type`;
 CREATE TABLE `visitor_type` (
-  `id` int(32) NOT NULL AUTO_INCREMENT COMMENT '璁垮绫诲瀷涓婚敭',
+  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '璁垮绫诲瀷涓婚敭',
   `label` varchar(32) DEFAULT NULL COMMENT '璁垮绫诲瀷',
-  `register_company_id` int(32) DEFAULT NULL COMMENT '娉ㄥ唽鍏徃涓婚敭',
-  `available` tinyint(1) DEFAULT NULL COMMENT '浜哄憳涓婚敭',
+  `register_company_id` int(10) DEFAULT NULL COMMENT '娉ㄥ唽鍏徃涓婚敭',
+  `available` tinyint(1) DEFAULT NULL COMMENT '鏄惁鏄彲鐢�',
   PRIMARY KEY (`id`),
   KEY `register_company_id` (`register_company_id`),
   CONSTRAINT `visitor_type_ibfk_1` FOREIGN KEY (`register_company_id`) REFERENCES `company` (`id`)
@@ -247,10 +247,10 @@
 -- ----------------------------
 DROP TABLE IF EXISTS `visit_matter`;
 CREATE TABLE `visit_matter` (
-  `id` int(32) NOT NULL AUTO_INCREMENT COMMENT '璁块棶浜嬬敱涓婚敭',
-  `company_id` int(32) DEFAULT NULL COMMENT '鍏徃涓婚敭',
+  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '璁块棶浜嬬敱涓婚敭',
+  `company_id` int(10) DEFAULT NULL COMMENT '鍏徃涓婚敭',
   `label` varchar(40) NOT NULL COMMENT '璁块棶浜嬬敱',
-  `available` tinyint(1) DEFAULT NULL COMMENT '鏄惁鏄�氱敤浜嬬敱',
+  `available` tinyint(1) DEFAULT NULL COMMENT '鏄惁鏄彲鐢�',
   PRIMARY KEY (`id`),
   KEY `company_id` (`company_id`),
   CONSTRAINT `visit_matter_ibfk_1` FOREIGN KEY (`company_id`) REFERENCES `company` (`id`)
@@ -261,9 +261,9 @@
 -- ----------------------------
 DROP TABLE IF EXISTS `visit_person_type`;
 CREATE TABLE `visit_person_type` (
-  `register_company_id` int(11) NOT NULL,
-  `person_id` int(11) NOT NULL,
-  `visitor_type_id` int(11) NOT NULL,
+  `register_company_id` int(10) NOT NULL,
+  `person_id` int(10) NOT NULL,
+  `visitor_type_id` int(10) NOT NULL,
   PRIMARY KEY (`register_company_id`,`person_id`,`visitor_type_id`),
   KEY `person_id` (`person_id`) USING BTREE,
   KEY `visitor_type_id` (`visitor_type_id`) USING BTREE,
@@ -279,7 +279,7 @@
 CREATE TABLE `visit_stat` (
   `person_id` int(10) NOT NULL COMMENT '浜哄憳涓婚敭',
   `register_company_id` int(10) NOT NULL COMMENT '娉ㄥ唽鍏徃涓婚敭',
-  `total_count` int(20) DEFAULT NULL COMMENT '鏉ヨ鍏徃娆℃暟',
+  `total_count` int(10) DEFAULT NULL COMMENT '鏉ヨ鍏徃娆℃暟',
   PRIMARY KEY (`person_id`,`register_company_id`),
   KEY `person_id` (`person_id`),
   KEY `register_company_id` (`register_company_id`),

--
Gitblit v1.8.0