From d3c8397c45929eb42b5e292e4dc24ffbf742bfc5 Mon Sep 17 00:00:00 2001
From: Piotr Gawron <piotr.gawron@uni.lu>
Date: Tue, 13 Aug 2019 17:59:56 +0200
Subject: [PATCH] make sure that point will have no null coordinates

---
 .../V14.0.0.20190813__point_coordinates_cannot_be_null.sql     | 3 +++
 1 file changed, 3 insertions(+)
 create mode 100644 persist/src/main/resources/db/migration/14.0.0~alpha.1/V14.0.0.20190813__point_coordinates_cannot_be_null.sql

diff --git a/persist/src/main/resources/db/migration/14.0.0~alpha.1/V14.0.0.20190813__point_coordinates_cannot_be_null.sql b/persist/src/main/resources/db/migration/14.0.0~alpha.1/V14.0.0.20190813__point_coordinates_cannot_be_null.sql
new file mode 100644
index 0000000000..e1be8cf290
--- /dev/null
+++ b/persist/src/main/resources/db/migration/14.0.0~alpha.1/V14.0.0.20190813__point_coordinates_cannot_be_null.sql
@@ -0,0 +1,3 @@
+-- just in case if any point on the map has null coordinates (it should never happen)
+update point_table set point_val = "0.0,0.0" where point_val = null;
+alter table point_table alter column point_val set not null;
\ No newline at end of file
-- 
GitLab