mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-12 16:47:41 +02:00
postgres: registry support (#3454)
This commit is contained in:
parent
ca8db7b619
commit
24a9d627cd
9 changed files with 436 additions and 36 deletions
|
@ -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
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue