-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtrain.sql
74 lines (65 loc) · 2.1 KB
/
train.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
Navicat Premium Data Transfer
Source Server : 10.10.75.208
Source Server Type : MySQL
Source Server Version : 50547
Source Host : 10.10.75.208
Source Database : 12306
Target Server Type : MySQL
Target Server Version : 50547
File Encoding : utf-8
Date: 11/10/2016 11:09:12 AM
*/
SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for `log`
-- ----------------------------
DROP TABLE IF EXISTS `log`;
CREATE TABLE `log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`hid` int(11) NOT NULL,
`train_no` text NOT NULL,
`buy_status` int(1) NOT NULL,
`call_status` int(1) NOT NULL,
`ctime` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for `station_code`
-- ----------------------------
DROP TABLE IF EXISTS `station_code`;
CREATE TABLE `station_code` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(3) NOT NULL,
`name` varchar(20) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`,`code`) USING HASH
) ENGINE=InnoDB AUTO_INCREMENT=2593 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for `user`
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(20) NOT NULL,
`phone` varchar(11) NOT NULL,
`password` char(32) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for `user_hope`
-- ----------------------------
DROP TABLE IF EXISTS `user_hope`;
CREATE TABLE `user_hope` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL,
`stat_station` varchar(3) NOT NULL,
`end_station` varchar(3) NOT NULL,
`go_time` int(11) NOT NULL,
`train_no` varchar(11) NOT NULL DEFAULT '',
`seat_type` varchar(11) NOT NULL DEFAULT '',
`status` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
SET FOREIGN_KEY_CHECKS = 1;