[FogBugz #709] Pouvoir changer les contrôles pour un distributeur #772

Open
opened 2023-07-04 10:08:19 +02:00 by fbenoist68 · 50 comments

Assigned To: CLOSED
Project: Mobile Portal
Area: Divers
Category: Fonctionnalité
Priority: A faire le plus tôt possible

Assigned To: CLOSED Project: Mobile Portal Area: Divers Category: Fonctionnalité Priority: A faire le plus tôt possible
Poster
Owner

Event ID: 3846
Date: 2022-01-22T11:55:19Z
Person: Frederik Benoist
Description: Fermé par Frederik Benoist

Event ID: 3846 Date: 2022-01-22T11:55:19Z Person: Frederik Benoist Description: Fermé par Frederik Benoist
Poster
Owner

Event ID: 3845
Date: 2022-01-22T11:55:18Z
Person: Frederik Benoist
Description: Résolu (Ne Sera Pas Implémenté) and assigned to Frederik Benoist by Frederik Benoist

Abandonné par manque de temps ...

Event ID: 3845 Date: 2022-01-22T11:55:18Z Person: Frederik Benoist Description: Résolu (Ne Sera Pas Implémenté) and assigned to Frederik Benoist by Frederik Benoist Abandonné par manque de temps ...
Poster
Owner

Event ID: 3773
Date: 2019-08-27T05:18:02Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3773 Date: 2019-08-27T05:18:02Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3768
Date: 2019-08-27T03:48:29Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3768 Date: 2019-08-27T03:48:29Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3767
Date: 2019-08-27T03:46:01Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3767 Date: 2019-08-27T03:46:01Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3744
Date: 2019-08-05T05:45:52Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3744 Date: 2019-08-05T05:45:52Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3743
Date: 2019-08-05T05:24:17Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

TODO 

MP_CHECKLIST_CIBLE ==> Remplace les 0 par des null car aujourd'hui c'est comme cela

Aussi effacer les abandons !!

 

 

Event ID: 3743 Date: 2019-08-05T05:24:17Z Person: Frederik Benoist Description: Modifié par Frederik Benoist <p>TODO&nbsp;</p> <p>MP_CHECKLIST_CIBLE ==&gt; Remplace les 0 par des null car aujourd&#39;hui c&#39;est comme cela</p> <p>Aussi effacer les abandons !!</p> <p>&nbsp;</p> <p><img src="https://gitea.q2ii.fr/attachments/3634a4b9-afe6-4dff-899f-7be58d60995a"/></p> <p>&nbsp;</p>
Poster
Owner

Event ID: 3742
Date: 2019-08-04T08:07:26Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

CREATE INDEX mobretail.idx01_mp_checklist_cible
    ON mobretail.mp_checklist_cible (id_checklist);

ALTER TABLE mobretail.mp_checklist_cible
    ADD CONSTRAINT ck01_mp_checklist_cible FOREIGN KEY (id_checklist)
            REFERENCES mobretail.mp_checklist (id_checklist)
            ENABLE VALIDATE;

ALTER TABLE mobretail.mp_checklist_affectation
    ADD CONSTRAINT ck01_mp_checklist_affectation FOREIGN KEY (id_checklist)
            REFERENCES mobretail.mp_checklist (id_checklist)
            ENABLE VALIDATE;

ALTER TABLE mobretail.mp_checklist_tree
    ADD CONSTRAINT ck01_mp_checklist_tree FOREIGN KEY (id_checklist)
            REFERENCES mobretail.mp_checklist (id_checklist)
            ENABLE VALIDATE;


ALTER TABLE mobretail.mp_visite_checklist
    ADD CONSTRAINT ck01_mp_visite_checklist FOREIGN KEY (id_checklist_node)
            REFERENCES mobretail.mp_checklist_tree (id_checklist_node)
            ENABLE VALIDATE;

Event ID: 3742 Date: 2019-08-04T08:07:26Z Person: Frederik Benoist Description: Modifié par Frederik Benoist <p>CREATE INDEX mobretail.idx01_mp_checklist_cible<br /> &nbsp; &nbsp; ON mobretail.mp_checklist_cible (id_checklist);</p> <p>ALTER TABLE mobretail.mp_checklist_cible<br /> &nbsp; &nbsp; ADD CONSTRAINT ck01_mp_checklist_cible FOREIGN KEY (id_checklist)<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; REFERENCES mobretail.mp_checklist (id_checklist)<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENABLE VALIDATE;</p> <p>ALTER TABLE mobretail.mp_checklist_affectation<br /> &nbsp; &nbsp; ADD CONSTRAINT ck01_mp_checklist_affectation FOREIGN KEY (id_checklist)<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; REFERENCES mobretail.mp_checklist (id_checklist)<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENABLE VALIDATE;</p> <p>ALTER TABLE mobretail.mp_checklist_tree<br /> &nbsp; &nbsp; ADD CONSTRAINT ck01_mp_checklist_tree FOREIGN KEY (id_checklist)<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; REFERENCES mobretail.mp_checklist (id_checklist)<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENABLE VALIDATE;</p> <p><br /> ALTER TABLE mobretail.mp_visite_checklist<br /> &nbsp; &nbsp; ADD CONSTRAINT ck01_mp_visite_checklist FOREIGN KEY (id_checklist_node)<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; REFERENCES mobretail.mp_checklist_tree (id_checklist_node)<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENABLE VALIDATE;</p>
Poster
Owner

Event ID: 3741
Date: 2019-08-04T05:13:02Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3741 Date: 2019-08-04T05:13:02Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3740
Date: 2019-08-04T05:12:07Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

/***********************************************************************
Note: This rebuild script is not meant to be used when a possibility
      exists that someone might try to access the table while it is
      being rebuilt!  If you need online table rebuilding and you
      are on Oracle 10g or newer, use the dbms_redfinition wizard
      under database -> optimize. (Requires DB Admin module)

      Locks are released when the first DDL, COMMIT or ROLLBACK is
      performed, so adding a "Lock table" command at the top of this
      script will not prevent others from accessing the table for
     the duration of the script.

 One more important note:
     This script will cause the catalog in replicated environments
     to become out of sync.
************************************************************************/

--  Table Rebuild script generated by Toad  
--  
--  Original table: MP_CHECKLIST_CIBLE 
--  Backup of table: MP_CHECKLIST_CIBLE_X 
--  Date: 04/08/2019 07:10:04 
--  
SET LINESIZE 200
--  
--  Make backup copy of original table 
ALTER TABLE MOBRETAIL.MP_CHECKLIST_CIBLE RENAME TO MP_CHECKLIST_CIBLE_X;


--  There are no foreign key constraints that reference the new table.

-- Drop all user named constraints
ALTER TABLE MOBRETAIL.MP_CHECKLIST_CIBLE_X DROP CONSTRAINT PK_MP_CHECKLIST_CIBLE DROP INDEX;

--  Recreate original table 
CREATE TABLE MOBRETAIL.MP_CHECKLIST_CIBLE
(
  ID_CHECKLIST_CIBLE  NUMBER,
  ID_CHECKLIST        NUMBER                    NOT NULL,
  ID_DISTRIB          NUMBER,
  ID_ENSEIGNE         NUMBER,
  ID_PAYS             NUMBER,
  ID_STATUT           NUMBER,
  ABANDON             NUMBER,
  USR_CRELOG          VARCHAR2(20 BYTE)         NOT NULL,
  USR_CREDAT          DATE                      NOT NULL,
  USR_MODLOG          VARCHAR2(20 BYTE),
  USR_MODDAT          DATE
)
TABLESPACE USERS
PCTUSED    0
PCTFREE    10
INITRANS   1
MAXTRANS   255
STORAGE    (
            INITIAL          64K
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            BUFFER_POOL      DEFAULT
           )
LOGGING 
NOCOMPRESS 
NOCACHE
NOPARALLEL
MONITORING;

COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ID_CHECKLIST_CIBLE IS 'PK';

COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ID_CHECKLIST IS 'ID Checklist';

COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ID_DISTRIB IS 'ID Distributeur';

COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ID_ENSEIGNE IS 'ID Enseigne';

COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ID_PAYS IS 'ID Pays';

COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ID_STATUT IS 'ID Statut (Suc, aff, part ...)';

COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ABANDON IS 'Ligne abandonnée ?';

COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.USR_CRELOG IS 'Audit';

COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.USR_CREDAT IS 'Audit';

COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.USR_MODLOG IS 'Audit';

COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.USR_MODDAT IS 'Audit';


--  Copy the data from the renamed table  
INSERT /*+ APPEND */
INTO MOBRETAIL.MP_CHECKLIST_CIBLE INS_TBL
 (ID_CHECKLIST_CIBLE, ID_CHECKLIST, ID_ENSEIGNE, ID_PAYS, 
  ID_STATUT, ABANDON, USR_CRELOG, USR_CREDAT, 
  USR_MODLOG, USR_MODDAT)
SELECT 
  ID_CHECKLIST_CIBLE, ID_CHECKLIST, ID_ENSEIGNE, ID_PAYS, 
  ID_STATUT, ABANDON, USR_CRELOG, USR_CREDAT, 
  USR_MODLOG, USR_MODDAT
FROM MOBRETAIL.MP_CHECKLIST_CIBLE_X SEL_TBL
ORDER BY ID_CHECKLIST_CIBLE;
COMMIT;

-- Drop all other user named indexes 
-- (none) 


--  Recreate Indexes, Constraints, Grants, and Policies 

CREATE UNIQUE INDEX MOBRETAIL.PK_MP_CHECKLIST_CIBLE ON MOBRETAIL.MP_CHECKLIST_CIBLE
(ID_CHECKLIST_CIBLE)
LOGGING
TABLESPACE USERS
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          64K
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;

ALTER TABLE MOBRETAIL.MP_CHECKLIST_CIBLE ADD (
  CONSTRAINT PK_MP_CHECKLIST_CIBLE
  PRIMARY KEY
  (ID_CHECKLIST_CIBLE)
  USING INDEX MOBRETAIL.PK_MP_CHECKLIST_CIBLE);


--  Gather statstics on new table 
BEGIN
  SYS.DBMS_STATS.GATHER_TABLE_STATS (
    OwnName        => 'MOBRETAIL',
    TabName        => 'MP_CHECKLIST_CIBLE');
END;
/

--  Recompile any dependent objects 

ALTER PACKAGE  "MOBRETAIL"."P_MP4_CHECKLIST" COMPILE BODY;
ALTER PACKAGE  "MOBRETAIL"."P_MP4_CHECKLIST_AFFECTATION" COMPILE BODY;
ALTER PACKAGE  "MOBRETAIL"."P_MP4_VISITE_MODIFICATION" COMPILE BODY;

--  Rebuild triggers for the new table.
DROP TRIGGER MOBRETAIL.TR_MP_CHECKLIST_CIBLE;


CREATE OR REPLACE TRIGGER mobretail.tr_mp_checklist_cible
    BEFORE INSERT
    ON mobretail.mp_checklist_cible
    REFERENCING NEW AS new OLD AS old
    FOR EACH ROW
BEGIN
    SELECT seq_id_checklist_cible.NEXTVAL
      INTO :new.id_checklist_cible
      FROM DUAL;
END;
/
SHOW ERRORS;
 

Event ID: 3740 Date: 2019-08-04T05:12:07Z Person: Frederik Benoist Description: Modifié par Frederik Benoist <p>/***********************************************************************<br /> Note: This rebuild script is not meant to be used when a possibility<br /> &nbsp; &nbsp; &nbsp; exists that someone might try to access the table while it is<br /> &nbsp; &nbsp; &nbsp; being rebuilt! &nbsp;If you need online table rebuilding and you<br /> &nbsp; &nbsp; &nbsp; are on Oracle 10g or newer, use the dbms_redfinition wizard<br /> &nbsp; &nbsp; &nbsp; under database -&gt; optimize. (Requires DB Admin module)</p> <p>&nbsp; &nbsp; &nbsp; Locks are released when the first DDL, COMMIT or ROLLBACK is<br /> &nbsp; &nbsp; &nbsp; performed, so adding a &quot;Lock table&quot; command at the top of this<br /> &nbsp; &nbsp; &nbsp; script will not prevent others from accessing the table for<br /> &nbsp; &nbsp; &nbsp;the duration of the script.</p> <p>&nbsp;One more important note:<br /> &nbsp; &nbsp; &nbsp;This script will cause the catalog in replicated environments<br /> &nbsp; &nbsp; &nbsp;to become out of sync.<br /> ************************************************************************/</p> <p>-- &nbsp;Table Rebuild script generated by Toad &nbsp;<br /> -- &nbsp;<br /> -- &nbsp;Original table: MP_CHECKLIST_CIBLE&nbsp;<br /> -- &nbsp;Backup of table: MP_CHECKLIST_CIBLE_X&nbsp;<br /> -- &nbsp;Date: 04/08/2019 07:10:04&nbsp;<br /> -- &nbsp;<br /> SET LINESIZE 200<br /> -- &nbsp;<br /> -- &nbsp;Make backup copy of original table&nbsp;<br /> ALTER TABLE MOBRETAIL.MP_CHECKLIST_CIBLE RENAME TO MP_CHECKLIST_CIBLE_X;</p> <p><br /> -- &nbsp;There are no foreign key constraints that reference the new table.</p> <p>-- Drop all user named constraints<br /> ALTER TABLE MOBRETAIL.MP_CHECKLIST_CIBLE_X DROP CONSTRAINT PK_MP_CHECKLIST_CIBLE DROP INDEX;</p> <p>-- &nbsp;Recreate original table&nbsp;<br /> CREATE TABLE MOBRETAIL.MP_CHECKLIST_CIBLE<br /> (<br /> &nbsp; ID_CHECKLIST_CIBLE &nbsp;NUMBER,<br /> &nbsp; ID_CHECKLIST &nbsp; &nbsp; &nbsp; &nbsp;NUMBER &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NOT NULL,<br /> &nbsp; ID_DISTRIB &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NUMBER,<br /> &nbsp; ID_ENSEIGNE &nbsp; &nbsp; &nbsp; &nbsp; NUMBER,<br /> &nbsp; ID_PAYS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NUMBER,<br /> &nbsp; ID_STATUT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NUMBER,<br /> &nbsp; ABANDON &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NUMBER,<br /> &nbsp; USR_CRELOG &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;VARCHAR2(20 BYTE) &nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br /> &nbsp; USR_CREDAT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DATE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NOT NULL,<br /> &nbsp; USR_MODLOG &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;VARCHAR2(20 BYTE),<br /> &nbsp; USR_MODDAT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DATE<br /> )<br /> TABLESPACE USERS<br /> PCTUSED &nbsp; &nbsp;0<br /> PCTFREE &nbsp; &nbsp;10<br /> INITRANS &nbsp; 1<br /> MAXTRANS &nbsp; 255<br /> STORAGE &nbsp; &nbsp;(<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INITIAL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;64K<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MINEXTENTS &nbsp; &nbsp; &nbsp; 1<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MAXEXTENTS &nbsp; &nbsp; &nbsp; UNLIMITED<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PCTINCREASE &nbsp; &nbsp; &nbsp;0<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BUFFER_POOL &nbsp; &nbsp; &nbsp;DEFAULT<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;)<br /> LOGGING&nbsp;<br /> NOCOMPRESS&nbsp;<br /> NOCACHE<br /> NOPARALLEL<br /> MONITORING;</p> <p>COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ID_CHECKLIST_CIBLE IS &#39;PK&#39;;</p> <p>COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ID_CHECKLIST IS &#39;ID Checklist&#39;;</p> <p>COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ID_DISTRIB IS &#39;ID Distributeur&#39;;</p> <p>COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ID_ENSEIGNE IS &#39;ID Enseigne&#39;;</p> <p>COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ID_PAYS IS &#39;ID Pays&#39;;</p> <p>COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ID_STATUT IS &#39;ID Statut (Suc, aff, part ...)&#39;;</p> <p>COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ABANDON IS &#39;Ligne abandonn&eacute;e ?&#39;;</p> <p>COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.USR_CRELOG IS &#39;Audit&#39;;</p> <p>COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.USR_CREDAT IS &#39;Audit&#39;;</p> <p>COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.USR_MODLOG IS &#39;Audit&#39;;</p> <p>COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.USR_MODDAT IS &#39;Audit&#39;;</p> <p><br /> -- &nbsp;Copy the data from the renamed table &nbsp;<br /> INSERT /*+ APPEND */<br /> INTO MOBRETAIL.MP_CHECKLIST_CIBLE INS_TBL<br /> &nbsp;(ID_CHECKLIST_CIBLE, ID_CHECKLIST, ID_ENSEIGNE, ID_PAYS,&nbsp;<br /> &nbsp; ID_STATUT, ABANDON, USR_CRELOG, USR_CREDAT,&nbsp;<br /> &nbsp; USR_MODLOG, USR_MODDAT)<br /> SELECT&nbsp;<br /> &nbsp; ID_CHECKLIST_CIBLE, ID_CHECKLIST, ID_ENSEIGNE, ID_PAYS,&nbsp;<br /> &nbsp; ID_STATUT, ABANDON, USR_CRELOG, USR_CREDAT,&nbsp;<br /> &nbsp; USR_MODLOG, USR_MODDAT<br /> FROM MOBRETAIL.MP_CHECKLIST_CIBLE_X SEL_TBL<br /> ORDER BY ID_CHECKLIST_CIBLE;<br /> COMMIT;</p> <p>-- Drop all other user named indexes&nbsp;<br /> -- (none)&nbsp;</p> <p><br /> -- &nbsp;Recreate Indexes, Constraints, Grants, and Policies&nbsp;</p> <p>CREATE UNIQUE INDEX MOBRETAIL.PK_MP_CHECKLIST_CIBLE ON MOBRETAIL.MP_CHECKLIST_CIBLE<br /> (ID_CHECKLIST_CIBLE)<br /> LOGGING<br /> TABLESPACE USERS<br /> PCTFREE &nbsp; &nbsp;10<br /> INITRANS &nbsp; 2<br /> MAXTRANS &nbsp; 255<br /> STORAGE &nbsp; &nbsp;(<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INITIAL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;64K<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MINEXTENTS &nbsp; &nbsp; &nbsp; 1<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MAXEXTENTS &nbsp; &nbsp; &nbsp; UNLIMITED<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PCTINCREASE &nbsp; &nbsp; &nbsp;0<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BUFFER_POOL &nbsp; &nbsp; &nbsp;DEFAULT<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;)<br /> NOPARALLEL;</p> <p>ALTER TABLE MOBRETAIL.MP_CHECKLIST_CIBLE ADD (<br /> &nbsp; CONSTRAINT PK_MP_CHECKLIST_CIBLE<br /> &nbsp; PRIMARY KEY<br /> &nbsp; (ID_CHECKLIST_CIBLE)<br /> &nbsp; USING INDEX MOBRETAIL.PK_MP_CHECKLIST_CIBLE);</p> <p><br /> -- &nbsp;Gather statstics on new table&nbsp;<br /> BEGIN<br /> &nbsp; SYS.DBMS_STATS.GATHER_TABLE_STATS (<br /> &nbsp; &nbsp; OwnName &nbsp; &nbsp; &nbsp; &nbsp;=&gt; &#39;MOBRETAIL&#39;,<br /> &nbsp; &nbsp; TabName &nbsp; &nbsp; &nbsp; &nbsp;=&gt; &#39;MP_CHECKLIST_CIBLE&#39;);<br /> END;<br /> /</p> <p>-- &nbsp;Recompile any dependent objects&nbsp;</p> <p>ALTER PACKAGE &nbsp;&quot;MOBRETAIL&quot;.&quot;P_MP4_CHECKLIST&quot; COMPILE BODY;<br /> ALTER PACKAGE &nbsp;&quot;MOBRETAIL&quot;.&quot;P_MP4_CHECKLIST_AFFECTATION&quot; COMPILE BODY;<br /> ALTER PACKAGE &nbsp;&quot;MOBRETAIL&quot;.&quot;P_MP4_VISITE_MODIFICATION&quot; COMPILE BODY;</p> <p>-- &nbsp;Rebuild triggers for the new table.<br /> DROP TRIGGER MOBRETAIL.TR_MP_CHECKLIST_CIBLE;</p> <p><br /> CREATE OR REPLACE TRIGGER mobretail.tr_mp_checklist_cible<br /> &nbsp; &nbsp; BEFORE INSERT<br /> &nbsp; &nbsp; ON mobretail.mp_checklist_cible<br /> &nbsp; &nbsp; REFERENCING NEW AS new OLD AS old<br /> &nbsp; &nbsp; FOR EACH ROW<br /> BEGIN<br /> &nbsp; &nbsp; SELECT seq_id_checklist_cible.NEXTVAL<br /> &nbsp; &nbsp; &nbsp; INTO :new.id_checklist_cible<br /> &nbsp; &nbsp; &nbsp; FROM DUAL;<br /> END;<br /> /<br /> SHOW ERRORS;<br /> &nbsp;</p>
Poster
Owner

Event ID: 3737
Date: 2019-07-29T05:34:38Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3737 Date: 2019-07-29T05:34:38Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3736
Date: 2019-07-28T06:37:03Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3736 Date: 2019-07-28T06:37:03Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3735
Date: 2019-07-28T06:36:06Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3735 Date: 2019-07-28T06:36:06Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3734
Date: 2019-07-27T03:31:18Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3734 Date: 2019-07-27T03:31:18Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3733
Date: 2019-07-27T03:30:21Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3733 Date: 2019-07-27T03:30:21Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3732
Date: 2019-07-27T03:26:06Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3732 Date: 2019-07-27T03:26:06Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3731
Date: 2019-07-27T03:25:51Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3731 Date: 2019-07-27T03:25:51Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3730
Date: 2019-07-27T03:23:35Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3730 Date: 2019-07-27T03:23:35Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3729
Date: 2019-07-26T06:35:55Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3729 Date: 2019-07-26T06:35:55Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3728
Date: 2019-07-26T06:35:37Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3728 Date: 2019-07-26T06:35:37Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3727
Date: 2019-07-26T06:33:36Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3727 Date: 2019-07-26T06:33:36Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3726
Date: 2019-07-26T06:30:17Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Attention gestion id_distrib_visite

=> Suppression de cette fonction 

 

 

Event ID: 3726 Date: 2019-07-26T06:30:17Z Person: Frederik Benoist Description: Modifié par Frederik Benoist <p>Attention gestion id_distrib_visite</p> <p>=&gt; Suppression de cette fonction&nbsp;</p> <p><img src="https://gitea.q2ii.fr/attachments/c3a876a7-5e2d-473d-8544-cabdc960de80"/></p> <p><img src="https://gitea.q2ii.fr/attachments/245bc22f-0293-466e-8d1d-2faabb448eab"/></p> <p>&nbsp;</p> <p>&nbsp;</p>
Poster
Owner

Event ID: 3725
Date: 2019-07-26T06:08:42Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Avoir une liste de contrôle par type de visite ?
Pas facile ...

En effet si pour une visite flash il y a le point "vitrine" et que pour la visite mensuelle aussi, il faut pouvoir retrouver cet élément inter-visites...

 

Event ID: 3725 Date: 2019-07-26T06:08:42Z Person: Frederik Benoist Description: Modifié par Frederik Benoist <p>Avoir une liste de contr&ocirc;le par type de visite ?<br /> Pas facile ...</p> <p>En effet si pour une visite flash il y a le point &quot;vitrine&quot; et que pour la visite mensuelle aussi, il faut pouvoir retrouver cet &eacute;l&eacute;ment inter-visites...</p> <p>&nbsp;</p>
Poster
Owner

Event ID: 3724
Date: 2019-07-26T05:53:42Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Vérifier fonctionnement (id_controle) de l'importation de visite



Fonctionnement validé le 28/07

Event ID: 3724 Date: 2019-07-26T05:53:42Z Person: Frederik Benoist Description: Modifié par Frederik Benoist V&#233;rifier fonctionnement (id_controle) de l&#39;importation de visite<br /> <br /> Fonctionnement valid&#233; le 28/07
Poster
Owner

Event ID: 3721
Date: 2019-07-20T05:17:59Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

TODO: Refaire l'attribution checklist au distributeur



=> OK

Event ID: 3721 Date: 2019-07-20T05:17:59Z Person: Frederik Benoist Description: Modifié par Frederik Benoist TODO: Refaire l&#39;attribution checklist au distributeur<br /> <br /> =&gt; OK
Poster
Owner

Event ID: 3720
Date: 2019-07-20T05:12:08Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3720 Date: 2019-07-20T05:12:08Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3719
Date: 2019-07-20T05:10:50Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3719 Date: 2019-07-20T05:10:50Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3718
Date: 2019-07-19T04:00:25Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3718 Date: 2019-07-19T04:00:25Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3717
Date: 2019-07-19T04:00:04Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3717 Date: 2019-07-19T04:00:04Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3652
Date: 2019-03-02T09:31:05Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

TODO: utilisation table MR_SQL_CACHE

Event ID: 3652 Date: 2019-03-02T09:31:05Z Person: Frederik Benoist Description: Modifié par Frederik Benoist TODO: utilisation table MR_SQL_CACHE
Poster
Owner

Event ID: 3651
Date: 2019-03-02T06:41:16Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3651 Date: 2019-03-02T06:41:16Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3650
Date: 2019-02-28T07:16:36Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

TODO : bien vérifier les abilitations !



Semble OK 29/07/2018

Event ID: 3650 Date: 2019-02-28T07:16:36Z Person: Frederik Benoist Description: Modifié par Frederik Benoist TODO : bien v&#233;rifier les abilitations !<br /> <br /> Semble OK 29/07/2018
Poster
Owner

Event ID: 3649
Date: 2019-02-25T07:23:17Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3649 Date: 2019-02-25T07:23:17Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3645
Date: 2019-02-25T07:12:35Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Les contrôles ne seront plus traduits car dépendant cible pays (voire langue parlée !)

Event ID: 3645 Date: 2019-02-25T07:12:35Z Person: Frederik Benoist Description: Modifié par Frederik Benoist Les contr&#244;les ne seront plus traduits car d&#233;pendant cible pays (voire langue parl&#233;e !)
Poster
Owner

Event ID: 3644
Date: 2019-02-25T06:28:50Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3644 Date: 2019-02-25T06:28:50Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3643
Date: 2019-02-25T06:26:27Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3643 Date: 2019-02-25T06:26:27Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3642
Date: 2019-02-24T18:50:30Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

TODO: Import contrôles : Il faut vérifier que les contrôles sont du bon type !!!



Fonctionnement validé le 28/07

Event ID: 3642 Date: 2019-02-24T18:50:30Z Person: Frederik Benoist Description: Modifié par Frederik Benoist TODO: Import contr&#244;les : Il faut v&#233;rifier que les contr&#244;les sont du bon type !!!<br /> <br /> Fonctionnement valid&#233; le 28/07
Poster
Owner

Event ID: 3641
Date: 2019-02-24T18:42:42Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3641 Date: 2019-02-24T18:42:42Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3640
Date: 2019-02-24T18:30:13Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3640 Date: 2019-02-24T18:30:13Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3639
Date: 2019-02-24T18:23:33Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3639 Date: 2019-02-24T18:23:33Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3638
Date: 2019-02-24T18:16:57Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

TODO : Vérifier utilisation de ID_DISTRIB_VISITE

-- recupération du distributeur de la visite
p_mp4_securite.visite_distrib (pid_visite,
v_id_distrib,
v_lib_distrib);

=> en fait il faut laisser ID_DISTRIB_VISITE car certaines tables sont vraiment au distributeur (comme mr_visite_tag ...)

 

Event ID: 3638 Date: 2019-02-24T18:16:57Z Person: Frederik Benoist Description: Modifié par Frederik Benoist <p>TODO : V&eacute;rifier utilisation de ID_DISTRIB_VISITE</p> <p>-- recup&eacute;ration du distributeur de la visite<br /> p_mp4_securite.visite_distrib (pid_visite,<br /> v_id_distrib,<br /> v_lib_distrib);</p> <p>=&gt; en fait il faut laisser ID_DISTRIB_VISITE car certaines tables sont vraiment au distributeur (comme mr_visite_tag ...)</p> <p><img src="https://gitea.q2ii.fr/attachments/bad8a4aa-73b7-48eb-8717-8f6d1c8dbc7c"/></p> <p><img src="https://gitea.q2ii.fr/attachments/e70f9ee7-e379-48d0-984b-14715ce69ac5"/></p> <p>&nbsp;</p>
Poster
Owner

Event ID: 3637
Date: 2019-02-24T17:56:39Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3637 Date: 2019-02-24T17:56:39Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3636
Date: 2019-02-24T17:51:40Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Il vaut mieux supprimer la ligne que mettre abandon à 1 sinon index unique invalide

Event ID: 3636 Date: 2019-02-24T17:51:40Z Person: Frederik Benoist Description: Modifié par Frederik Benoist Il vaut mieux supprimer la ligne que mettre abandon &#224; 1 sinon index unique invalide
Poster
Owner

Event ID: 3635
Date: 2019-02-24T17:24:59Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3635 Date: 2019-02-24T17:24:59Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3634
Date: 2019-02-24T17:23:28Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3634 Date: 2019-02-24T17:23:28Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3633
Date: 2019-02-24T17:19:15Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3633 Date: 2019-02-24T17:19:15Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3632
Date: 2019-02-24T17:18:12Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 3632 Date: 2019-02-24T17:18:12Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 3631
Date: 2019-02-24T17:16:42Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

/***********************************************************************

Note: This rebuild script is not meant to be used when a possibility

      exists that someone might try to access the table while it is

      being rebuilt!  If you need online table rebuilding and you

      are on Oracle 10g or newer, use the dbms_redfinition wizard

      under database -> optimize. (Requires DB Admin module)



      Locks are released when the first DDL, COMMIT or ROLLBACK is

      performed, so adding a "Lock table" command at the top of this

      script will not prevent others from accessing the table for

    the duration of the script.



 One more important note:

    This script will cause the catalog in replicated environments

    to become out of sync.

***********************************************************************/



--  Table Rebuild script generated by Toad 

-- 

--  Original table: MP_CHECKLIST_CIBLE

--  Backup of table: MP_CHECKLIST_CIBLE_X

--  Date: 04/08/2019 07:10:04

-- 

SET LINESIZE 200

-- 

--  Make backup copy of original table

ALTER TABLE MOBRETAIL.MP_CHECKLIST_CIBLE RENAME TO MP_CHECKLIST_CIBLE_X;





--  There are no foreign key constraints that reference the new table.



-- Drop all user named constraints

ALTER TABLE MOBRETAIL.MP_CHECKLIST_CIBLE_X DROP CONSTRAINT PK_MP_CHECKLIST_CIBLE DROP INDEX;



--  Recreate original table

CREATE TABLE MOBRETAIL.MP_CHECKLIST_CIBLE

(

  ID_CHECKLIST_CIBLE  NUMBER,

  ID_CHECKLIST        NUMBER                    NOT NULL,

  ID_DISTRIB          NUMBER,

  ID_ENSEIGNE        NUMBER,

  ID_PAYS            NUMBER,

  ID_STATUT          NUMBER,

  ABANDON            NUMBER,

  USR_CRELOG          VARCHAR2(20 BYTE)        NOT NULL,

  USR_CREDAT          DATE                      NOT NULL,

  USR_MODLOG          VARCHAR2(20 BYTE),

  USR_MODDAT          DATE

)

TABLESPACE USERS

PCTUSED    0

PCTFREE    10

INITRANS  1

MAXTRANS  255

STORAGE    (

            INITIAL          64K

            MINEXTENTS      1

            MAXEXTENTS      UNLIMITED

            PCTINCREASE      0

            BUFFER_POOL      DEFAULT

          )

LOGGING

NOCOMPRESS

NOCACHE

NOPARALLEL

MONITORING;



COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ID_CHECKLIST_CIBLE IS 'PK';



COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ID_CHECKLIST IS 'ID Checklist';



COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ID_DISTRIB IS 'ID Distributeur';



COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ID_ENSEIGNE IS 'ID Enseigne';



COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ID_PAYS IS 'ID Pays';



COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ID_STATUT IS 'ID Statut (Suc, aff, part ...)';



COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ABANDON IS 'Ligne abandonnée ?';



COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.USR_CRELOG IS 'Audit';



COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.USR_CREDAT IS 'Audit';



COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.USR_MODLOG IS 'Audit';



COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.USR_MODDAT IS 'Audit';





--  Copy the data from the renamed table 

INSERT /
+ APPEND */

INTO MOBRETAIL.MP_CHECKLIST_CIBLE INS_TBL

 (ID_CHECKLIST_CIBLE, ID_CHECKLIST, ID_ENSEIGNE, ID_PAYS,

  ID_STATUT, ABANDON, USR_CRELOG, USR_CREDAT,

  USR_MODLOG, USR_MODDAT)

SELECT

  ID_CHECKLIST_CIBLE, ID_CHECKLIST, ID_ENSEIGNE, ID_PAYS,

  ID_STATUT, ABANDON, USR_CRELOG, USR_CREDAT,

  USR_MODLOG, USR_MODDAT

FROM MOBRETAIL.MP_CHECKLIST_CIBLE_X SEL_TBL

ORDER BY ID_CHECKLIST_CIBLE;

COMMIT;



-- Drop all other user named indexes

-- (none)









--  Recreate Indexes, Constraints, Grants, and Policies



CREATE UNIQUE INDEX MOBRETAIL.PK_MP_CHECKLIST_CIBLE ON MOBRETAIL.MP_CHECKLIST_CIBLE

(ID_CHECKLIST_CIBLE)

LOGGING

TABLESPACE USERS

PCTFREE    10

INITRANS  2

MAXTRANS  255

STORAGE    (

            INITIAL          64K

            MINEXTENTS      1

            MAXEXTENTS      UNLIMITED

            PCTINCREASE      0

            BUFFER_POOL      DEFAULT

          )

NOPARALLEL;



ALTER TABLE MOBRETAIL.MP_CHECKLIST_CIBLE ADD (

  CONSTRAINT PK_MP_CHECKLIST_CIBLE

  PRIMARY KEY

  (ID_CHECKLIST_CIBLE)

  USING INDEX MOBRETAIL.PK_MP_CHECKLIST_CIBLE);





--  Gather statstics on new table

BEGIN

  SYS.DBMS_STATS.GATHER_TABLE_STATS (

    OwnName        => 'MOBRETAIL',

    TabName        => 'MP_CHECKLIST_CIBLE');

END;

/



--  Recompile any dependent objects



ALTER PACKAGE  "MOBRETAIL"."P_MP4_CHECKLIST" COMPILE BODY;

ALTER PACKAGE  "MOBRETAIL"."P_MP4_CHECKLIST_AFFECTATION" COMPILE BODY;

ALTER PACKAGE  "MOBRETAIL"."P_MP4_VISITE_MODIFICATION" COMPILE BODY;



--  Rebuild triggers for the new table.

DROP TRIGGER MOBRETAIL.TR_MP_CHECKLIST_CIBLE;





CREATE OR REPLACE TRIGGER mobretail.tr_mp_checklist_cible

    BEFORE INSERT

    ON mobretail.mp_checklist_cible

    REFERENCING NEW AS new OLD AS old

    FOR EACH ROW

BEGIN

    SELECT seq_id_checklist_cible.NEXTVAL

      INTO :new.id_checklist_cible

      FROM DUAL;

END;

/

SHOW ERRORS;

Event ID: 3631 Date: 2019-02-24T17:16:42Z Person: Frederik Benoist Description: Modifié par Frederik Benoist /***********************************************************************<br /> Note: This rebuild script is not meant to be used when a possibility<br /> &nbsp; &nbsp; &nbsp; exists that someone might try to access the table while it is<br /> &nbsp; &nbsp; &nbsp; being rebuilt!&nbsp; If you need online table rebuilding and you<br /> &nbsp; &nbsp; &nbsp; are on Oracle 10g or newer, use the dbms_redfinition wizard<br /> &nbsp; &nbsp; &nbsp; under database -&gt; optimize. (Requires DB Admin module)<br /> <br /> &nbsp; &nbsp; &nbsp; Locks are released when the first DDL, COMMIT or ROLLBACK is<br /> &nbsp; &nbsp; &nbsp; performed, so adding a &quot;Lock table&quot; command at the top of this<br /> &nbsp; &nbsp; &nbsp; script will not prevent others from accessing the table for<br /> &nbsp; &nbsp; the duration of the script.<br /> <br /> &nbsp;One more important note:<br /> &nbsp; &nbsp; This script will cause the catalog in replicated environments<br /> &nbsp; &nbsp; to become out of sync.<br /> ************************************************************************/<br /> <br /> --&nbsp; Table Rebuild script generated by Toad&nbsp; <br /> --&nbsp; <br /> --&nbsp; Original table: MP_CHECKLIST_CIBLE <br /> --&nbsp; Backup of table: MP_CHECKLIST_CIBLE_X <br /> --&nbsp; Date: 04/08/2019 07:10:04 <br /> --&nbsp; <br /> SET LINESIZE 200<br /> --&nbsp; <br /> --&nbsp; Make backup copy of original table <br /> ALTER TABLE MOBRETAIL.MP_CHECKLIST_CIBLE RENAME TO MP_CHECKLIST_CIBLE_X;<br /> <br /> <br /> --&nbsp; There are no foreign key constraints that reference the new table.<br /> <br /> -- Drop all user named constraints<br /> ALTER TABLE MOBRETAIL.MP_CHECKLIST_CIBLE_X DROP CONSTRAINT PK_MP_CHECKLIST_CIBLE DROP INDEX;<br /> <br /> --&nbsp; Recreate original table <br /> CREATE TABLE MOBRETAIL.MP_CHECKLIST_CIBLE<br /> (<br /> &nbsp; ID_CHECKLIST_CIBLE&nbsp; NUMBER,<br /> &nbsp; ID_CHECKLIST&nbsp; &nbsp; &nbsp; &nbsp; NUMBER&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br /> &nbsp; ID_DISTRIB&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NUMBER,<br /> &nbsp; ID_ENSEIGNE&nbsp; &nbsp; &nbsp; &nbsp; NUMBER,<br /> &nbsp; ID_PAYS&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NUMBER,<br /> &nbsp; ID_STATUT&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NUMBER,<br /> &nbsp; ABANDON&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NUMBER,<br /> &nbsp; USR_CRELOG&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VARCHAR2(20 BYTE)&nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br /> &nbsp; USR_CREDAT&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DATE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br /> &nbsp; USR_MODLOG&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VARCHAR2(20 BYTE),<br /> &nbsp; USR_MODDAT&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DATE<br /> )<br /> TABLESPACE USERS<br /> PCTUSED&nbsp; &nbsp; 0<br /> PCTFREE&nbsp; &nbsp; 10<br /> INITRANS&nbsp; 1<br /> MAXTRANS&nbsp; 255<br /> STORAGE&nbsp; &nbsp; (<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INITIAL&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 64K<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MINEXTENTS&nbsp; &nbsp; &nbsp; 1<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MAXEXTENTS&nbsp; &nbsp; &nbsp; UNLIMITED<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PCTINCREASE&nbsp; &nbsp; &nbsp; 0<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BUFFER_POOL&nbsp; &nbsp; &nbsp; DEFAULT<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<br /> LOGGING <br /> NOCOMPRESS <br /> NOCACHE<br /> NOPARALLEL<br /> MONITORING;<br /> <br /> COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ID_CHECKLIST_CIBLE IS &#39;PK&#39;;<br /> <br /> COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ID_CHECKLIST IS &#39;ID Checklist&#39;;<br /> <br /> COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ID_DISTRIB IS &#39;ID Distributeur&#39;;<br /> <br /> COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ID_ENSEIGNE IS &#39;ID Enseigne&#39;;<br /> <br /> COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ID_PAYS IS &#39;ID Pays&#39;;<br /> <br /> COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ID_STATUT IS &#39;ID Statut (Suc, aff, part ...)&#39;;<br /> <br /> COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.ABANDON IS &#39;Ligne abandonn&#233;e ?&#39;;<br /> <br /> COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.USR_CRELOG IS &#39;Audit&#39;;<br /> <br /> COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.USR_CREDAT IS &#39;Audit&#39;;<br /> <br /> COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.USR_MODLOG IS &#39;Audit&#39;;<br /> <br /> COMMENT ON COLUMN MOBRETAIL.MP_CHECKLIST_CIBLE.USR_MODDAT IS &#39;Audit&#39;;<br /> <br /> <br /> --&nbsp; Copy the data from the renamed table&nbsp; <br /> INSERT /*+ APPEND */<br /> INTO MOBRETAIL.MP_CHECKLIST_CIBLE INS_TBL<br /> &nbsp;(ID_CHECKLIST_CIBLE, ID_CHECKLIST, ID_ENSEIGNE, ID_PAYS, <br /> &nbsp; ID_STATUT, ABANDON, USR_CRELOG, USR_CREDAT, <br /> &nbsp; USR_MODLOG, USR_MODDAT)<br /> SELECT <br /> &nbsp; ID_CHECKLIST_CIBLE, ID_CHECKLIST, ID_ENSEIGNE, ID_PAYS, <br /> &nbsp; ID_STATUT, ABANDON, USR_CRELOG, USR_CREDAT, <br /> &nbsp; USR_MODLOG, USR_MODDAT<br /> FROM MOBRETAIL.MP_CHECKLIST_CIBLE_X SEL_TBL<br /> ORDER BY ID_CHECKLIST_CIBLE;<br /> COMMIT;<br /> <br /> -- Drop all other user named indexes <br /> -- (none) <br /> <br /> <br /> <br /> <br /> --&nbsp; Recreate Indexes, Constraints, Grants, and Policies <br /> <br /> CREATE UNIQUE INDEX MOBRETAIL.PK_MP_CHECKLIST_CIBLE ON MOBRETAIL.MP_CHECKLIST_CIBLE<br /> (ID_CHECKLIST_CIBLE)<br /> LOGGING<br /> TABLESPACE USERS<br /> PCTFREE&nbsp; &nbsp; 10<br /> INITRANS&nbsp; 2<br /> MAXTRANS&nbsp; 255<br /> STORAGE&nbsp; &nbsp; (<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INITIAL&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 64K<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MINEXTENTS&nbsp; &nbsp; &nbsp; 1<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MAXEXTENTS&nbsp; &nbsp; &nbsp; UNLIMITED<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PCTINCREASE&nbsp; &nbsp; &nbsp; 0<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BUFFER_POOL&nbsp; &nbsp; &nbsp; DEFAULT<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<br /> NOPARALLEL;<br /> <br /> ALTER TABLE MOBRETAIL.MP_CHECKLIST_CIBLE ADD (<br /> &nbsp; CONSTRAINT PK_MP_CHECKLIST_CIBLE<br /> &nbsp; PRIMARY KEY<br /> &nbsp; (ID_CHECKLIST_CIBLE)<br /> &nbsp; USING INDEX MOBRETAIL.PK_MP_CHECKLIST_CIBLE);<br /> <br /> <br /> --&nbsp; Gather statstics on new table <br /> BEGIN<br /> &nbsp; SYS.DBMS_STATS.GATHER_TABLE_STATS (<br /> &nbsp; &nbsp; OwnName&nbsp; &nbsp; &nbsp; &nbsp; =&gt; &#39;MOBRETAIL&#39;,<br /> &nbsp; &nbsp; TabName&nbsp; &nbsp; &nbsp; &nbsp; =&gt; &#39;MP_CHECKLIST_CIBLE&#39;);<br /> END;<br /> /<br /> <br /> --&nbsp; Recompile any dependent objects <br /> <br /> ALTER PACKAGE&nbsp; &quot;MOBRETAIL&quot;.&quot;P_MP4_CHECKLIST&quot; COMPILE BODY;<br /> ALTER PACKAGE&nbsp; &quot;MOBRETAIL&quot;.&quot;P_MP4_CHECKLIST_AFFECTATION&quot; COMPILE BODY;<br /> ALTER PACKAGE&nbsp; &quot;MOBRETAIL&quot;.&quot;P_MP4_VISITE_MODIFICATION&quot; COMPILE BODY;<br /> <br /> --&nbsp; Rebuild triggers for the new table.<br /> DROP TRIGGER MOBRETAIL.TR_MP_CHECKLIST_CIBLE;<br /> <br /> <br /> CREATE OR REPLACE TRIGGER mobretail.tr_mp_checklist_cible<br /> &nbsp; &nbsp; BEFORE INSERT<br /> &nbsp; &nbsp; ON mobretail.mp_checklist_cible<br /> &nbsp; &nbsp; REFERENCING NEW AS new OLD AS old<br /> &nbsp; &nbsp; FOR EACH ROW<br /> BEGIN<br /> &nbsp; &nbsp; SELECT seq_id_checklist_cible.NEXTVAL<br /> &nbsp; &nbsp; &nbsp; INTO :new.id_checklist_cible<br /> &nbsp; &nbsp; &nbsp; FROM DUAL;<br /> END;<br /> /<br /> SHOW ERRORS;<br />
Poster
Owner

Event ID: 3628
Date: 2019-02-21T14:12:23Z
Person: Frederik Benoist
Description: Attribué à Frederik Benoist par Frederik Benoist

Event ID: 3628 Date: 2019-02-21T14:12:23Z Person: Frederik Benoist Description: Attribué à Frederik Benoist par Frederik Benoist
Poster
Owner

Event ID: 3627
Date: 2019-02-21T14:12:23Z
Person: Frederik Benoist
Description: Ouvert par Frederik Benoist

Event ID: 3627 Date: 2019-02-21T14:12:23Z Person: Frederik Benoist Description: Ouvert par Frederik Benoist
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: fbenoist68/mobileportal#772
There is no content yet.