materialize PublicChannels without triggers (#9424)
Creating triggers requires SUPERUSER privileges, and is especially painful on RDS. Pivot to maintaining this denormalized table in code.
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
6c2a5555b8
Коммит
6c826e765f
@@ -157,15 +157,6 @@ func NewSqlSupplier(settings model.SqlSettings, metrics einterfaces.MetricsInter
|
||||
os.Exit(EXIT_CREATE_TABLE)
|
||||
}
|
||||
|
||||
// This store's triggers should exist before the migration is run to ensure the
|
||||
// corresponding tables stay in sync. Whether or not a trigger should be created before
|
||||
// or after a migration is likely to be decided on a case-by-case basis.
|
||||
if err := supplier.oldStores.channel.(*SqlChannelStoreExperimental).CreateTriggersIfNotExists(); err != nil {
|
||||
mlog.Critical("Error creating triggers", mlog.Err(err))
|
||||
time.Sleep(time.Second)
|
||||
os.Exit(EXIT_GENERIC_FAILURE)
|
||||
}
|
||||
|
||||
UpgradeDatabase(supplier)
|
||||
|
||||
supplier.oldStores.team.(*SqlTeamStore).CreateIndexesIfNotExists()
|
||||
|
||||
Ссылка в новой задаче
Block a user