Changes

→‎Table and fields structures: Minor English improvements
Line 205: Line 205:  
  - tms            timestamp                  that will contain date of last modification (the database manages this field automatically, no need to manage it by the code, just create the field)
 
  - tms            timestamp                  that will contain date of last modification (the database manages this field automatically, no need to manage it by the code, just create the field)
 
  - date_valid      datetime                    that is the validation date (if applicable)
 
  - date_valid      datetime                    that is the validation date (if applicable)
  - import_key      varchar(32)                that will contains the import code YYYYMMDDHHMMSS if you make mass import.
+
  - import_key      varchar(32)                that will contain the import code YYYYMMDDHHMMSS if you make mass import
 
  - status          smallint                    to store a status
 
  - status          smallint                    to store a status
 
Eventually
 
Eventually
Line 222: Line 222:  
*Type of fields:
 
*Type of fields:
   −
Well, to be compatible with any accuracy required by any country on amounts, to be compatible with any database syntax and with the Dolibarr upgrade framework, we will use the following types for database fields:
+
To be compatible with any accuracy required by any country on amounts, to be compatible with any database syntax and with the Dolibarr upgrade framework, we will use the following types for database fields:
    
  - integer for a primary key, an integer or any of foreign key (bigint may also be accepted for very large tables)
 
  - integer for a primary key, an integer or any of foreign key (bigint may also be accepted for very large tables)
Line 235: Line 235:  
  - text or medium text for large fields (no index allowed on such fields)
 
  - text or medium text for large fields (no index allowed on such fields)
   −
All business rules must be on same place, into PHP code, not into client, neither into database, that's why type enum is also not allowed.
+
All business rules must be in the same place, in PHP code, not in the client or the database, that's why type enum is also not allowed.
Other type are not allowed for compatibility reasons.  
+
Other types are not allowed for compatibility reasons.  
   −
*All tables has a prefix to avoid name conflicts with other projects. In current version this prefix is fixed ans can't be modified. Its value is <tt>llx_</tt>. In a future version this value should be modified during installation process.
+
*All tables have a prefix to avoid name conflicts with other projects. In the current version this prefix is fixed and can't be modified. Its value is <tt>llx_</tt>. In a future version this value should be modified during installation process.
    
==Primary keys==
 
==Primary keys==
4

edits