30no2's Blog.

数据库映射

字数统计: 170阅读时长: 1 min
2019/08/27 Share

数据库映射

代码

1
2
3
4
5
6
7
8
9
10
11
12
CREATE TABLE `organization_chart` (
`organization_chart_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '部门ID',
`organization_chart_name` varchar(255) DEFAULT '' COMMENT '部门名称',
`time` int(11) DEFAULT '0' COMMENT '添加时间',
`organization_chart_level` int(11) DEFAULT '0' COMMENT '部门等级',
`organization_chart_pid` int(11) DEFAULT '0' COMMENT '上级部门ID',
`stor` int(11) DEFAULT '0' COMMENT '排序',
`organization_chart_content` varchar(600) DEFAULT '' COMMENT '部门描述',
`infos_id` int(11) DEFAULT '0' COMMENT '关联平台ID',
PRIMARY KEY (`organization_chart_id`)
) ENGINE=FEDERATED
CONNECTION='mysql://root:123456@192.168.2.210:3306/zhypt/organization_chart' COMMENT '部门映射表';

修改数据库配置文件

  • my.ini 数据库配置文件

    开启映射

    1
    2
    [mysqld]
    federated
CATALOG
  1. 1. 数据库映射
    1. 1.1. 代码
    2. 1.2. 修改数据库配置文件