X-Git-Url: http://rtime.felk.cvut.cz/gitweb/coffee/coffee-flask.git/blobdiff_plain/722fa893aecfa19acc294cab5b2efc7f4cd89b53..bb9388ce2365631c09ee4d9764b6fb943b963ecc:/coffee_db.sql

diff --git a/coffee_db.sql b/coffee_db.sql
index d9f7d8e..380e229 100644
--- a/coffee_db.sql
+++ b/coffee_db.sql
@@ -20,7 +20,8 @@ create table if not exists coffees (
     num integer primary key,
     id varchar(24) references users(id), -- id may be unknown
     flavor varchar(255) not null references flavors(name),
-    time datetime default current_timestamp
+    time datetime default current_timestamp,
+    UNIQUE (id, flavor, datetime)
 );
 
 
