changeset 284:561441fde2ac

Set unique constraint on project key Thanks to Tom Gottfried
author Björn Ricks <bjoern.ricks@intevation.de>
date Tue, 16 Apr 2013 11:51:35 +0200
parents 0746534b7f97
children 983c4279e08d
files getan/backend.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/getan/backend.py	Tue Apr 16 09:47:07 2013 +0200
+++ b/getan/backend.py	Tue Apr 16 11:51:35 2013 +0200
@@ -25,7 +25,7 @@
 """
 CREATE TABLE projects (
     id          INTEGER PRIMARY KEY AUTOINCREMENT,
-    key         VARCHAR(16) NOT NULL,
+    key         VARCHAR(16) NOT NULL CONSTRAINT unique_key UNIQUE,
     description VARCHAR(256),
     active      BOOLEAN DEFAULT 1
 )
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)