-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add handling of accepted ToS on account level
- Loading branch information
1 parent
f4f28f7
commit b4c9e13
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
create table terms_of_service | ||
( | ||
version smallint auto_increment, | ||
valid_from timestamp not null comment 'The start date when this ToS version is applied. May point into the future to prepare ToS changes.', | ||
content text not null comment 'Markdown formatted text', | ||
constraint terms_of_service_pk | ||
primary key (version) | ||
); | ||
|
||
create index terms_of_service_valid_from_index | ||
on terms_of_service (valid_from); | ||
|
||
alter table login | ||
add accepted_tos smallint null comment 'Point to the last ToS the user has explicitely accepted', | ||
add constraint login_terms_of_service_version_fk | ||
foreign key (accepted_tos) references terms_of_service (version); |