From af275fe9242303581192258ef4f6457fa45a58e4 Mon Sep 17 00:00:00 2001 From: Harshil Sharma Date: Wed, 26 Sep 2018 20:49:22 +0000 Subject: #MM-12130 changes for custom service terms (#9450) * #MM-12130 changes for custom service terms * Fixed styling * Added getServiceTerms API * removed unnecessary panic * removed custom service terms text from flat config * reverted user sql store as those changes are no longer needed * added tests * Updated a config key to be more standard * Added copyright info * Loading service terms only if the feature is enabled * Loading service terms only if the feature is enabled * removed unused index * added createservice termns API * made a param to bool instead of string * added createservice termns API * review fixes * fixed styling * Minor refactoring * removed saveConfig and loadConfig magic * added empty service terms text check to createServiceTerms API * refactoed some urls to be terms_of_service instead of service_terms * removed check for support settings * changed URLs in tests * removed unused code * fixed a bug * added service termd id in conif * fixed a test * review fixes * minor fixes * Fixed TestCreateServiceTerms --- store/sqlstore/upgrade.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'store/sqlstore/upgrade.go') diff --git a/store/sqlstore/upgrade.go b/store/sqlstore/upgrade.go index a8be96172..05e10d266 100644 --- a/store/sqlstore/upgrade.go +++ b/store/sqlstore/upgrade.go @@ -496,11 +496,11 @@ func UpgradeDatabaseToVersion54(sqlStore SqlStore) { // if shouldPerformUpgrade(sqlStore, VERSION_5_3_0, VERSION_5_4_0) { sqlStore.AlterColumnTypeIfExists("OutgoingWebhooks", "Description", "varchar(500)", "varchar(500)") sqlStore.AlterColumnTypeIfExists("IncomingWebhooks", "Description", "varchar(500)", "varchar(500)") - if err := sqlStore.Channel().MigratePublicChannels(); err != nil { mlog.Critical("Failed to migrate PublicChannels table", mlog.Err(err)) time.Sleep(time.Second) os.Exit(EXIT_GENERIC_FAILURE) } + sqlStore.CreateColumnIfNotExists("Users", "AcceptedServiceTermsId", "varchar(64)", "varchar(64)", "") // saveSchemaVersion(sqlStore, VERSION_5_4_0) } -- cgit v1.2.3-1-g7c22