Line 151:
Line 151:
== DDL file format ==
== DDL file format ==
−
Files containing definition of the database object/structure (DDL files) must be 2 per tables:
+
Files containing definition of the database structure (DDL files) must be '''2 per table''':
−
* Each table is defined by its own file whose name is <tt>llx_''mytable''.sql</tt>
+
* The first file defines the table and its fields. The file name contains the table name like <tt>llx_''mytable''.sql</tt>
A comment will be added for each field to explain its usage.
A comment will be added for each field to explain its usage.
−
* All foreign keys, performance indexes or other constraints has to be defined in another file called <tt>llx_''mytable''.key.sql</tt>
+
* The second file defines all foreign keys, performance indexes or other constraints and the file name will be like <tt>llx_''mytable''.key.sql</tt>
These files must be stored in the directory '''install/mysql/tables''' for all standard files or '''mymodule/tables''' for tables provided by an external module.
These files must be stored in the directory '''install/mysql/tables''' for all standard files or '''mymodule/tables''' for tables provided by an external module.