actaeon/migrations/sqls/20240322035910-create-team-join-keys-up.sql

12 lines
295 B
SQL

CREATE TABLE actaeon_team_join_keys (
id CHAR(10) NOT NULL,
teamId CHAR(36) NOT NULL,
remainingUses INT DEFAULT NULL,
totalUses INT NOT NULL DEFAULT 0,
PRIMARY KEY (id),
FOREIGN KEY (teamId) REFERENCES actaeon_teams(uuid)
ON DELETE CASCADE ON UPDATE CASCADE
);