diff options
author | Jesse Hallam <jesse.hallam@gmail.com> | 2018-09-17 16:25:19 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2018-09-17 13:25:19 -0700 |
commit | 6c826e765f2ea38a68628f548c6de068019e3281 (patch) | |
tree | bc57008392c23705eb4773e3f7a3320dcba9f734 /store/sqlstore/supplier.go | |
parent | 6c2a5555b85bd15106df5f4f631bb6e945a187b8 (diff) | |
download | chat-6c826e765f2ea38a68628f548c6de068019e3281.tar.gz chat-6c826e765f2ea38a68628f548c6de068019e3281.tar.bz2 chat-6c826e765f2ea38a68628f548c6de068019e3281.zip |
materialize PublicChannels without triggers (#9424)
Creating triggers requires SUPERUSER privileges, and is especially
painful on RDS. Pivot to maintaining this denormalized table in code.
Diffstat (limited to 'store/sqlstore/supplier.go')
-rw-r--r-- | store/sqlstore/supplier.go | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/store/sqlstore/supplier.go b/store/sqlstore/supplier.go index d1d7564f7..11216dd25 100644 --- a/store/sqlstore/supplier.go +++ b/store/sqlstore/supplier.go @@ -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() |