diff --git a/htdocs/conf/conf.php.example b/htdocs/conf/conf.php.example index ca7681a17b4..83dbd300f60 100644 --- a/htdocs/conf/conf.php.example +++ b/htdocs/conf/conf.php.example @@ -134,7 +134,7 @@ $dolibarr_main_db_type=''; // dolibarr_main_db_character_set -// Database character set used to store data (forced during database creation). +// Database character set used to store data (forced during database creation. value of database is then used). // Default value: depends on database driver // Examples: // dolibarr_main_db_character_set='utf8'; @@ -143,7 +143,7 @@ $dolibarr_main_db_character_set='utf8'; // dolibarr_main_db_collation -// Database character set used to sort data (forced during database creation). +// Database character set used to sort data (forced during database creation. value of database is then used). // Default value: depends on database driver // Examples: // dolibarr_main_db_collation='utf8_unicode_ci'; diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index 087abf709d9..d7ff764ce7a 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -854,7 +854,7 @@ class DoliDBMysqli extends DoliDB } /** - * Return charset used to store data in database + * Return charset used to store data in current database (same result than using SELECT default_character_set_name FROM information_schema.SCHEMATA WHERE schema_name = "databasename";) * * @return string Charset */ @@ -897,7 +897,7 @@ class DoliDBMysqli extends DoliDB } /** - * Return collation used in database + * Return collation used in current database * * @return string Collation value */ diff --git a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql index 2e8ce9e5db2..49440246946 100644 --- a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql +++ b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql @@ -177,3 +177,25 @@ ALTER TABLE llx_bank_account ADD COLUMN import_key varchar(14); ALTER TABLE llx_overwrite_trans ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER rowid; + +create table llx_user_employment +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + entity integer DEFAULT 1 NOT NULL, -- multi company id + ref varchar(50), -- reference + ref_ext varchar(50), -- reference into an external system (not used by dolibarr) + fk_user integer, + datec datetime, + tms timestamp, + fk_user_creat integer, + fk_user_modif integer, + job varchar(128), -- job position. may be a dictionnary + status integer NOT NULL, -- draft, active, closed + salary double(24,8), -- last and current value stored into llx_user + salaryextra double(24,8), -- last and current value stored into llx_user + weeklyhours double(16,8), -- last and current value stored into llx_user + dateemployment date, -- last and current value stored into llx_user + dateemploymentend date -- last and current value stored into llx_user +)ENGINE=innodb; + + diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql index da5eab83e9b..99e4a7c556c 100755 --- a/htdocs/install/mysql/migration/repair.sql +++ b/htdocs/install/mysql/migration/repair.sql @@ -13,6 +13,13 @@ -- flush privileges; +-- Requests to change character set and collation of a column + +-- ALTER TABLE llx_accountingaccount MODIFY account_number VARCHAR(20) CHARACTER SET utf8; +-- ALTER TABLE llx_accountingaccount MODIFY account_number VARCHAR(20) COLLATE utf8_unicode_ci; +-- You can check with show full columns from llx_accountingaccount; + + -- Requests to clean corrupted database