-- Permissões para addon Asaas (MySQL)

INSERT IGNORE INTO permissions (name) VALUES
  ('addons.asaas.read'),
  ('addons.asaas.manage');

SET @role_id = (SELECT id FROM roles WHERE name = 'admin' LIMIT 1);
SET @perm_read = (SELECT id FROM permissions WHERE name = 'addons.asaas.read' LIMIT 1);
SET @perm_manage = (SELECT id FROM permissions WHERE name = 'addons.asaas.manage' LIMIT 1);

INSERT IGNORE INTO role_permissions (role_id, permission_id) VALUES
  (@role_id, @perm_read),
  (@role_id, @perm_manage);