Makes room for moderators between users and admins. It adds users.role, which replaces the is_admin flag, and 0005 then drops the flag.

Functions

f
up(db: DatabaseSync): void

Run once by runMigrations. Every user becomes a user, except those with is_admin set, who become admins.

Usage

import * as mod from "api/db/migrations/0004_user_roles.ts";