-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathyiiadvapps.sql
159 lines (130 loc) · 5.04 KB
/
yiiadvapps.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# Host: localhost (Version: 5.5.53)
# Date: 2017-06-04 15:31:29
# Generator: MySQL-Front 5.3 (Build 4.234)
/*!40101 SET NAMES utf8 */;
#
# Structure for table "auth_rule"
#
DROP TABLE IF EXISTS `auth_rule`;
CREATE TABLE `auth_rule` (
`name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`data` blob,
`created_at` int(11) DEFAULT NULL,
`updated_at` int(11) DEFAULT NULL,
PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
#
# Data for table "auth_rule"
#
#
# Structure for table "auth_item"
#
DROP TABLE IF EXISTS `auth_item`;
CREATE TABLE `auth_item` (
`name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`type` smallint(6) NOT NULL,
`description` text COLLATE utf8_unicode_ci,
`rule_name` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
`data` blob,
`created_at` int(11) DEFAULT NULL,
`updated_at` int(11) DEFAULT NULL,
PRIMARY KEY (`name`),
KEY `rule_name` (`rule_name`),
KEY `idx-auth_item-type` (`type`),
CONSTRAINT `auth_item_ibfk_1` FOREIGN KEY (`rule_name`) REFERENCES `auth_rule` (`name`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
#
# Data for table "auth_item"
#
INSERT INTO `auth_item` VALUES ('appadmin',1,'管理整个应用',NULL,NULL,1496027876,1496027876);
#
# Structure for table "auth_item_child"
#
DROP TABLE IF EXISTS `auth_item_child`;
CREATE TABLE `auth_item_child` (
`parent` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`child` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`parent`,`child`),
KEY `child` (`child`),
CONSTRAINT `auth_item_child_ibfk_1` FOREIGN KEY (`parent`) REFERENCES `auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `auth_item_child_ibfk_2` FOREIGN KEY (`child`) REFERENCES `auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
#
# Data for table "auth_item_child"
#
#
# Structure for table "auth_assignment"
#
DROP TABLE IF EXISTS `auth_assignment`;
CREATE TABLE `auth_assignment` (
`item_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`user_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`created_at` int(11) DEFAULT NULL,
PRIMARY KEY (`item_name`,`user_id`),
CONSTRAINT `auth_assignment_ibfk_1` FOREIGN KEY (`item_name`) REFERENCES `auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
#
# Data for table "auth_assignment"
#
INSERT INTO `auth_assignment` VALUES ('appadmin','6',1496027916);
#
# Structure for table "common_admin"
#
DROP TABLE IF EXISTS `common_admin`;
CREATE TABLE `common_admin` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`auth_key` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`password_hash` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`email` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`created_at` int(11) NOT NULL,
`updated_at` int(11) NOT NULL,
`status` tinyint(2) DEFAULT '10',
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`),
UNIQUE KEY `email` (`email`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
#
# Data for table "common_admin"
#
/*!40000 ALTER TABLE `common_admin` DISABLE KEYS */;
INSERT INTO `common_admin` VALUES (6,'appadmin','x6hH_ZundqaAlOP1I7wcKtus7GfcEfmr','$2y$13$HDY0PqHSJVfmu7iE7CDe...LdE7Ad8XBquN49fKoOcM9qpmTpkafO','[email protected]',1496027831,1496027831,10);
/*!40000 ALTER TABLE `common_admin` ENABLE KEYS */;
#
# Structure for table "common_users"
#
DROP TABLE IF EXISTS `common_users`;
CREATE TABLE `common_users` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`auth_key` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`password_hash` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`email` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`created_at` int(11) NOT NULL,
`updated_at` int(11) NOT NULL,
`status` tinyint(2) DEFAULT '10',
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`),
UNIQUE KEY `email` (`email`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
#
# Data for table "common_users"
#
/*!40000 ALTER TABLE `common_users` DISABLE KEYS */;
INSERT INTO `common_users` VALUES (2,'tom','ZKj740KLd7zTvlTQSSgKtN4FJUkdvdG7','$2y$13$.CZTKclufMr4r8W/I0cCuO9Z8rh5kUr/Rot7aDnwQ4qWgsSxlFLB.','[email protected]',1496396474,1496396474,10);
/*!40000 ALTER TABLE `common_users` ENABLE KEYS */;
#
# Structure for table "migration"
#
DROP TABLE IF EXISTS `migration`;
CREATE TABLE `migration` (
`version` varchar(180) NOT NULL,
`apply_time` int(11) DEFAULT NULL,
PRIMARY KEY (`version`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
#
# Data for table "migration"
#
/*!40000 ALTER TABLE `migration` DISABLE KEYS */;
INSERT INTO `migration` VALUES ('m000000_000000_base',1496017306),('m140506_102106_rbac_init',1496017310);
/*!40000 ALTER TABLE `migration` ENABLE KEYS */;