CREATE TABLE module_prefix_snapshot_row (
    tenant_id     TEXT NOT NULL,
    module_id     TEXT NOT NULL,
    ord           INTEGER NOT NULL,
    prefix        TEXT NOT NULL,
    community_id  TEXT,
    source        TEXT NOT NULL DEFAULT '',
    PRIMARY KEY (tenant_id, module_id, ord),
    FOREIGN KEY (tenant_id, module_id)
        REFERENCES module_prefix_snapshot (tenant_id, module_id) ON DELETE CASCADE
);

ALTER TABLE module_prefix_snapshot DROP COLUMN prefixes_json;
