summaryrefslogtreecommitdiff
path: root/db/db.go
diff options
context:
space:
mode:
Diffstat (limited to 'db/db.go')
-rw-r--r--db/db.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/db.go b/db/db.go
index c58f6ad..55ef81b 100644
--- a/db/db.go
+++ b/db/db.go
@@ -119,7 +119,7 @@ func (p *Phlox) Create(filename string) error {
insert into config values("hostaddress", "localhost:3333");
insert into config values("loginpage", "");
- create table users (userid integer not null primary key, username string, passwordhash string, salt string);
+ create table users (userid integer not null primary key, username string unique, passwordhash string, salt string);
create table sessions (sessionid string not null primary key, userid integer, created string, modified string, foreign key(userid) references users(userid));
create table endpoints (endpointid integer not null primary key, name string, path string, address string);
`)