Remove user_id and remote_user_id constraints in v4&v5 migrations

It's not straightforward to remove these constraints in SQLite, so this
just skips it entirely. Since both of these migrations are part of the
same WF release, this should have minimal impact on admins.
pull/275/head
Matt Baer 5 years ago
parent 5b2612af54
commit f1ffcf96ec
  1. 2
      migrations/v4.go
  2. 2
      migrations/v5.go

@ -18,8 +18,6 @@ func oauth(db *datastore) error {
SetIfNotExists(true).
Column(dialect.Column("user_id", wf_db.ColumnTypeInteger, wf_db.UnsetSize)).
Column(dialect.Column("remote_user_id", wf_db.ColumnTypeInteger, wf_db.UnsetSize)).
UniqueConstraint("user_id").
UniqueConstraint("remote_user_id").
ToSQL()
if err != nil {
return err

@ -49,8 +49,6 @@ func oauthSlack(db *datastore) error {
"access_token",
wf_db.ColumnTypeVarChar,
wf_db.OptionalInt{Set: true, Value: 512,})),
dialect.DropIndex("remote_user_id", "oauth_users"),
dialect.DropIndex("user_id", "oauth_users"),
dialect.CreateUniqueIndex("oauth_users", "oauth_users", "user_id", "provider", "client_id"),
}
for _, builder := range builders {

Loading…
Cancel
Save