drop primary key constraint from userapi_devices.access_token

This commit is contained in:
Roman Isaev 2024-12-31 01:40:14 +00:00
parent ff63e7fa98
commit bf310d558f
No known key found for this signature in database
GPG key ID: 7BE2B6A6C89AEC7F
5 changed files with 111 additions and 12 deletions

View file

@ -102,10 +102,16 @@ func NewSQLiteDevicesTable(db *sql.DB, serverName spec.ServerName) (tables.Devic
return nil, err
}
m := sqlutil.NewMigrator(db)
m.AddMigrations(sqlutil.Migration{
Version: "userapi: add last_seen_ts",
Up: deltas.UpLastSeenTSIP,
})
m.AddMigrations(
sqlutil.Migration{
Version: "userapi: add last_seen_ts",
Up: deltas.UpLastSeenTSIP,
},
sqlutil.Migration{
Version: "userapi: drop primary key constraint",
Up: deltas.UpDropPrimaryKeyConstraint,
},
)
if err = m.Up(context.Background()); err != nil {
return nil, err
}