drop table if exists Training;

create table Training (
    TrainingID integer primary key,
    ECN integer not null,
    Status integer default 0,
    CompletedDate text
);

insert into Training (ECN)
values (1), (2), (3), (4), (5), (6), (7), (8), (9);

drop table if exists TrainingAssignments;

create table TrainingAssignments (
    ID integer primary key,
    TrainingID integer not null,
    Deleted integer default 0,
    status integer default 0,
    DeletedDate text
);

insert into TrainingAssignments (TrainingID)
values (1), (1), (2), (2), (3), (3), (4), (4), (5), (5), (6), (6),
(7), (7), (8), (8), (9), (9);

drop table if exists TrainingDocAcks;

create table TrainingDocAcks (
    ID integer primary key,
    TrainingAssignmentID integer not null,
    Reviewed integer default 0,
    Deleted integer default 0,
    DeletedDate text
);

insert into TrainingDocAcks (TrainingAssignmentID)
values (1), (1), (2), (2), (3), (3), (4), (4), (5), (5), (6), (6),
(7), (7), (8), (8), (9), (9);