Add functions for Workflow permission and update DB schema