diff --git a/migrations/schema.sql b/migrations/schema.sql index ad3d0f876..b2d51edc1 100644 --- a/migrations/schema.sql +++ b/migrations/schema.sql @@ -237,6 +237,7 @@ CREATE TABLE IF NOT EXISTS appPasswords( identifier VARCHAR(128) NOT NULL, // resourceId: app id or mail or webadmin hashedPassword VARCHAR(1024) NOT NULL, creationTime TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + UNIQUE KEY appPasswords_name_appId_identifier (name, userId, identifier) FOREIGN KEY(userId) REFERENCES users(id), PRIMARY KEY (id)