导入别人的.sql文件十几个表只成功了四个表,其余都显示1146和1064错误,搜了很长时间都没找出正确解决方法
/*
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 80016
Source Host : localhost:3306
Source Schema : easyweb-shiro
Target Server Type : MySQL
Target Server Version : 80016
File Encoding : 65001
Date: 25/08/2020 22:36:46
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- Table structure for sys_dictionary
DROP TABLE IF EXISTS sys_dictionary
;
CREATE TABLE sys_dictionary
(
dict_id
int(11) NOT NULL AUTO_INCREMENT COMMENT '字典id',
dict_code
varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典标识',
dict_name
varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典名称',
sort_number
int(11) NOT NULL DEFAULT 1 COMMENT '排序号',
comments
varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
deleted
int(1) NOT NULL DEFAULT 0 COMMENT '是否删除,0否,1是',
create_time
timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
update_time
timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
PRIMARY KEY (dict_id
) USING BTREE,
UNIQUE INDEX dict_code
(dict_code
) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典' ROW_FORMAT = Dynamic;
-- Records of sys_dictionary
INSERT INTO sys_dictionary
VALUES (1, 'sex', '性别', 1, '', 0, '2020-03-15 13:04:39', '2020-03-15 13:04:39');
INSERT INTO sys_dictionary
VALUES (2, 'organization_type', '机构类型', 2, '', 0, '2020-03-16 00:32:36', '2020-03-16 00:32:36');
-- Table structure for sys_dictionary_data
DROP TABLE IF EXISTS sys_dictionary_data
;
CREATE TABLE sys_dictionary_data
(
dict_data_id
int(11) NOT NULL AUTO_INCREMENT COMMENT '字典项id',
dict_id
int(11) NOT NULL COMMENT '字典id',
dict_data_code
varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典项标识',
dict_data_name
varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典项名称',
sort_number
int(11) NOT NULL DEFAULT 1 COMMENT '排序号',
comments
varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
deleted
int(1) NOT NULL DEFAULT 0 COMMENT '是否删除,0否,1是',
create_time
timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
update_time
timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
PRIMARY KEY (dict_data_id
) USING BTREE,
INDEX dict_id
(dict_id
) USING BTREE,
CONSTRAINT sys_dictionary_data_ibfk_1
FOREIGN KEY (dict_id
) REFERENCES sys_dictionary
(dict_id
) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典项' ROW_FORMAT = Dynamic;
-- Records of sys_dictionary_data
INSERT INTO sys_dictionary_data
VALUES (1, 1, 'male', '男', 1, '', 0, '2020-03-15 13:07:28', '2020-03-15 13:07:28');
INSERT INTO sys_dictionary_data
VALUES (2, 1, 'female', '女', 2, '', 0, '2020-03-15 13:07:41', '2020-03-15 15:58:04');
INSERT INTO sys_dictionary_data
VALUES (3, 2, 'company', '公司', 1, '', 0, '2020-03-16 00:34:32', '2020-03-16 00:34:32');
INSERT INTO sys_dictionary_data
VALUES (4, 2, 'subsidiary', '子公司', 2, '', 0, '2020-03-16 00:35:02', '2020-03-16 00:35:02');
INSERT INTO sys_dictionary_data
VALUES (5, 2, 'department', '部门', 3, '', 0, '2020-03-16 00:35:18', '2020-03-16 00:35:18');
INSERT INTO sys_dictionary_data
VALUES (6, 2, 'group', '小组', 4, '', 0, '2020-03-16 00:35:36', '2020-03-16 00:35:36');
-- Table structure for sys_login_record
DROP TABLE IF EXISTS sys_login_record
;
CREATE TABLE sys_login_record
(
id
int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
username
varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户账号',
os
varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作系统',
device
varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设备名',
browser
varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '浏览器类型',
ip
varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'ip地址',
oper_type
int(11) NOT NULL COMMENT '操作类型,0登录成功,1登录失败,2退出登录,3刷新token',
comments
varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
create_time
timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '操作时间',
update_time
timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
PRIMARY KEY (id
) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 63 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '登录日志' ROW_FORMAT = DYNAMIC;
*/