schema.sql: fix appPasswords constraint

This commit is contained in:
Girish Ramakrishnan
2021-04-19 21:02:14 -07:00
parent 142af8e700
commit 727e6720e8

View File

@@ -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)