mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Add support for Terms of Service documents
This allows for adding Terms of Service documents to the database that registered users need to accept before using the AUR. A revision field can be used to indicate whether a document was updated. If it is increased, all users are again asked to accept the new terms. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
6892ec7791
commit
a8ac2004d3
6 changed files with 188 additions and 0 deletions
|
@ -379,3 +379,23 @@ CREATE TABLE Bans (
|
|||
BanTS TIMESTAMP NOT NULL,
|
||||
PRIMARY KEY (IPAddress)
|
||||
) ENGINE = InnoDB;
|
||||
|
||||
-- Terms and Conditions
|
||||
--
|
||||
CREATE TABLE Terms (
|
||||
ID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Description VARCHAR(255) NOT NULL,
|
||||
URL VARCHAR(8000) NOT NULL,
|
||||
Revision INTEGER UNSIGNED NOT NULL DEFAULT 1,
|
||||
PRIMARY KEY (ID)
|
||||
) ENGINE = InnoDB;
|
||||
|
||||
-- Terms and Conditions accepted by users
|
||||
--
|
||||
CREATE TABLE AcceptedTerms (
|
||||
UsersID INTEGER UNSIGNED NOT NULL,
|
||||
TermsID INTEGER UNSIGNED NOT NULL,
|
||||
Revision INTEGER UNSIGNED NOT NULL DEFAULT 0,
|
||||
FOREIGN KEY (UsersID) REFERENCES Users(ID) ON DELETE CASCADE,
|
||||
FOREIGN KEY (TermsID) REFERENCES Terms(ID) ON DELETE CASCADE
|
||||
) ENGINE = InnoDB;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue