diff options
| author | winter | 2024-12-14 21:24:48 +0000 |
|---|---|---|
| committer | winter | 2024-12-14 21:45:59 +0000 |
| commit | 2f4c1de3509141880df019ef1a6cc65981b3f6ea (patch) | |
| tree | 0021f3a860d6c80869d4af5d366393f1d0eea288 /migrations/20241214_181011_create_instance_auth.php | |
| parent | 0c6497ff02b8118bcefee37cc6fe0cbc02df4bb4 (diff) | |
implement outbound auth? untested
untested because i don't have another instance to test it against ....
Diffstat (limited to 'migrations/20241214_181011_create_instance_auth.php')
| -rw-r--r-- | migrations/20241214_181011_create_instance_auth.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/migrations/20241214_181011_create_instance_auth.php b/migrations/20241214_181011_create_instance_auth.php new file mode 100644 index 0000000..342a65d --- /dev/null +++ b/migrations/20241214_181011_create_instance_auth.php @@ -0,0 +1,16 @@ +<?php + +use \Digitigrade\Db\Migrator; + +Migrator::getInstance()->register(20241214_181011, function (PDO $db) { + // instance auth information + // and fix a mistake from last time + $db->exec(<<<END + CREATE TABLE instance_auth ( + instance_id bigint not null unique references instance, + outbound_token text, + inbound_token text + ); + ALTER TABLE instance_endpoints ADD CONSTRAINT instance_id_unq UNIQUE(instance_id); + END); +}); |
