Language and development rules: Difference between revisions

Jump to navigation Jump to search
m
Tag: 2017 source edit
Tag: 2017 source edit
Line 341: Line 341:
*Database triggers means also that you include some "business rules" of your application into the database where most other rules are managed by the code itself (this can create conflict or code that can't be debugged with a step by step debugger)
*Database triggers means also that you include some "business rules" of your application into the database where most other rules are managed by the code itself (this can create conflict or code that can't be debugged with a step by step debugger)
*Database triggers execute code using the timezone, the default language of the database instead of the reference timezone of the application that may be different (generating offset into database) and the default language setup in application ...
*Database triggers execute code using the timezone, the default language of the database instead of the reference timezone of the application that may be different (generating offset into database) and the default language setup in application ...
*There is tons of reasons why we do not recommend to use database triggers in your own development.
*There is tons of other reasons why we do not recommend to use database triggers in your own development.


Using Database triggers can save you time when you make development but is a very bad practice when quality, portability, security and sustainability are priority, so it is forbidden as it is not compatible with the high level of quality of code expected by Dolibarr team. External modules that uses Database triggers may also be refused on the market place since it won't work for more than 50% of users.
Using Database triggers can save you time when you make development but is a very bad practice when quality, portability, security and sustainability are priority, so it is forbidden as it is not compatible with the high level of quality of code expected by Dolibarr team. External modules that uses Database triggers may also be refused on the market place since it won't work for more than 50% of users.
==Basic Migration Rules==
*Structure migration scripts are files of the type '''install/mysql/migration/a.b.c-x.y.z.sql'''. In a migration file from version n to n+1, a table that is no longer used in n+1 is only dropped (DROP TABLE) during the migration from version n+1 to n+2. This is to ensure that obsolete tables are always kept for the duration of a version to correct any issues in case of a migration error.


==MySQL-MariaDB specificity==
==MySQL-MariaDB specificity==

Navigation menu