postgres: registry support (#3454)

This commit is contained in:
Caleb Doxsey 2022-07-13 09:14:47 -06:00 committed by GitHub
parent ca8db7b619
commit 24a9d627cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 436 additions and 36 deletions

View file

@ -112,6 +112,22 @@ var migrations = []func(context.Context, pgx.Tx) error{
return err
}
return nil
},
3: func(ctx context.Context, tx pgx.Tx) error {
_, err := tx.Exec(ctx, `
CREATE TABLE `+schemaName+`.`+servicesTableName+` (
kind TEXT NOT NULL,
endpoint TEXT NOT NULL,
expires_at TIMESTAMPTZ NOT NULL,
PRIMARY KEY (kind, endpoint)
)
`)
if err != nil {
return err
}
return nil
},
}