aboutsummaryrefslogtreecommitdiff
path: root/migrations/sqls
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2015-10-31 14:09:39 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2015-10-31 14:09:39 +0100
commit803148d5a23afe207fb5de9ac73c986a324feb9c (patch)
treeb887cede3f56e4e24c05dd9640dbd01afc2b9367 /migrations/sqls
parent02d6e77bd180cbbf6f7f6e1a69c670e922d8204d (diff)
downloaddiller-server-803148d5a23afe207fb5de9ac73c986a324feb9c.tar.gz
diller-server-803148d5a23afe207fb5de9ac73c986a324feb9c.tar.bz2
diller-server-803148d5a23afe207fb5de9ac73c986a324feb9c.tar.xz
diller-server-803148d5a23afe207fb5de9ac73c986a324feb9c.zip
core:
o Improved transaction handling. web: o Supporting changing a device's name and description.
Diffstat (limited to 'migrations/sqls')
-rw-r--r--migrations/sqls/20151031124713-name-checks-down.sql1
-rw-r--r--migrations/sqls/20151031124713-name-checks-up.sql7
2 files changed, 8 insertions, 0 deletions
diff --git a/migrations/sqls/20151031124713-name-checks-down.sql b/migrations/sqls/20151031124713-name-checks-down.sql
new file mode 100644
index 0000000..44f074e
--- /dev/null
+++ b/migrations/sqls/20151031124713-name-checks-down.sql
@@ -0,0 +1 @@
+/* Replace with your SQL commands */ \ No newline at end of file
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);