<?php

/**
 * Migration 0057 — page roles
 *
 * The instinctor.com page grid holds 425 pages where five different KINDS of
 * page share one namespace: the site's own pages, the vertical template
 * canonicals, tenant/owner sites, generated SEO waves, and scratch. The grid
 * grouped them by slug REGEX client-side, which buried the twenty pages that
 * matter under three hundred generated ones (Sergei 2026-07-29: "arranged
 * absolutely meaninglessly").
 *
 * role is the stored classifier: '' (unclassified, the client falls back to
 * pattern grouping), 'site', 'template', 'tenant', 'seo', 'scratch'. It lives
 * on the page rather than in a folder table because a page has exactly one
 * kind and the kind is what every view wants to filter by.
 *
 * @since 2.1.2705
 */

if (!defined('ABSPATH')) exit;

return [
    'description' => 'instinctor_pages.role (site / template / tenant / seo / scratch classifier)',

    'up' => [
        "ALTER TABLE {prefix}instinctor_pages
            ADD COLUMN role VARCHAR(16) NOT NULL DEFAULT '' AFTER type",
    ],
];
