aboutsummaryrefslogtreecommitdiffhomepage
path: root/migrations/20241216_172853_add_instance_auth_secret.php
blob: 83438fe570f2f68d22ab7472fb673011a0d2f9b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
<?php

use \Digitigrade\Db\Migrator;

Migrator::getInstance()->register(20241216_172853, function (PDO $db) {
    // column for the secret used for dialback for inbound auth
    // also making inbound auth column unique to prevent accidentally giving two instances the same token
    $db->exec(<<<END
    ALTER TABLE instance_auth ADD COLUMN secret text;
    ALTER TABLE instance_auth ADD CONSTRAINT inbound_token_unq UNIQUE(inbound_token);
    END);
});