Added index on principal_groups. Changed permission_id type to bigserial. Inserted default permissions. Minor reformatting of sql.