31,003
edits
| Line 98: | Line 98: | ||
* Structure of tables. | * Structure of tables. | ||
When you create a new table, it is recommended to use the same conventions as other Dolibarr tables. This means the following fields: | When you create a new table, it is recommended to use the same conventions as other Dolibarr tables. This means the following fields: | ||
- rowid | - rowid INTEGER AUTO_INCREMENT PRIMARY KEY that is technical id of record | ||
- entity | - entity INTEGER default 1 that is id for the multicompany feature | ||
- date_creation datetime | - date_creation datetime that is the creation date | ||
- tms timestamp | - 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) | ||
- import_key that will contains the import code YYYYMMDDHHMMSS if you make mass import. | - import_key that will contains the import code YYYYMMDDHHMMSS if you make mass import. | ||
Eventually | Eventually | ||
- fk_user_author integer that is the id of user making creation | - fk_user_author integer that is the id of user making creation | ||