Attachments
[cavote.git] / schema.sql
index f03e176..20ddccb 100644 (file)
@@ -48,10 +48,10 @@ create table votes (
 );
 
 create table attachments (
+    id INTEGER primary key autoincrement,
     url TEXT not null,
     id_vote INTEGER not null,
-    FOREIGN KEY(id_vote) REFERENCES vote(id),
-    PRIMARY KEY(url, id_vote)
+    FOREIGN KEY(id_vote) REFERENCES vote(id)
 );
 
 create table choices (