From 803148d5a23afe207fb5de9ac73c986a324feb9c Mon Sep 17 00:00:00 2001
From: Trygve Laugstøl <trygvis@inamo.no>
Date: Sat, 31 Oct 2015 14:09:39 +0100
Subject: core: o Improved transaction handling. web: o Supporting changing a
 device's name and description.

---
 migrations/sqls/20151031124713-name-checks-up.sql | 7 +++++++
 1 file changed, 7 insertions(+)
 create mode 100644 migrations/sqls/20151031124713-name-checks-up.sql

(limited to 'migrations/sqls/20151031124713-name-checks-up.sql')

diff --git a/migrations/sqls/20151031124713-name-checks-up.sql b/migrations/sqls/20151031124713-name-checks-up.sql
new file mode 100644
index 0000000..840cd1e
--- /dev/null
+++ b/migrations/sqls/20151031124713-name-checks-up.sql
@@ -0,0 +1,7 @@
+ALTER TABLE device
+ADD CHECK (length(trim(name)) > 0),
+ADD CHECK (length(trim(description)) > 0);
+
+ALTER TABLE device_property
+ADD CHECK (length(trim(name)) > 0),
+ADD CHECK (length(trim(description)) > 0);
-- 
cgit v1.2.3

