TRUNCATE TABLE "membership_capabilities";

INSERT INTO "membership_capabilities" (type, role, capability)
VALUES
    ('pub'::"MembershipType", 'admin'::"MemberRole", 'createRelatedPub'::"Capabilities"),
    ('pub'::"MembershipType", 'admin'::"MemberRole", 'deletePub'::"Capabilities"),
    ('pub'::"MembershipType", 'admin'::"MemberRole", 'editPubWithAnyForm'::"Capabilities"),
    ('pub'::"MembershipType", 'admin'::"MemberRole", 'editPubWithDefaultForm'::"Capabilities"),
    ('pub'::"MembershipType", 'admin'::"MemberRole", 'editPubWithForm'::"Capabilities"),
    ('pub'::"MembershipType", 'admin'::"MemberRole", 'movePub'::"Capabilities"),
    ('pub'::"MembershipType", 'admin'::"MemberRole", 'runAction'::"Capabilities"),
    ('pub'::"MembershipType", 'admin'::"MemberRole", 'seeExtraPubValues'::"Capabilities"),
    ('pub'::"MembershipType", 'admin'::"MemberRole", 'viewPub'::"Capabilities"),
    ('pub'::"MembershipType", 'editor'::"MemberRole", 'createRelatedPub'::"Capabilities"),
    ('pub'::"MembershipType", 'editor'::"MemberRole", 'editPubWithAnyForm'::"Capabilities"),
    ('pub'::"MembershipType", 'editor'::"MemberRole", 'editPubWithDefaultForm'::"Capabilities"),
    ('pub'::"MembershipType", 'editor'::"MemberRole", 'editPubWithForm'::"Capabilities"),
    ('pub'::"MembershipType", 'editor'::"MemberRole", 'movePub'::"Capabilities"),
    ('pub'::"MembershipType", 'editor'::"MemberRole", 'seeExtraPubValues'::"Capabilities"),
    ('pub'::"MembershipType", 'editor'::"MemberRole", 'viewPub'::"Capabilities"),
    ('pub'::"MembershipType", 'contributor'::"MemberRole", 'editPubWithForm'::"Capabilities"),
    ('pub'::"MembershipType", 'contributor'::"MemberRole", 'viewPub'::"Capabilities"),
    ('stage'::"MembershipType", 'admin'::"MemberRole", 'addPubMember'::"Capabilities"),
    ('stage'::"MembershipType", 'admin'::"MemberRole", 'addStageMember'::"Capabilities"),
    ('stage'::"MembershipType", 'admin'::"MemberRole", 'createRelatedPub'::"Capabilities"),
    ('stage'::"MembershipType", 'admin'::"MemberRole", 'deletePub'::"Capabilities"),
    ('stage'::"MembershipType", 'admin'::"MemberRole", 'editPubWithAnyForm'::"Capabilities"),
    ('stage'::"MembershipType", 'admin'::"MemberRole", 'editPubWithDefaultForm'::"Capabilities"),
    ('stage'::"MembershipType", 'admin'::"MemberRole", 'editPubWithForm'::"Capabilities"),
    ('stage'::"MembershipType", 'admin'::"MemberRole", 'manageStage'::"Capabilities"),
    ('stage'::"MembershipType", 'admin'::"MemberRole", 'movePub'::"Capabilities"),
    ('stage'::"MembershipType", 'admin'::"MemberRole", 'removePubMember'::"Capabilities"),
    ('stage'::"MembershipType", 'admin'::"MemberRole", 'removeStageMember'::"Capabilities"),
    ('stage'::"MembershipType", 'admin'::"MemberRole", 'runAction'::"Capabilities"),
    ('stage'::"MembershipType", 'admin'::"MemberRole", 'seeExtraPubValues'::"Capabilities"),
    ('stage'::"MembershipType", 'admin'::"MemberRole", 'viewPub'::"Capabilities"),
    ('stage'::"MembershipType", 'admin'::"MemberRole", 'viewStage'::"Capabilities"),
    ('stage'::"MembershipType", 'editor'::"MemberRole", 'createRelatedPub'::"Capabilities"),
    ('stage'::"MembershipType", 'editor'::"MemberRole", 'editPubWithAnyForm'::"Capabilities"),
    ('stage'::"MembershipType", 'editor'::"MemberRole", 'editPubWithDefaultForm'::"Capabilities"),
    ('stage'::"MembershipType", 'editor'::"MemberRole", 'editPubWithForm'::"Capabilities"),
    ('stage'::"MembershipType", 'editor'::"MemberRole", 'movePub'::"Capabilities"),
    ('stage'::"MembershipType", 'editor'::"MemberRole", 'runAction'::"Capabilities"),
    ('stage'::"MembershipType", 'editor'::"MemberRole", 'seeExtraPubValues'::"Capabilities"),
    ('stage'::"MembershipType", 'editor'::"MemberRole", 'viewPub'::"Capabilities"),
    ('stage'::"MembershipType", 'editor'::"MemberRole", 'viewStage'::"Capabilities"),
    ('stage'::"MembershipType", 'contributor'::"MemberRole", 'createRelatedPub'::"Capabilities"),
    ('stage'::"MembershipType", 'contributor'::"MemberRole", 'editPubWithForm'::"Capabilities"),
    ('stage'::"MembershipType", 'contributor'::"MemberRole", 'viewPub'::"Capabilities"),
    ('stage'::"MembershipType", 'contributor'::"MemberRole", 'viewStage'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'addCommunity'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'addCommunityMember'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'addFormMember'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'addPubMember'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'addStageMember'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'archiveForm'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'archivePubField'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'createApiToken'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'createForm'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'createPubWithAnyForm'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'createPubField'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'createPubType'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'createRelatedPub'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'createStage'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'deletePub'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'deletePubType'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'deleteStage'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'editCommunity'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'editForm'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'editPubField'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'editPubType'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'editPubWithForm'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'editPubWithAnyForm'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'manageMemberGroups'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'manageStage'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'movePub'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'removeCommunityMember'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'removeFormMember'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'removePubMember'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'removeStageMember'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'revokeApiToken'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'runAction'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'seeExtraPubValues'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'viewPub'::"Capabilities"),
    ('community'::"MembershipType", 'admin'::"MemberRole", 'viewStage'::"Capabilities"),
    ('community'::"MembershipType", 'editor'::"MemberRole", 'addCommunityMember'::"Capabilities"),
    ('community'::"MembershipType", 'editor'::"MemberRole", 'createPubWithAnyForm'::"Capabilities"),
    ('community'::"MembershipType", 'editor'::"MemberRole", 'createRelatedPub'::"Capabilities"),
    ('community'::"MembershipType", 'editor'::"MemberRole", 'deletePub'::"Capabilities"),
    ('community'::"MembershipType", 'editor'::"MemberRole", 'editPubWithForm'::"Capabilities"),
    ('community'::"MembershipType", 'editor'::"MemberRole", 'editPubWithAnyForm'::"Capabilities"),
    ('community'::"MembershipType", 'editor'::"MemberRole", 'movePub'::"Capabilities"),
    ('community'::"MembershipType", 'editor'::"MemberRole", 'runAction'::"Capabilities"),
    ('community'::"MembershipType", 'editor'::"MemberRole", 'seeExtraPubValues'::"Capabilities"),
    ('community'::"MembershipType", 'editor'::"MemberRole", 'viewPub'::"Capabilities"),
    ('community'::"MembershipType", 'editor'::"MemberRole", 'viewStage'::"Capabilities"),
    ('community'::"MembershipType", 'contributor'::"MemberRole", 'createPubWithForm'::"Capabilities")
;
