<?php

return <<<'SQL'
CREATE TABLE roles (
    id CHAR(36) NOT NULL PRIMARY KEY,
    role_key VARCHAR(100) NOT NULL,
    name VARCHAR(255) NOT NULL,
    scope VARCHAR(50) NOT NULL DEFAULT 'tenant',
    created_at DATETIME NOT NULL,
    updated_at DATETIME NOT NULL,
    UNIQUE (role_key, scope)
);
SQL;
