Facebook
From Dolierp, 1 Year ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 127
  1. Select script migration
  2. 13.0.0-14.0.0.sql
  3. Request 1 sql='DROP TRIGGER update_customer_modtime ON llx_ecm_directories;'
  4. Request 2 sql='DROP TRIGGER update_customer_modtime ON llx_ecm_files;'
  5. Request 3 sql='CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_ecm_directories FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();'
  6. Request 4 sql='CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_ecm_files FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();'
  7. Request 5 sql='ALTER TABLE llx_ecm_files ADD COLUMN note_private text AFTER fk_user_m;'
  8. Request 6 sql='ALTER TABLE llx_ecm_files ADD COLUMN note_public text AFTER note_private;'
  9. Request 7 sql='ALTER TABLE llx_accounting_bookkeeping DROP INDEX idx_accounting_bookkeeping_numero_compte;'
  10. Request 8 sql='ALTER TABLE llx_accounting_bookkeeping DROP INDEX idx_accounting_bookkeeping_code_journal;'
  11. Request 9 sql='ALTER TABLE llx_accounting_bookkeeping ADD INDEX idx_accounting_bookkeeping_fk_docdet (fk_docdet);'
  12. Request 10 sql='ALTER TABLE llx_accounting_bookkeeping ADD INDEX idx_accounting_bookkeeping_doc_date (doc_date);'
  13. Request 11 sql='ALTER TABLE llx_accounting_bookkeeping ADD INDEX idx_accounting_bookkeeping_numero_compte (numero_compte, entity);'
  14. Request 12 sql='ALTER TABLE llx_accounting_bookkeeping ADD INDEX idx_accounting_bookkeeping_code_journal (code_journal, entity);'
  15. Request 13 sql='ALTER TABLE llx_accounting_bookkeeping ADD INDEX idx_accounting_bookkeeping_piece_num (piece_num, entity);'
  16. Request 14 sql='ALTER TABLE llx_recruitment_recruitmentcandidature MODIFY COLUMN email_msgid VARCHAR(175);'
  17. Request 15 sql='ALTER TABLE llx_asset CHANGE COLUMN amount amount_ht double(24,8) DEFAULT NULL;'
  18. Request 16 sql='ALTER TABLE llx_asset ADD COLUMN amount_vat double(24,8) DEFAULT NULL;'
  19. Request 17 sql='ALTER TABLE llx_supplier_proposal_extrafields ADD INDEX idx_supplier_proposal_extrafields (fk_object);'
  20. Request 18 sql='ALTER TABLE llx_supplier_proposaldet_extrafields ADD INDEX idx_supplier_proposaldet_extrafields (fk_object);'
  21. Request 19 sql='ALTER TABLE llx_asset_extrafields ADD INDEX idx_asset_extrafields (fk_object);'
  22. Request 20 sql='insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 6,'AC_EMAIL_IN','system','reception Email',NULL, 1, 4);'
  23. Request 21 sql='ALTER TABLE llx_accounting_bookkeeping ALTER COLUMN montant DROP NOT NULL;'
  24. Request 22 sql='UPDATE llx_c_country SET eec = 1 WHERE code IN ('AT','BE','BG','CY','CZ','DE','DK','EE','ES','FI','FR','GR','HR','NL','HU','IE','IM','IT','LT','LU','LV','MC','MT','PL','PT','RO','SE','SK','SI');'
  25. Request 23 sql='INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 11, 'US-BASE', 'USA basic chart of accounts', 1);'
  26. Request 24 sql='INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 14, 'CA-ENG-BASE', 'Canadian basic chart of accounts - English', 1);'
  27. Request 25 sql='INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 154, 'SAT/24-2019', 'Catalogo y codigo agrupador fiscal del 2019', 1);'
  28. Request 26 sql='UPDATE llx_accounting_system SET fk_country = 1 WHERE fk_country IS NULL;'
  29. Request 27 sql='UPDATE llx_const set value = __ENCRYPT('eldy')__ WHERE __DECRYPT('value')__ = 'auguria';'
  30. Request 28 sql='UPDATE llx_const set value = __ENCRYPT('eldy')__ WHERE __DECRYPT('value')__ = 'bureau2crea';'
  31. Request 29 sql='UPDATE llx_const set value = __ENCRYPT('eldy')__ WHERE __DECRYPT('value')__ = 'amarok';'
  32. Request 30 sql='UPDATE llx_const set value = __ENCRYPT('eldy')__ WHERE __DECRYPT('value')__ = 'cameleo';'
  33. Request 31 sql='DELETE FROM llx_user_param where param = 'MAIN_THEME' and value in ('auguria', 'amarok', 'cameleo');'
  34. Request 32 sql='ALTER TABLE llx_product_fournisseur_price ADD COLUMN packaging real DEFAULT NULL;'
  35. Request 33 sql='ALTER TABLE llx_product_fournisseur_price MODIFY COLUMN packaging real DEFAULT NULL;'
  36. Error DB_ERROR_42804: ALTER TABLE llx_product_fournisseur_price MODIFY COLUMN packaging real DEFAULT NULL;
  37. ERROR: 42804: column "packaging" cannot be cast automatically to type real HINT: You might need to specify "USING packaging::real". LOCATION: ATPrepAlterColumnType, tablecmds.c:11681
  38. Request 34 sql='UPDATE llx_facturedet SET multicurrency_subprice = -multicurrency_subprice WHERE ((multicurrency_subprice < 0 and subprice > 0) OR (multicurrency_subprice > 0 and subprice < 0));'
  39. Request 35 sql='UPDATE llx_facturedet SET multicurrency_total_ht = -multicurrency_total_ht WHERE ((multicurrency_total_ht < 0 and total_ht > 0) OR (multicurrency_total_ht > 0 and total_ht < 0));'
  40. Request 36 sql='UPDATE llx_facturedet SET multicurrency_total_tva = -multicurrency_total_tva WHERE ((multicurrency_total_tva < 0 and total_tva > 0) OR (multicurrency_total_tva > 0 and total_tva < 0));'
  41. Request 37 sql='UPDATE llx_facturedet SET multicurrency_total_ttc = -multicurrency_total_ttc WHERE ((multicurrency_total_ttc < 0 and total_ttc > 0) OR (multicurrency_total_ttc > 0 and total_ttc < 0));'
  42. Request 38 sql='UPDATE llx_facture SET multicurrency_total_ht = -multicurrency_total_ht WHERE ((multicurrency_total_ht < 0 and total_ht > 0) OR (multicurrency_total_ht > 0 and total_ht < 0));'
  43. Request 39 sql='UPDATE llx_facture SET multicurrency_total_tva = -multicurrency_total_tva WHERE ((multicurrency_total_tva < 0 and total_tva > 0) OR (multicurrency_total_tva > 0 and total_tva < 0));'
  44. Request 40 sql='UPDATE llx_facture SET multicurrency_total_ttc = -multicurrency_total_ttc WHERE ((multicurrency_total_ttc < 0 and total_ttc > 0) OR (multicurrency_total_ttc > 0 and total_ttc < 0));'
  45. Request 41 sql='UPDATE llx_facture_fourn_det SET multicurrency_subprice = -multicurrency_subprice WHERE ((multicurrency_subprice < 0 and pu_ht > 0) OR (multicurrency_subprice > 0 and pu_ht < 0));'
  46. Request 42 sql='UPDATE llx_facture_fourn_det SET multicurrency_total_ht = -multicurrency_total_ht WHERE ((multicurrency_total_ht < 0 and total_ht > 0) OR (multicurrency_total_ht > 0 and total_ht < 0));'
  47. Request 43 sql='UPDATE llx_facture_fourn_det SET multicurrency_total_tva = -multicurrency_total_tva WHERE ((multicurrency_total_tva < 0 and tva > 0) OR (multicurrency_total_tva > 0 and tva < 0));'
  48. Request 44 sql='UPDATE llx_facture_fourn_det SET multicurrency_total_ttc = -multicurrency_total_ttc WHERE ((multicurrency_total_ttc < 0 and total_ttc > 0) OR (multicurrency_total_ttc > 0 and total_ttc < 0));'
  49. Request 45 sql='UPDATE llx_facture_fourn SET multicurrency_total_ht = -multicurrency_total_ht WHERE ((multicurrency_total_ht < 0 and total_ht > 0) OR (multicurrency_total_ht > 0 and total_ht < 0));'
  50. Request 46 sql='UPDATE llx_facture_fourn SET multicurrency_total_tva = -multicurrency_total_tva WHERE ((multicurrency_total_tva < 0 and total_tva > 0) OR (multicurrency_total_tva > 0 and total_tva < 0));'
  51. Request 47 sql='UPDATE llx_facture_fourn SET multicurrency_total_ttc = -multicurrency_total_ttc WHERE ((multicurrency_total_ttc < 0 and total_ttc > 0) OR (multicurrency_total_ttc > 0 and total_ttc < 0));'
  52. Request 48 sql='UPDATE llx_c_ticket_type set label = 'Issue or bug' WHERE code = 'ISSUE';'
  53. Request 49 sql='INSERT INTO llx_c_ticket_type (code, pos, label, active, use_default, description) VALUES('PROBLEM', '22', 'Problem', 0, 0, NULL);'
  54. Request 50 sql='ALTER TABLE llx_import_model MODIFY COLUMN type varchar(64);'
  55. Request 51 sql='ALTER TABLE llx_export_model MODIFY COLUMN type varchar(64);'
  56. Request 52 sql='ALTER TABLE llx_import_model ADD COLUMN entity integer DEFAULT 0 NOT NULL;'
  57. Request 53 sql='ALTER TABLE llx_export_model ADD COLUMN entity integer DEFAULT 0 NOT NULL;'
  58. Request 54 sql='ALTER TABLE llx_product_lot ADD COLUMN eol_date datetime NULL;'
  59. Request 55 sql='ALTER TABLE llx_product_lot ADD COLUMN manufacturing_date datetime NULL;'
  60. Request 56 sql='ALTER TABLE llx_product_lot ADD COLUMN scrapping_date datetime NULL;'
  61. Request 57 sql='create table llx_accounting_groups_account ( rowid integer AUTO_INCREMENT PRIMARY KEY, fk_accounting_account INTEGER NOT NULL, fk_c_accounting_category INTEGER NOT NULL )ENGINE=innodb;'
  62. Request 58 sql='ALTER TABLE llx_oauth_token ADD COLUMN restricted_ips varchar(200);'
  63. Request 59 sql='ALTER TABLE llx_oauth_token ADD COLUMN datec datetime DEFAULT NULL;'
  64. Request 60 sql='ALTER TABLE llx_oauth_token ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;'
  65. Request 61 sql='ALTER TABLE llx_events ADD COLUMN authentication_method varchar(64) NULL;'
  66. Request 62 sql='ALTER TABLE llx_events ADD COLUMN fk_oauth_token integer NULL;'
  67. Request 63 sql='ALTER TABLE llx_mailing_cibles MODIFY COLUMN tag varchar(64) NULL;'
  68. Request 64 sql='ALTER TABLE llx_mailing_cibles ADD INDEX idx_mailing_cibles_tag (tag);'
  69. Request 65 sql='ALTER TABLE llx_c_availability ADD COLUMN position integer NOT NULL DEFAULT 0;'
  70. Request 66 sql='ALTER TABLE llx_adherent ADD COLUMN ref varchar(30) AFTER rowid;'
  71. Request 67 sql='UPDATE llx_adherent SET ref = rowid WHERE ref = '' or ref IS NULL;'
  72. Request 68 sql='ALTER TABLE llx_adherent MODIFY COLUMN ref varchar(30) NOT NULL;'
  73. Request 69 sql='ALTER TABLE llx_adherent ADD UNIQUE INDEX uk_adherent_ref (ref, entity);'
  74. Request 70 sql='ALTER TABLE llx_societe ADD COLUMN accountancy_code_sell varchar(32) AFTER webservices_key;'
  75. Request 71 sql='ALTER TABLE llx_societe ADD COLUMN accountancy_code_buy varchar(32) AFTER accountancy_code_sell;'
  76. Request 72 sql='ALTER TABLE llx_bank_account ADD COLUMN ics varchar(32) NULL;'
  77. Request 73 sql='ALTER TABLE llx_bank_account ADD COLUMN ics_transfer varchar(32) NULL;'
  78. Request 74 sql='ALTER TABLE llx_facture MODIFY COLUMN date_valid DATETIME NULL DEFAULT NULL;'
  79. Request 75 sql='ALTER TABLE llx_website ADD COLUMN lastaccess datetime NULL;'
  80. Request 76 sql='ALTER TABLE llx_website ADD COLUMN pageviews_month BIGINT UNSIGNED DEFAULT 0;'
  81. Request 77 sql='ALTER TABLE llx_website ADD COLUMN pageviews_total BIGINT UNSIGNED DEFAULT 0;'
  82. Request 78 sql='ALTER TABLE llx_workstation_workstation DROP FOREIGN KEY llx_workstation_workstation_fk_user_creat;'
  83. Request 79 sql='ALTER TABLE llx_propal DROP FOREIGN KEY llx_propal_fk_warehouse;'
  84. Request 80 sql='CREATE TABLE llx_workstation_workstation( rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, ref varchar(128) DEFAULT '(PROV)' NOT NULL, label varchar(255), type varchar(7), note_public text, entity int DEFAULT 1, note_private text, date_creation datetime NOT NULL, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14), status smallint NOT NULL, nb_operators_required integer, thm_operator_estimated double, thm_machine_estimated double ) ENGINE=innodb;'
  85. Request 81 sql='ALTER TABLE llx_workstation_workstation ADD INDEX idx_workstation_workstation_rowid (rowid);'
  86. Request 82 sql='ALTER TABLE llx_workstation_workstation ADD INDEX idx_workstation_workstation_ref (ref);'
  87. Request 83 sql='ALTER TABLE llx_workstation_workstation ADD CONSTRAINT fk_workstation_workstation_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid);'
  88. Request 84 sql='ALTER TABLE llx_workstation_workstation ADD INDEX idx_workstation_workstation_status (status);'
  89. Request 85 sql='CREATE TABLE llx_workstation_workstation_resource( rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_resource integer, fk_workstation integer ) ENGINE=innodb;'
  90. Request 86 sql='CREATE TABLE llx_workstation_workstation_usergroup( rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_usergroup integer, fk_workstation integer ) ENGINE=innodb;'
  91. Request 87 sql='DROP TABLE llx_c_producbatch_qcstatus;'
  92. Request 88 sql='CREATE TABLE llx_c_productbatch_qcstatus( rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, entity integer NOT NULL DEFAULT 1, code varchar(16) NOT NULL, label varchar(50) NOT NULL, active integer DEFAULT 1 NOT NULL ) ENGINE=innodb;'
  93. Request 89 sql='ALTER TABLE llx_c_productbatch_qcstatus ADD UNIQUE INDEX uk_c_productbatch_qcstatus(code, entity);'
  94. Request 90 sql='INSERT INTO llx_c_productbatch_qcstatus (code, label, active) VALUES ('OK', 'InWorkingOrder', 1);'
  95. Request 91 sql='INSERT INTO llx_c_productbatch_qcstatus (code, label, active) VALUES ('KO', 'OutOfOrder', 1);'
  96. Request 92 sql='ALTER TABLE llx_product_customer_price ADD COLUMN ref_customer varchar(30);'
  97. Request 93 sql='ALTER TABLE llx_product_customer_price_log ADD COLUMN ref_customer varchar(30);'
  98. Request 94 sql='ALTER TABLE llx_propal ADD COLUMN fk_warehouse integer DEFAULT NULL AFTER fk_shipping_method;'
  99. Request 95 sql='ALTER TABLE llx_propal ADD INDEX idx_propal_fk_warehouse(fk_warehouse);'
  100. Request 96 sql='ALTER TABLE llx_societe DROP INDEX idx_societe_entrepot;'
  101. Request 97 sql='ALTER TABLE llx_societe CHANGE fk_entrepot fk_warehouse INTEGER DEFAULT NULL;'
  102. Request 98 sql='ALTER TABLE llx_societe ADD INDEX idx_societe_warehouse(fk_warehouse);'
  103. Request 99 sql='ALTER TABLE llx_societe ALTER COLUMN fk_typent DROP NOT NULL;'
  104. Request 100 sql='UPDATE llx_societe SET fk_typent=NULL, tms=tms WHERE fk_typent=0;'
  105. Request 101 sql='DELETE FROM llx_c_typent WHERE code='TE_UNKNOWN';'
  106. Request 102 sql='ALTER TABLE llx_socpeople MODIFY poste varchar(255);'
  107. Request 103 sql='ALTER TABLE llx_menu ADD COLUMN prefix varchar(255) NULL AFTER titre;'
  108. Request 104 sql='ALTER TABLE llx_chargesociales ADD COLUMN fk_user integer DEFAULT NULL;'
  109. Request 105 sql='ALTER TABLE llx_mrp_production ADD COLUMN origin_id integer AFTER fk_mo;'
  110. Request 106 sql='ALTER TABLE llx_mrp_production ADD COLUMN origin_type varchar(10) AFTER origin_id;'
  111. Request 107 sql='ALTER TABLE llx_fichinter ADD COLUMN last_main_doc varchar(255) AFTER model_pdf;'
  112. Request 108 sql='ALTER TABLE llx_projet ADD COLUMN last_main_doc varchar(255) AFTER model_pdf;'
  113. Request 109 sql='ALTER TABLE llx_expensereport ADD COLUMN last_main_doc varchar(255) DEFAULT NULL AFTER model_pdf;'
  114. Request 110 sql='create table llx_payment_vat ( rowid integer AUTO_INCREMENT PRIMARY KEY, fk_tva integer, datec datetime, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datep datetime, amount double(24,8) DEFAULT 0, fk_typepaiement integer NOT NULL, num_paiement varchar(50), note text, fk_bank integer NOT NULL, fk_user_creat integer, fk_user_modif integer )ENGINE=innodb;'
  115. Request 111 sql='ALTER TABLE llx_tva ADD COLUMN paye smallint default 1 NOT NULL;'
  116. Request 112 sql='ALTER TABLE llx_tva ADD COLUMN fk_account integer;'
  117. Request 113 sql='INSERT INTO llx_payment_vat (rowid, fk_tva, datec, datep, amount, fk_typepaiement, num_paiement, note, fk_bank, fk_user_creat, fk_user_modif) SELECT rowid, rowid, NOW(), datep, amount, COALESCE(fk_typepayment, 0), num_payment, 'Created automatically by migration v13 to v14', fk_bank, fk_user_creat, fk_user_modif FROM llx_tva WHERE fk_bank IS NOT NULL;'
  118. Request 114 sql='ALTER TABLE llx_tva ALTER COLUMN paye SET DEFAULT 0;'
  119. Request 115 sql='INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailAskConf)', 10, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__', '__(Hello)__,<br /><br />__(OrganizationEventConfRequestWasReceived)__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);'
  120. Request 116 sql='INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailAskBooth)', 20, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__', '__(Hello)__,<br /><br />__(OrganizationEventBoothRequestWasReceived)__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);'
  121. Request 117 sql='INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailSubsBooth)', 30, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailBoothPayment)__', '__(Hello)__,<br /><br />__(OrganizationEventPaymentOfBoothWasReceived)__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);'
  122. Request 118 sql='INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailSubsEvent)', 40, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailRegistrationPayment)__', '__(Hello)__,<br /><br />__(OrganizationEventPaymentOfRegistrationWasReceived)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);'
  123. Request 119 sql='INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationMassEmailAttendees)', 50, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__', '__(Hello)__,<br /><br />__(OrganizationEventBulkMailToAttendees)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);'
  124. Request 120 sql='INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationMassEmailSpeakers)', 60, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__', '__(Hello)__,<br /><br />__(OrganizationEventBulkMailToSpeakers)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);'
  125. Request 121 sql='ALTER TABLE llx_projet ADD COLUMN accept_conference_suggestions integer DEFAULT 0;'
  126. Request 122 sql='ALTER TABLE llx_projet ADD COLUMN accept_booth_suggestions integer DEFAULT 0;'
  127. Request 123 sql='ALTER TABLE llx_projet ADD COLUMN price_registration double(24,8);'
  128. Request 124 sql='ALTER TABLE llx_projet ADD COLUMN price_booth double(24,8);'
  129. Request 125 sql='ALTER TABLE llx_actioncomm ADD COLUMN num_vote integer DEFAULT NULL AFTER reply_to;'
  130. Request 126 sql='ALTER TABLE llx_actioncomm ADD COLUMN event_paid smallint NOT NULL DEFAULT 0 AFTER num_vote;'
  131. Request 127 sql='ALTER TABLE llx_actioncomm ADD COLUMN status smallint NOT NULL DEFAULT 0 AFTER event_paid;'
  132. Request 128 sql='ALTER TABLE llx_actioncomm ADD COLUMN ref varchar(30) AFTER id;'
  133. Request 129 sql='UPDATE llx_actioncomm SET ref = id WHERE ref = '' OR ref IS NULL;'
  134. Request 130 sql='ALTER TABLE llx_actioncomm MODIFY COLUMN ref varchar(30) NOT NULL;'
  135. Request 131 sql='ALTER TABLE llx_actioncomm ADD UNIQUE INDEX uk_actioncomm_ref (ref, entity);'
  136. Request 132 sql='ALTER TABLE llx_c_actioncomm MODIFY code varchar(50) NOT NULL;'
  137. Request 133 sql='ALTER TABLE llx_c_actioncomm MODIFY module varchar(50) DEFAULT NULL;'
  138. Request 134 sql='INSERT INTO llx_c_actioncomm (id, code, type, libelle, module, active, position) VALUES ( 60,'AC_EO_ONLINECONF','module','Online/Virtual conference','conference@eventorganization', 1, 60);'
  139. Request 135 sql='INSERT INTO llx_c_actioncomm (id, code, type, libelle, module, active, position) VALUES ( 61,'AC_EO_INDOORCONF','module','Indoor conference','conference@eventorganization', 1, 61);'
  140. Request 136 sql='INSERT INTO llx_c_actioncomm (id, code, type, libelle, module, active, position) VALUES ( 62,'AC_EO_ONLINEBOOTH','module','Online/Virtual booth','booth@eventorganization', 1, 62);'
  141. Request 137 sql='INSERT INTO llx_c_actioncomm (id, code, type, libelle, module, active, position) VALUES ( 63,'AC_EO_INDOORBOOTH','module','Indoor booth','booth@eventorganization', 1, 63);'
  142. Request 138 sql='ALTER TABLE llx_commande CHANGE COLUMN tva total_tva double(24,8) default 0;'
  143. Request 139 sql='ALTER TABLE llx_supplier_proposal CHANGE COLUMN tva total_tva double(24,8) default 0;'
  144. Request 140 sql='ALTER TABLE llx_supplier_proposal CHANGE COLUMN total total_ttc double(24,8) default 0;'
  145. Request 141 sql='ALTER TABLE llx_propal CHANGE COLUMN tva total_tva double(24,8) default 0;'
  146. Request 142 sql='ALTER TABLE llx_propal CHANGE COLUMN total total_ttc double(24,8) default 0;'
  147. Request 143 sql='ALTER TABLE llx_facture CHANGE COLUMN tva total_tva double(24,8) default 0;'
  148. Request 144 sql='ALTER TABLE llx_facture CHANGE COLUMN total total_ht double(24,8) default 0;'
  149. Request 145 sql='ALTER TABLE llx_facture_rec CHANGE COLUMN tva total_tva double(24,8) default 0;'
  150. Request 146 sql='ALTER TABLE llx_facture_rec CHANGE COLUMN total total_ht double(24,8) default 0;'
  151. Request 147 sql='ALTER TABLE llx_commande_fournisseur CHANGE COLUMN tva total_tva double(24,8) default 0;'
  152. Request 148 sql='create table llx_salary ( rowid integer AUTO_INCREMENT PRIMARY KEY, ref varchar(30) NULL, label varchar(255), tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, fk_user integer NOT NULL, datep date, datev date, salary double(24,8), amount double(24,8) NOT NULL DEFAULT 0, fk_projet integer DEFAULT NULL, datesp date, dateep date, entity integer DEFAULT 1 NOT NULL, note text, fk_bank integer, paye smallint default 1 NOT NULL, fk_typepayment integer NOT NULL, fk_account integer, fk_user_author integer, fk_user_modif integer ) ENGINE=innodb;'
  153. Request 149 sql='ALTER TABLE llx_payment_salary ALTER COLUMN fk_user DROP NOT NULL;'
  154. Request 150 sql='ALTER TABLE llx_payment_salary ADD COLUMN fk_salary integer;'
  155. Request 151 sql='INSERT INTO llx_salary (rowid, ref, fk_user, amount, fk_projet, fk_typepayment, label, datesp, dateep, entity, note, fk_bank, paye) SELECT ps.rowid, ps.rowid, ps.fk_user, ps.amount, ps.fk_projet, ps.fk_typepayment, ps.label, ps.datesp, ps.dateep, ps.entity, ps.note, ps.fk_bank, 1 FROM llx_payment_salary ps WHERE ps.fk_salary IS NULL;'
  156. Request 152 sql='UPDATE llx_payment_salary SET fk_salary = rowid WHERE fk_salary IS NULL;'
  157. Request 153 sql='UPDATE llx_payment_salary SET ref = rowid WHERE ref IS NULL;'
  158. Request 154 sql='ALTER TABLE llx_salary ALTER COLUMN paye set default 0;'
  159. Request 155 sql='UPDATE llx_extrafields SET elementtype = 'salary' WHERE elementtype = 'payment_salary';'
  160. Request 156 sql='ALTER TABLE llx_payment_salary_extrafields RENAME TO llx_salary_extrafields;'
  161. Request 157 sql='DROP INDEX idx_payment_salary_extrafields;'
  162. Request 158 sql='ALTER TABLE llx_salary_extrafields ADD INDEX idx_salary_extrafields (fk_object);'
  163. Request 159 sql='DELETE FROM llx_boxes WHERE box_id IN (SELECT rowid FROM llx_boxes_def WHERE file IN ('box_graph_ticket_by_severity', 'box_ticket_by_severity.php', 'box_nb_ticket_last_x_days.php', 'box_nb_tickets_type.php', 'box_new_vs_close_ticket.php'));'
  164. Request 160 sql='DELETE FROM llx_boxes_def WHERE file IN ('box_graph_ticket_by_severity', 'box_ticket_by_severity.php', 'box_nb_ticket_last_x_days.php', 'box_nb_tickets_type.php', 'box_new_vs_close_ticket.php');'
  165. Request 161 sql='create table llx_product_perentity ( rowid integer AUTO_INCREMENT PRIMARY KEY, fk_product integer, entity integer DEFAULT 1 NOT NULL, accountancy_code_sell varchar(32), accountancy_code_sell_intra varchar(32), accountancy_code_sell_export varchar(32), accountancy_code_buy varchar(32), accountancy_code_buy_intra varchar(32), accountancy_code_buy_export varchar(32), pmp double(24,8) )ENGINE=innodb;'
  166. Request 162 sql='ALTER TABLE llx_product_perentity ADD INDEX idx_product_perentity_fk_product (fk_product);'
  167. Request 163 sql='ALTER TABLE llx_product_perentity ADD UNIQUE INDEX uk_product_perentity (fk_product, entity);'
  168. Request 164 sql='create table llx_societe_perentity ( rowid integer AUTO_INCREMENT PRIMARY KEY, fk_soc integer, entity integer DEFAULT 1 NOT NULL, accountancy_code_sell varchar(32), accountancy_code_buy varchar(32) )ENGINE=innodb;'
  169. Request 165 sql='ALTER TABLE llx_societe_perentity ADD INDEX idx_societe_perentity_fk_soc (fk_soc);'
  170. Request 166 sql='ALTER TABLE llx_societe_perentity ADD UNIQUE INDEX uk_societe_perentity (fk_soc, entity);'
  171. Request 167 sql='CREATE TABLE llx_eventorganization_conferenceorboothattendee( rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, ref varchar(128) NOT NULL, fk_soc integer, fk_actioncomm integer, fk_project integer NOT NULL, fk_invoice integer NULL, email varchar(100), date_subscription datetime, amount double DEFAULT NULL, note_public text, note_private text, date_creation datetime NOT NULL, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, fk_user_modif integer, last_main_doc varchar(255), import_key varchar(14), model_pdf varchar(255), status smallint NOT NULL ) ENGINE=innodb;'
  172. Request 168 sql='ALTER TABLE llx_eventorganization_conferenceorboothattendee ALTER COLUMN fk_actioncomm DROP NOT NULL;'
  173. Request 169 sql='ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD COLUMN fk_project integer NOT NULL;'
  174. Request 170 sql='ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD COLUMN fk_invoice integer NULL;'
  175. Request 171 sql='ALTER TABLE llx_eventorganization_conferenceorboothattendee DROP FOREIGN KEY fx_eventorganization_conferenceorboothattendee_fk_soc;'
  176. Request 172 sql='ALTER TABLE llx_eventorganization_conferenceorboothattendee DROP FOREIGN KEY fx_eventorganization_conferenceorboothattendee_fk_actioncomm;'
  177. Request 173 sql='ALTER TABLE llx_eventorganization_conferenceorboothattendee DROP FOREIGN KEY fx_eventorganization_conferenceorboothattendee_fk_project;'
  178. Request 174 sql='ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_rowid (rowid);'
  179. Request 175 sql='ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_ref (ref);'
  180. Request 176 sql='ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_fk_soc (fk_soc);'
  181. Request 177 sql='ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_fk_actioncomm (fk_actioncomm);'
  182. Request 178 sql='ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_email (email);'
  183. Request 179 sql='ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_status (status);'
  184. Request 180 sql='DROP INDEX uk_eventorganization_conferenceorboothattendee;'
  185. Request 181 sql='ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD UNIQUE INDEX uk_eventorganization_conferenceorboothattendee(fk_project, email, fk_actioncomm);'
  186. Request 182 sql='create table llx_eventorganization_conferenceorboothattendee_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) ) ENGINE=innodb;'
  187. Request 183 sql='ALTER TABLE llx_eventorganization_conferenceorboothattendee_extrafields ADD INDEX idx_conferenceorboothattendee_fk_object(fk_object);'
  188. Request 184 sql='ALTER TABLE llx_c_ticket_category ADD COLUMN public integer DEFAULT 0;'
  189. Request 185 sql='ALTER TABLE llx_c_ticket_category ALTER COLUMN pos TYPE INTEGER USING pos::INTEGER;'
  190. Request 186 sql='ALTER TABLE llx_c_ticket_category ALTER COLUMN pos SET NOT NULL;'
  191. Request 187 sql='ALTER TABLE llx_c_ticket_category ALTER COLUMN pos SET DEFAULT 0;'
  192. Request 188 sql='ALTER TABLE llx_c_ticket_category MODIFY COLUMN pos integer DEFAULT 0 NOT NULL;'
  193. Request 189 sql='ALTER TABLE llx_propal ADD COLUMN date_signature datetime AFTER date_valid;'
  194. Request 190 sql='ALTER TABLE llx_propal ADD COLUMN fk_user_signature integer AFTER fk_user_valid;'
  195. Request 191 sql='ALTER TABLE llx_propal ADD CONSTRAINT fk_propal_fk_user_signature FOREIGN KEY (fk_user_signature) REFERENCES llx_user (rowid);'
  196. Request 192 sql='UPDATE llx_propal SET fk_user_signature = fk_user_cloture WHERE fk_user_signature IS NULL AND fk_user_cloture IS NOT NULL;'
  197. Request 193 sql='UPDATE llx_propal SET date_signature = date_cloture WHERE date_signature IS NULL AND date_cloture IS NOT NULL;'
  198. Request 194 sql='ALTER TABLE llx_product ADD COLUMN batch_mask VARCHAR(32) DEFAULT NULL;'
  199. Request 195 sql='ALTER TABLE llx_product ADD COLUMN lifetime INTEGER NULL;'
  200. Request 196 sql='ALTER TABLE llx_product ADD COLUMN qc_frequency INTEGER NULL;'
  201. Request 197 sql='insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (210, 'conferenceorbooth', 'internal', 'MANAGER', 'Conference or Booth manager', 1);'
  202. Request 198 sql='insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (211, 'conferenceorbooth', 'external', 'SPEAKER', 'Conference Speaker', 1);'
  203. Request 199 sql='insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (212, 'conferenceorbooth', 'external', 'RESPONSIBLE', 'Booth responsible', 1);'
  204. Request 200 sql='CREATE TABLE llx_partnership( rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, ref varchar(128) DEFAULT '(PROV)' NOT NULL, status smallint NOT NULL DEFAULT '0', fk_soc integer, fk_member integer, date_partnership_start date NOT NULL, date_partnership_end date NULL, entity integer DEFAULT 1 NOT NULL, reason_decline_or_cancel text NULL, date_creation datetime NOT NULL, fk_user_creat integer NOT NULL, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_modif integer, note_private text, note_public text, last_main_doc varchar(255), count_last_url_check_error integer DEFAULT '0', last_check_backlink datetime NULL, import_key varchar(14), model_pdf varchar(255) ) ENGINE=innodb;'
  205. Request 201 sql='ALTER TABLE llx_partnership ADD COLUMN last_check_backlink datetime NULL;'
  206. Request 202 sql='ALTER TABLE llx_partnership ADD INDEX idx_partnership_rowid (rowid);'
  207. Request 203 sql='ALTER TABLE llx_partnership ADD INDEX idx_partnership_ref (ref);'
  208. Request 204 sql='ALTER TABLE llx_partnership ADD INDEX idx_partnership_fk_soc (fk_soc);'
  209. Request 205 sql='ALTER TABLE llx_partnership ADD CONSTRAINT llx_partnership_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid);'
  210. Request 206 sql='ALTER TABLE llx_partnership ADD INDEX idx_partnership_status (status);'
  211. Request 207 sql='ALTER TABLE llx_partnership ADD INDEX idx_partnership_fk_member (fk_member);'
  212. Request 208 sql='create table llx_partnership_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) ) ENGINE=innodb;'
  213. Request 209 sql='ALTER TABLE llx_partnership_extrafields ADD INDEX idx_partnership_fk_object(fk_object);'
  214. Request 210 sql='INSERT INTO llx_c_email_templates (entity,module,type_template,label,lang,position,topic,joinfiles,content) VALUES (0, 'partnership', 'partnership_send', '(SendingEmailOnPartnershipWillSoonBeCanceled)', '', 100, '[__[MAIN_INFO_SOCIETE_NOM]__] - __(YourPartnershipWillSoonBeCanceledTopic)__', 0, '<body>\n <p>Hello,<br><br>\n__(YourPartnershipWillSoonBeCanceledContent)__</p>\n<br />\n\n<br />\n\n __(Sincerely)__ <br />\n __[MAIN_INFO_SOCIETE_NOM]__ <br />\n </body>\n');'
  215. Request 211 sql='INSERT INTO llx_c_email_templates (entity,module,type_template,label,lang,position,topic,joinfiles,content) VALUES (0, 'partnership', 'partnership_send', '(SendingEmailOnPartnershipCanceled)', '', 100, '[__[MAIN_INFO_SOCIETE_NOM]__] - __(YourPartnershipCanceledTopic)__', 0, '<body>\n <p>Hello,<br><br>\n__(YourPartnershipCanceledContent)__</p>\n<br />\n\n<br />\n\n __(Sincerely)__ <br />\n __[MAIN_INFO_SOCIETE_NOM]__ <br />\n </body>\n');'
  216. Request 212 sql='INSERT INTO llx_c_email_templates (entity,module,type_template,label,lang,position,topic,joinfiles,content) VALUES (0, 'partnership', 'partnership_send', '(SendingEmailOnPartnershipRefused)', '', 100, '[__[MAIN_INFO_SOCIETE_NOM]__] - __(YourPartnershipRefusedTopic)__', 0, '<body>\n <p>Hello,<br><br>\n__(YourPartnershipRefusedContent)__</p>\n<br />\n\n<br />\n\n __(Sincerely)__ <br />\n __[MAIN_INFO_SOCIETE_NOM]__ <br />\n </body>\n');'
  217. Request 213 sql='INSERT INTO llx_c_email_templates (entity,module,type_template,label,lang,position,topic,joinfiles,content) VALUES (0, 'partnership', 'partnership_send', '(SendingEmailOnPartnershipAccepted)', '', 100, '[__[MAIN_INFO_SOCIETE_NOM]__] - __(YourPartnershipAcceptedTopic)__', 0, '<body>\n <p>Hello,<br><br>\n__(YourPartnershipAcceptedContent)__</p>\n<br />\n\n<br />\n\n __(Sincerely)__ <br />\n __[MAIN_INFO_SOCIETE_NOM]__ <br />\n </body>\n');'
  218. Request 214 sql='ALTER TABLE llx_adherent ADD COLUMN url varchar(255) NULL AFTER email;'
  219. Request 215 sql='ALTER TABLE llx_facture_fourn ADD COLUMN date_closing datetime DEFAULT NULL after date_valid;'
  220. Request 216 sql='ALTER TABLE llx_facture_fourn ADD COLUMN fk_user_closing integer DEFAULT NULL after fk_user_valid;'
  221. Request 217 sql='ALTER TABLE llx_entrepot ADD COLUMN fk_project INTEGER DEFAULT NULL AFTER entity;'
  222. Request 218 sql='ALTER TABLE llx_payment_donation ADD COLUMN ext_payment_site varchar(128) AFTER note;'
  223. Request 219 sql='ALTER TABLE llx_payment_donation ADD COLUMN ext_payment_id varchar(128) AFTER note;'
  224. Request 220 sql='SELECT dol_util_rebuild_sequences();'
  225. Request 221 sql='UPDATE llx_const SET type = 'chaine', value = __ENCRYPT('github')__ WHERE __DECRYPT('name')__ = 'MAIN_BUGTRACK_ENABLELINK' AND __DECRYPT('value')__ = '1';'
  226. Request 222 sql='ALTER TABLE llx_facture_fourn_det ADD COLUMN fk_remise_except integer DEFAULT NULL after remise_percent;'
  227. Request 223 sql='ALTER TABLE llx_facture_fourn_det ADD UNIQUE INDEX uk_fk_remise_except (fk_remise_except, fk_facture_fourn);'
  228. Request 224 sql='CREATE TABLE llx_knowledgemanagement_knowledgerecord( rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, ref varchar(128) NOT NULL, date_creation datetime NOT NULL, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, last_main_doc varchar(255), fk_user_creat integer NOT NULL, fk_user_modif integer, fk_user_valid integer, import_key varchar(14), model_pdf varchar(255), question text NOT NULL, answer text, url varchar(255), fk_ticket integer, fk_c_ticket_category integer, status integer NOT NULL ) ENGINE=innodb;'
  229. Request 225 sql='ALTER TABLE llx_knowledgemanagement_knowledgerecord ADD COLUMN fk_ticket integer;'
  230. Request 226 sql='ALTER TABLE llx_knowledgemanagement_knowledgerecord ADD COLUMN fk_c_ticket_category integer;'
  231. Request 227 sql='ALTER TABLE llx_knowledgemanagement_knowledgerecord ADD COLUMN url varchar(255);'
  232. Request 228 sql='create table llx_knowledgemanagement_knowledgerecord_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) ) ENGINE=innodb;'
  233. Request 229 sql='ALTER TABLE llx_adherent_type ADD COLUMN amount DOUBLE(24,8) NULL DEFAULT NULL AFTER subscription;'
  234. Request 230 sql='INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) VALUES ('COMPANY_MODIFY','Third party update','Executed when you update third party','societe',1);'
  235. Request 231 sql='INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) VALUES ('CONTACT_MODIFY','Contact address update','Executed when a contact is updated','contact',51);'
  236. Request 232 sql='create table llx_c_partnership_type ( rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, code varchar(32) NOT NULL, label varchar(64) NOT NULL, active tinyint DEFAULT 1 NOT NULL )ENGINE=innodb;'
  237. Request 233 sql='DELETE FROM llx_rights_def WHERE module = 'hrm' AND perms = 'employee';'
  238. Request 234 sql='CREATE TABLE llx_ecm_directories_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) ) ENGINE=innodb;'
  239. Request 235 sql='DROP TABLE llx_categorie_association;'
  240. Request 236 sql='DROP TABLE llx_cond_reglement;'
  241. Request 237 sql='DROP TABLE llx_zapier_hook_extrafields;'
  242. Request 238 sql='CREATE TABLE llx_onlinesignature ( rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, object_type varchar(32) NOT NULL, object_id integer NOT NULL, datec datetime NOT NULL, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, name varchar(255) NOT NULL, ip varchar(128), pathoffile varchar(255) )ENGINE=innodb;'
  243. Request 239 sql='ALTER TABLE llx_partnership ALTER COLUMN date_partnership_end DROP NOT NULL;'
  244. Request 240 sql='ALTER TABLE llx_facture_fourn CHANGE COLUMN fk_mode_transport fk_transport_mode integer;'
  245. Request 241 sql='ALTER TABLE llx_c_socialnetworks DROP INDEX idx_c_socialnetworks_code;'
  246. Request 242 sql='ALTER TABLE llx_c_socialnetworks ADD UNIQUE INDEX idx_c_socialnetworks_code_entity (code, entity);'
  247. Request 243 sql='ALTER TABLE llx_propaldet ADD COLUMN import_key varchar(14);'