Fixes issue 23991: table_name column of ad_table table is mandatory again
authorAugusto Mauch <augusto.mauch@openbravo.com>
Wed, 05 Jun 2013 12:36:15 +0200
changeset 20510 f7a3e45cbddf
parent 20509 51f380c29321
child 20511 e426b7ccc826
Fixes issue 23991: table_name column of ad_table table is mandatory again

At one point durint the development of the Datasource Based Tables project the table_name column of the ad_table table was set not mandatory, because this field was meant to be left empty for tables based on datasources. Later in the project it was decided to use the column 'name' (the name column of the Table table) to set the 'table_name' column for datasource based tables. This was we avoided having to change the table identifier (table_name).

After this change the table_name column must be mandatory in the database.
src-db/database/model/tables/AD_TABLE.xml
--- a/src-db/database/model/tables/AD_TABLE.xml	Tue Jun 04 12:33:00 2013 +0200
+++ b/src-db/database/model/tables/AD_TABLE.xml	Wed Jun 05 12:36:15 2013 +0200
@@ -45,7 +45,7 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <column name="TABLENAME" primaryKey="false" required="false" type="VARCHAR" size="40" autoIncrement="false">
+      <column name="TABLENAME" primaryKey="false" required="true" type="VARCHAR" size="40" autoIncrement="false">
         <default/>
         <onCreateDefault/>
       </column>