4
edits
Tag: 2017 source edit |
JohnVeness (talk | contribs) (→Table and fields structures: Minor English improvements) Tags: Mobile edit Mobile web edit |
||
| 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 | - 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: | ||
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 | 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 | Other types are not allowed for compatibility reasons. | ||
*All tables | *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== | ||
edits