-- ---------------------------- -- 9、用户与岗位关联表 用户1-N岗位 -- ---------------------------- drop table if exists sys_user_post; create table sys_user_post ( user_id bigint not null, -- PostgreSQL 无需指定列长度 post_id bigint not null, primary key (user_id, post_id) ); -- ---------------------------- -- 初始化-用户与岗位关联表数据 -- ---------------------------- insert into sys_user_post (user_id, post_id) values ('1', '1'), ('2', '2');