mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-07 06:53:09 -06:00
🐛 Migration to have the correct composite primary key in roomserver_published.
This commit is contained in:
parent
cff3b34919
commit
ac514b406c
|
|
@ -29,6 +29,13 @@ func UpPulishedAppservice(ctx context.Context, tx *sql.Tx) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to execute upgrade: %w", err)
|
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
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue