summaryrefslogtreecommitdiffstats
path: root/store/sql_oauth_store.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2016-08-24 16:17:40 -0800
committerGitHub <noreply@github.com>2016-08-24 16:17:40 -0800
commitc3ae3f20f58b25aa6aba480ddc2239fd09e610cb (patch)
tree244c273ddb2fc7ed3ff2df2aee3a615aa5d61f28 /store/sql_oauth_store.go
parent8efa4dc9a5156c511aae8e3984795e55d4b7947f (diff)
downloadchat-c3ae3f20f58b25aa6aba480ddc2239fd09e610cb.tar.gz
chat-c3ae3f20f58b25aa6aba480ddc2239fd09e610cb.tar.bz2
chat-c3ae3f20f58b25aa6aba480ddc2239fd09e610cb.zip
PLT-3695 refactoring to use sql_upgrader (#3788)
* PLT-3695 unitying upgrade support * PLT-3695 refactoring to use sql_upgrader * Fixing unit test * Adding 3.3 to 3.4 * Fixing upgrading * Seperating DB schema from version.go * Fixing upgrade cmd * Moving to const for exit codes * remving old unused code
Diffstat (limited to 'store/sql_oauth_store.go')
-rw-r--r--store/sql_oauth_store.go14
1 files changed, 0 insertions, 14 deletions
diff --git a/store/sql_oauth_store.go b/store/sql_oauth_store.go
index 0ee9f1ad1..4a15d4f80 100644
--- a/store/sql_oauth_store.go
+++ b/store/sql_oauth_store.go
@@ -47,20 +47,6 @@ func NewSqlOAuthStore(sqlStore *SqlStore) OAuthStore {
return as
}
-func (as SqlOAuthStore) UpgradeSchemaIfNeeded() {
- as.CreateColumnIfNotExists("OAuthApps", "IsTrusted", "tinyint(1)", "boolean", "0")
- as.CreateColumnIfNotExists("OAuthApps", "IconURL", "varchar(512)", "varchar(512)", "")
- as.CreateColumnIfNotExists("OAuthAccessData", "ClientId", "varchar(26)", "varchar(26)", "")
- as.CreateColumnIfNotExists("OAuthAccessData", "UserId", "varchar(26)", "varchar(26)", "")
- as.CreateColumnIfNotExists("OAuthAccessData", "ExpiresAt", "bigint", "bigint", "0")
-
- // ADDED for 3.3 REMOVE for 3.7
- if as.DoesColumnExist("OAuthAccessData", "AuthCode") {
- as.RemoveIndexIfExists("idx_oauthaccessdata_auth_code", "OAuthAccessData")
- as.RemoveColumnIfExists("OAuthAccessData", "AuthCode")
- }
-}
-
func (as SqlOAuthStore) CreateIndexesIfNotExists() {
as.CreateIndexIfNotExists("idx_oauthapps_creator_id", "OAuthApps", "CreatorId")
as.CreateIndexIfNotExists("idx_oauthaccessdata_client_id", "OAuthAccessData", "ClientId")