mirror of
https://github.com/writefreely/writefreely
synced 2025-02-17 16:28:23 +00:00
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.
This commit is contained in:
parent
5b2612af54
commit
f1ffcf96ec
2 changed files with 0 additions and 4 deletions
|
@ -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…
Add table
Reference in a new issue