forked from yeecode/ObjectLogger
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit_data_table.sql
More file actions
37 lines (36 loc) · 1.31 KB
/
init_data_table.sql
File metadata and controls
37 lines (36 loc) · 1.31 KB
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
-- ----------------------------
-- Table structure for operation
-- ----------------------------
DROP TABLE IF EXISTS `operation`;
CREATE TABLE `operation` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`appName` varchar(500) DEFAULT NULL,
`objectName` varchar(500) NOT NULL DEFAULT '',
`objectId` bigint(20) unsigned NOT NULL DEFAULT '0',
`operator` varchar(500) NOT NULL,
`operationName` varchar(500) NOT NULL DEFAULT '',
`operationAlias` varchar(500) NOT NULL DEFAULT '',
`extraWords` varchar(5000) DEFAULT NULL,
`comment` mediumtext,
`operationTime` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `appName` (`appName`) USING HASH,
KEY `objectName` (`objectName`) USING HASH,
KEY `objectId` (`objectId`) USING BTREE
);
-- ----------------------------
-- Table structure for attribute
-- ----------------------------
DROP TABLE IF EXISTS `attribute`;
CREATE TABLE `attribute` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`operationId` bigint(20) unsigned NOT NULL,
`attributeType` varchar(500) NOT NULL DEFAULT '',
`attributeName` varchar(500) NOT NULL DEFAULT '',
`attributeAlias` varchar(500) NOT NULL DEFAULT '',
`oldValue` mediumtext,
`newValue` mediumtext,
`diffValue` mediumtext,
PRIMARY KEY (`id`),
KEY `operationId` (`operationId`) USING BTREE
);