Skip to content

Commit

Permalink
Add handling of accepted ToS on account level
Browse files Browse the repository at this point in the history
  • Loading branch information
Brutus5000 committed Nov 10, 2023
1 parent f4f28f7 commit b4c9e13
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions migrations/V132__add_tos.sql
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);

0 comments on commit b4c9e13

Please sign in to comment.