INSERT INTO permission (id, permission_code, permission_name, module)
VALUES
    (1035, 'template.read', '模板查询', 'template'),
    (1036, 'template.create', '模板上传', 'template'),
    (1037, 'template.publish', '模板发布', 'template'),
    (1038, 'template.disable', '模板停用', 'template'),
    (1039, 'template.rollback', '模板版本回滚', 'template'),
    (1040, 'template.download', '模板下载', 'template')
ON DUPLICATE KEY UPDATE permission_name=VALUES(permission_name), module=VALUES(module);

INSERT INTO role_permission (id, tenant_id, role_id, permission_id)
VALUES
    (36, 1, 101, 1035),
    (37, 1, 101, 1036),
    (38, 1, 101, 1037),
    (39, 1, 101, 1038),
    (40, 1, 101, 1039),
    (41, 1, 101, 1040)
ON DUPLICATE KEY UPDATE permission_id = VALUES(permission_id);
