/[dolibarr]/dolibarr/mysql/migration/1.1.0-2.0.0.sql
ViewVC logotype

Diff of /dolibarr/mysql/migration/1.1.0-2.0.0.sql

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.59 by eldy, Sun Sep 4 16:59:02 2005 UTC revision 1.60 by eldy, Wed Sep 7 22:46:27 2005 UTC
# Line 1771  create table llx_projet_task_actors Line 1771  create table llx_projet_task_actors
1771  )type=innodb;  )type=innodb;
1772    
1773    
   
 create table llx_contrat_contact  
 (  
   rowid           integer AUTO_INCREMENT PRIMARY KEY,    
   datecreate      datetime,              
   statut          smallint DEFAULT 0,  
   nature                  varchar(80),  
   
   fk_contrat      integer NOT NULL,  
   fk_socpeople    integer NOT NULL  
     
 )type=innodb;  
   
   
 ALTER TABLE llx_contrat_contact  
         ADD INDEX idx_contrat_contact_fk_contrat (fk_contrat);  
           
 ALTER TABLE llx_contrat_contact  
         ADD CONSTRAINT idx_contrat_contact_fk_contrat            
         FOREIGN KEY (fk_contrat)     REFERENCES llx_contrat(rowid);  
           
1774  create table llx_societe_perms  create table llx_societe_perms
1775  (  (
1776    fk_soc    integer,    fk_soc    integer,
# Line 1803  create table llx_societe_perms Line 1782  create table llx_societe_perms
1782    UNIQUE INDEX(fk_soc, fk_user)    UNIQUE INDEX(fk_soc, fk_user)
1783  )type=innodb;  )type=innodb;
1784    
1785    
1786    create table llx_c_type_contact
1787    (
1788      rowid         integer     PRIMARY KEY,
1789      code          varchar(16) NOT NULL,
1790      element       varchar(30) NOT NULL,
1791      libelle           varchar(30) NOT NULL,
1792      active            tinyint DEFAULT 1  NOT NULL
1793    )type=innodb;
1794    
1795    
1796    ALTER TABLE llx_c_type_contact
1797            ADD UNIQUE INDEX idx_c_type_contact_uk (element, code);
1798    
1799    
1800    create table llx_element_contact
1801    (
1802      rowid           integer AUTO_INCREMENT PRIMARY KEY,  
1803      datecreate      datetime NULL,
1804      statut          smallint DEFAULT 5,
1805      
1806      fk_c_type_contact     int NOT NULL,
1807      element_id            int NOT NULL,
1808      
1809      fk_socpeople     integer NOT NULL
1810    )type=innodb;
1811    
1812    
1813    ALTER TABLE llx_element_contact
1814            ADD INDEX idx_element_contact_idx1 (element_id, fk_socpeople);
1815            
1816    ALTER TABLE llx_element_contact
1817            ADD CONSTRAINT idx_element_contact_fk_c_type_contact            
1818            FOREIGN KEY (fk_c_type_contact)     REFERENCES llx_c_type_contact(rowid);
1819            
1820            
1821    insert into llx_c_type_contact(rowid, code, element, libelle, active ) values (10, 'BILLING',       'contrat', 'Contact facturation du contrat', 1);
1822    insert into llx_c_type_contact(rowid, code, element, libelle, active ) values (11, 'SALESREPSIGN',  'contrat', 'Commercial signataire du contrat', 1);
1823    insert into llx_c_type_contact(rowid, code, element, libelle, active ) values (12, 'SALESREPFOLL',  'contrat', 'Commercial suivi du contrat', 1);
1824    insert into llx_c_type_contact(rowid, code, element, libelle, active ) values (13, 'CUSTOMER',      'contrat', 'Contact client pour le contrat', 1);
1825    
1826    insert into llx_c_type_contact(rowid, code, element, libelle, active ) values (20, 'BILLING',       'propale', 'Contact facturation de la propale', 1);
1827    insert into llx_c_type_contact(rowid, code, element, libelle, active ) values (21, 'SALESREPSIGN',  'propale', 'Commercial signataire de la propale', 1);
1828    insert into llx_c_type_contact(rowid, code, element, libelle, active ) values (22, 'SALESREPFOLL',  'propale', 'Commercial suivi de la propale', 1);
1829    insert into llx_c_type_contact(rowid, code, element, libelle, active ) values (23, 'CUSTOMER',      'propale', 'Contact client pour la propale', 1);
1830    
1831    insert into llx_c_type_contact(rowid, code, element, libelle, active ) values (80, 'PROJECTLEADER', 'projet',  'Chef de Projet', 1);
1832            

Legend:
Removed from v.1.59  
changed lines
  Added in v.1.60

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26