Skip to content

Commit f5a335d

Browse files
fix migrations after merging V8
1 parent c32c832 commit f5a335d

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

backend/src/main/resources/org/cryptomator/hub/flyway/V10__User_Keys.sql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ ALTER TABLE "access_token_legacy" RENAME CONSTRAINT "ACCESS_FK_VAULT" TO "ACCESS
1111

1212
-- as soon as a device gets verified by its owner, the owner's private key will be encrypted for this device:
1313
ALTER TABLE "device" ADD "user_key" VARCHAR(2000) UNIQUE; -- private key, encrypted using device's public key (JWE ECDH-ES)
14-
ALTER TABLE "device" ADD "type" VARCHAR(255) NOT NULL;
1514
ALTER TABLE "device" ADD "last_seen_time" TIMESTAMP WITH TIME ZONE NOT NULL;
1615
COMMENT ON COLUMN "device"."publickey" IS 'Note: This contains base64url-encoded data for historic reasons.';
1716

backend/src/test/java/org/cryptomator/hub/entities/EntityIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public void removingUserCascadesToAccess() throws SQLException {
3636
s.execute("""
3737
INSERT INTO "authority" ("id", "type", "name") VALUES ('user999', 'USER', 'User 999');
3838
INSERT INTO "user_details" ("id") VALUES ('user999');
39-
INSERT INTO "access_token" ("user_id", "vault_id", "vault_key_jwe") VALUES ('user999', '7E57C0DE-0000-4000-8000-000100001111', 'jwe4');
39+
INSERT INTO "access_token" ("user_id", "vault_id", "vault_key") VALUES ('user999', '7E57C0DE-0000-4000-8000-000100001111', 'jwe4');
4040
""");
4141
}
4242

backend/src/test/resources/org/cryptomator/hub/flyway/V9999__Test_Data.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ VALUES
4444
('7E57C0DE-0000-4000-8000-000100001111', 'user2', 'MEMBER'),
4545
('7E57C0DE-0000-4000-8000-000100002222', 'group1', 'MEMBER');
4646

47-
INSERT INTO "device" ("id", "owner_id", "name", "type", "publickey", "creation_time", "last_seen_time", "user_key_jwe")
47+
INSERT INTO "device" ("id", "owner_id", "name", "type", "publickey", "creation_time", "last_seen_time", "user_key")
4848
VALUES
4949
('device1', 'user1', 'Computer 1', 'DESKTOP', 'publickey1', '2020-02-20 20:20:20', '2023-01-11 22:33:44', 'jwe.jwe.jwe.user1.device1'),
5050
('device2', 'user2', 'Computer 2', 'DESKTOP', 'publickey2', '2020-02-20 20:20:20', '2023-01-11 22:33:44', 'jwe.jwe.jwe.user2.device2'),
5151
('device3', 'user1', 'Computer 3', 'DESKTOP', 'publickey3', '2020-02-20 20:20:20', '2023-01-11 22:33:44', NULL);
5252

53-
INSERT INTO "access_token" ("user_id", "vault_id", "vault_key_jwe")
53+
INSERT INTO "access_token" ("user_id", "vault_id", "vault_key")
5454
VALUES
5555
('user1', '7E57C0DE-0000-4000-8000-000100001111', 'jwe.jwe.jwe.vault1.user1'), -- direct access
5656
('user2', '7E57C0DE-0000-4000-8000-000100001111', 'jwe.jwe.jwe.vault1.user2'), -- direct access

0 commit comments

Comments
 (0)