mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-07 06:53:09 -06:00
Merge pull request #59 from globekeeper/daniel/public-visibility
🐛 Migration to have the correct composite primary key in roomserver_p…
This commit is contained in:
commit
8dd9640727
|
|
@ -29,6 +29,13 @@ func UpPulishedAppservice(ctx context.Context, tx *sql.Tx) error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("failed to execute upgrade: %w", err)
|
||||
}
|
||||
_, err = tx.ExecContext(ctx, `
|
||||
ALTER TABLE roomserver_published DROP CONSTRAINT IF EXISTS roomserver_published_pkey;
|
||||
ALTER TABLE roomserver_published ADD PRIMARY KEY (room_id, appservice_id, network_id);
|
||||
`)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to execute upgrade: %w", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue