Add column unlock_token (#19)

Store unlock_token on TokenUpdate message.

(cherry picked from commit bcb16fc)
This commit is contained in:
mosen
2016-10-07 10:00:00 +11:00
committed by GitHub
parent a332f3cb75
commit 8b526c6aaa
3 changed files with 9 additions and 1 deletions

View File

@@ -199,7 +199,8 @@ func (store pgStore) Save(msg string, dev *Device) error {
awaiting_configuration=:awaiting_configuration,
apple_push_magic=:apple_push_magic,
apple_mdm_token=:apple_mdm_token,
mdm_enrolled=:mdm_enrolled
mdm_enrolled=:mdm_enrolled,
unlock_token=:unlock_token
WHERE device_uuid=:device_uuid`
case "checkout":
stmt = `UPDATE devices SET

View File

@@ -0,0 +1,4 @@
ALTER TABLE
devices
DROP COLUMN unlock_token;

View File

@@ -0,0 +1,3 @@
ALTER TABLE
devices
ADD COLUMN unlock_token BYTEA;