Standardize field length

This commit is contained in:
Laurent Destailleur 2017-11-13 18:04:14 +01:00
parent 53bfbcf5db
commit 2d78136781
9 changed files with 37 additions and 21 deletions

View File

@ -392,6 +392,13 @@ ALTER TABLE llx_extrafields MODIFY COLUMN langs varchar(64);
ALTER TABLE llx_holiday_config MODIFY COLUMN name varchar(128);
ALTER TABLE llx_holiday_config ADD UNIQUE INDEX idx_holiday_config (name);
ALTER TABLE llx_societe MODIFY COLUMN ref_ext varchar(255);
ALTER TABLE llx_socpeople MODIFY COLUMN ref_ext varchar(255);
ALTER TABLE llx_actioncomm MODIFY COLUMN ref_ext varchar(255);
ALTER TABLE llx_expedition MODIFY COLUMN ref_ext varchar(255);
ALTER TABLE llx_livraison MODIFY COLUMN ref_ext varchar(255);
ALTER TABLE llx_contrat MODIFY COLUMN ref_ext varchar(255);
ALTER TABLE llx_actioncomm MODIFY COLUMN label varchar(255) NOT NULL;
ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_fk_user_action (fk_user_action);
@ -400,6 +407,8 @@ ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_datep (datep);
ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_datep2 (datep2);
ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_recurid (recurid);
ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_ref_ext (ref_ext);
ALTER TABLE llx_payment_various ADD COLUMN fk_projet integer DEFAULT NULL after accountancy_code;
UPDATE llx_const set name = 'ONLINE_PAYMENT_MESSAGE_OK' where name = 'PAYPAL_MESSAGE_OK';

View File

@ -1,5 +1,5 @@
-- ============================================================================
-- Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2005-2017 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2011 Regis Houssin <regis.houssin@capnetworks.com>
--
-- This program is free software; you can redistribute it and/or modify
@ -22,3 +22,10 @@ ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_fk_soc (fk_soc);
ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_fk_contact (fk_contact);
ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_code (code);
ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_fk_element (fk_element);
ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_fk_user_action (fk_user_action);
ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_fk_project (fk_project);
ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_datep (datep);
ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_datep2 (datep2);
ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_recurid (recurid);
ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_ref_ext (ref_ext);

View File

@ -1,6 +1,6 @@
-- ========================================================================
-- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2005-2017 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2011 Regis Houssin <regis.houssin@capnetworks.com>
--
-- This program is free software; you can redistribute it and/or modify
@ -23,8 +23,8 @@
create table llx_actioncomm
(
id integer AUTO_INCREMENT PRIMARY KEY,
ref_ext varchar(128),
entity integer DEFAULT 1 NOT NULL, -- multi company id
ref_ext varchar(255), -- reference into an external system (not used by dolibarr). Example: An id coming from google calendar has length between 5 and 1024 chars. An event id must follow rule: chars used in base32hex encoding (i.e. lowercase letters a-v and digits 0-9, see section 3.1.2 in RFC2938)
entity integer DEFAULT 1 NOT NULL, -- multi company id
datep datetime, -- date start
datep2 datetime, -- date end
@ -64,7 +64,7 @@ create table llx_actioncomm
email_tobcc varchar(255), -- when event was an email, we store here the email_tobcc
errors_to varchar(255), -- when event was an email, we store here the erros_to
recurid varchar(128), -- used to store event id to link each other all the repeating event record
recurid varchar(128), -- used to store event id to link each other all the repeating event record. It can be the "iCalUID" as in RFC5545 (an id similar for all the same serie)
recurrule varchar(128), -- contains string with ical format recurring rule like 'FREQ=MONTHLY;INTERVAL=2;BYMONTHDAY=19' or 'FREQ=WEEKLY;BYDAY=MO'
recurdateend datetime, -- no more recurring event after this date

View File

@ -26,7 +26,7 @@ create table llx_commande_fournisseur
ref varchar(255) NOT NULL, -- order number
entity integer DEFAULT 1 NOT NULL, -- multi company id
ref_ext varchar(64), -- reference into an external system (not used by dolibarr)
ref_ext varchar(255), -- reference into an external system (not used by dolibarr)
ref_supplier varchar(255),
fk_soc integer NOT NULL,

View File

@ -21,10 +21,10 @@
create table llx_contrat
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
ref varchar(50), -- contrat reference
ref_customer varchar(50), -- customer contract ref
ref_supplier varchar(50), -- supplier contract ref
ref_ext varchar(50), -- external contract ref
ref varchar(255), -- contrat reference
ref_customer varchar(255), -- customer contract ref
ref_supplier varchar(255), -- supplier contract ref
ref_ext varchar(255), -- external contract ref
entity integer DEFAULT 1 NOT NULL, -- multi company id
tms timestamp,
datec datetime, -- creation date

View File

@ -28,9 +28,9 @@ create table llx_expedition
fk_soc integer NOT NULL,
fk_projet integer DEFAULT NULL,
ref_ext varchar(30), -- reference into an external system (not used by dolibarr)
ref_int varchar(30), -- reference into an internal system (used by dolibarr to store extern id like paypal info)
ref_customer varchar(30), -- customer number
ref_ext varchar(255), -- reference into an external system (not used by dolibarr)
ref_int varchar(255), -- reference into an internal system (used by dolibarr to store extern id like paypal info)
ref_customer varchar(255), -- customer number
date_creation datetime, -- date de creation
fk_user_author integer, -- author of creation

View File

@ -25,9 +25,9 @@ create table llx_livraison
entity integer DEFAULT 1 NOT NULL, -- multi company id
fk_soc integer NOT NULL,
ref_ext varchar(30), -- reference into an external system (not used by dolibarr)
ref_int varchar(30), -- reference into an internal system (used by dolibarr to store extern id like paypal info)
ref_customer varchar(30), -- customer number
ref_ext varchar(255), -- reference into an external system (not used by dolibarr)
ref_int varchar(255), -- reference into an internal system (used by dolibarr to store extern id like paypal info)
ref_customer varchar(255), -- customer number
date_creation datetime, -- date de creation
fk_user_author integer, -- createur du bon de livraison

View File

@ -25,11 +25,11 @@ create table llx_societe
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
nom varchar(128), -- company reference name (should be same length than adherent.societe)
name_alias varchar(128) NULL,
entity integer DEFAULT 1 NOT NULL, -- multi company id
name_alias varchar(128) NULL,
entity integer DEFAULT 1 NOT NULL, -- multi company id
ref_ext varchar(128), -- reference into an external system (not used by dolibarr)
ref_int varchar(60), -- reference into an internal system (deprecated)
ref_ext varchar(255), -- reference into an external system (not used by dolibarr)
ref_int varchar(255), -- reference into an internal system (deprecated)
statut tinyint DEFAULT 0, -- statut
parent integer,

View File

@ -25,7 +25,7 @@ create table llx_socpeople
tms timestamp,
fk_soc integer, -- lien vers la societe
entity integer DEFAULT 1 NOT NULL, -- multi company id
ref_ext varchar(128), -- reference into an external system (not used by dolibarr)
ref_ext varchar(255), -- reference into an external system (not used by dolibarr)
civility varchar(6),
lastname varchar(50),
firstname varchar(50),