28,6 → 28,20 |
constraint users_boss foreign key (boss) references users(id) |
); |
|
-- login tries. "usr" is set if the user is found only |
create table userlogins |
( |
id integer not null, |
usr integer, |
login varchar(255) not null, |
logintime timestamp not null, |
success char(1) default '0' check (success = '1' or success = '0'), |
ip inet not null, |
|
constraint userlogins_prim primary key (id), |
constraint userlogins_user foreign key (usr) references users(id) |
); |
|
-- default user admin:admin |
insert into users (id, login, password, superuser) values (1, 'admin', '21232f297a57a5a743894a0e4a801fc3', '1'); |
select nextval('hibernate_sequence'); -- skip id of the default user |