OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 177 | Rev 182 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 177 Rev 180
Line 159... Line 159...
159
            } catch (SQLException ex) {
159
            } catch (SQLException ex) {
160
                throw new IllegalStateException("Erreur lors de la création de la table " + "MOTIF_ARRET_TRAVAIL", ex);
160
                throw new IllegalStateException("Erreur lors de la création de la table " + "MOTIF_ARRET_TRAVAIL", ex);
161
            }
161
            }
162
        }
162
        }
163
 
163
        
-
 
164
        if (!root.contains("DIPLOME_PREPARE")) {
-
 
165
            final SQLCreateTable createTableDiplome = new SQLCreateTable(root, "DIPLOME_PREPARE");
-
 
166
            createTableDiplome.addVarCharColumn("CODE", 25);
-
 
167
            createTableDiplome.addVarCharColumn("NOM", 512);
-
 
168
 
-
 
169
            try {
-
 
170
                root.getBase().getDataSource().execute(createTableDiplome.asString());
-
 
171
                insertUndef(createTableDiplome);
-
 
172
                root.refetchTable("DIPLOME_PREPARE");
-
 
173
                root.getSchema().updateVersion();
-
 
174
 
-
 
175
                final SQLTable table = root.getTable("DIPLOME_PREPARE");
-
 
176
                List<Tuple2<String, String>> v = new ArrayList<Tuple2<String, String>>();
-
 
177
                v.add(Tuple2.create("03", "Niveau de formation équivalent au CAP (certificat d'aptitude professionnelle) ou au BEP (brevet d'études professionnelles)"));
-
 
178
                v.add(Tuple2.create("04", "Formation de niveau du bac (général, technologique ou professionnel), du brevet de technicien (BT) ou du brevet professionnel"));
-
 
179
                v.add(Tuple2.create("05", "Formation de niveau bac+2 : licence 2, BTS (brevet de technicien supérieur), DUT (diplôme universitaire de technologie), etc."));
-
 
180
                v.add(Tuple2.create("06", "Formation de niveau bac+3 et bac+4 : licence 3, licence professionnelle, master 1, etc."));
-
 
181
                v.add(Tuple2.create("07", "Formation de niveau bac+5 : master 2, diplôme d'études approfondies, diplôme d'études supérieures spécialisées, diplôme d'ingénieur, etc."));
-
 
182
                v.add(Tuple2.create("08", "Formation de niveau bac+8 : doctorat, habilitation à diriger des recherches, etc. "));
-
 
183
 
-
 
184
                insertValues(v, table);
-
 
185
            } catch (SQLException ex) {
-
 
186
                throw new IllegalStateException("Erreur lors de la création de la table " + "DIPLOME_PREPARE", ex);
-
 
187
            }
-
 
188
        }
-
 
189
 
-
 
190
 
164
        if (!root.contains("TYPE_PREAVIS")) {
191
        if (!root.contains("TYPE_PREAVIS")) {
165
            final SQLCreateTable createTableMotif = new SQLCreateTable(root, "TYPE_PREAVIS");
192
            final SQLCreateTable createTableMotif = new SQLCreateTable(root, "TYPE_PREAVIS");
166
            createTableMotif.addVarCharColumn("CODE", 25);
193
            createTableMotif.addVarCharColumn("CODE", 25);
167
            createTableMotif.addVarCharColumn("NOM", 512);
194
            createTableMotif.addVarCharColumn("NOM", 512);
168
 
195
 
Line 1650... Line 1677...
1650
            alter.addForeignColumn("ID_CODE_SUSPENSION", root.findTable("CODE_SUSPENSION"));
1677
            alter.addForeignColumn("ID_CODE_SUSPENSION", root.findTable("CODE_SUSPENSION"));
1651
            root.getBase().getDataSource().execute(alter.asString());
1678
            root.getBase().getDataSource().execute(alter.asString());
1652
            root.getSchema().updateVersion();
1679
            root.getSchema().updateVersion();
1653
        }
1680
        }
1654
 
1681
        
-
 
1682
        if (!tableContrat.contains("ID_DIPLOME_PREPARE")) {
-
 
1683
            updateContrat = true;
-
 
1684
            AlterTable alter = new AlterTable(tableContrat);
-
 
1685
            alter.addForeignColumn("ID_DIPLOME_PREPARE", root.findTable("DIPLOME_PREPARE"));
-
 
1686
            root.getBase().getDataSource().execute(alter.asString());
-
 
1687
            root.getSchema().updateVersion();
-
 
1688
        }
-
 
1689
 
1655
        if (updateContrat) {
1690
        if (updateContrat) {
1656
            root.refetchTable("CONTRAT_SALARIE");
1691
            root.refetchTable("CONTRAT_SALARIE");
1657
            tableContrat = root.findTable("CONTRAT_SALARIE");
1692
            tableContrat = root.findTable("CONTRAT_SALARIE");
1658
            SQLSelect sel = new SQLSelect();
1693
            SQLSelect sel = new SQLSelect();
1659
            sel.addSelectStar(tableContrat);
1694
            sel.addSelectStar(tableContrat);