        status int not null default 1 references stat (id) on delete cascade,
        active bool default true
 );
-
+CREATE TABLE logs (
+id serial not null unique,
+created timestamp without time zone default now(),
+jid int not null references jobs (id) on delete cascade,
+log text not null
+);
 
 insert into arches (arch) values ('i386');
 insert into arches (arch) values ('amd64');

       id serial not null unique,
       status text unique
);
CREATE TABLE jobs (
       id serial not null unique,
       created timestamp without time zone default now(),

insert into stat (status) values ('Pending');
insert into stat (status) values ('Building');
insert into stat (status) values ('Failed');
insert into stat (status) values ('Patching Failed');


