From cd61079f22e2da0698aae1b9ff08a7b4dfc70a4b Mon Sep 17 00:00:00 2001
From: Markus Escher <m.escher@adito.de>
Date: Mon, 5 Nov 2018 08:05:26 +0100
Subject: [PATCH] set ORGNAME in ORG to mandatory

---
 entity/Org_entity/Org_entity.aod        | 1 +
 others/db_changes/struct/create_org.xml | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/entity/Org_entity/Org_entity.aod b/entity/Org_entity/Org_entity.aod
index 4807ae7a89a..fa207214b1c 100644
--- a/entity/Org_entity/Org_entity.aod
+++ b/entity/Org_entity/Org_entity.aod
@@ -51,6 +51,7 @@
       <tableName>ORG</tableName>
       <columnName>NAME</columnName>
       <caption>Name</caption>
+      <mandatory v="true" />
     </entityField>
     <entityField>
       <name>ORGID</name>
diff --git a/others/db_changes/struct/create_org.xml b/others/db_changes/struct/create_org.xml
index ae2a69496b5..a7fae3e18c4 100644
--- a/others/db_changes/struct/create_org.xml
+++ b/others/db_changes/struct/create_org.xml
@@ -2,7 +2,9 @@
 <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
     <changeSet author="j.goderbauer" id="1528803466364-1">
         <createTable tableName="ORG">
-            <column name="NAME" type="NVARCHAR(255)"/>
+            <column name="NAME" type="NVARCHAR(255)">
+                <constraints nullable="false"/>
+            </column>
             <column name="INFO" type="NCLOB"/>
             <column name="TYPE" type="SMALLINT"/>
             <column name="CUSTOMERCODE" type="VARCHAR(30)"/>
-- 
GitLab