Skip to content

Commit

Permalink
Corretto script di inizializzazione e setup
Browse files Browse the repository at this point in the history
  • Loading branch information
nardil committed Jul 23, 2019
1 parent 0e4f700 commit 0835373
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/main/resources/db/sql/init.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-- Censimento dell'utenza amministratore

INSERT INTO utenze (principal,principal_originale,autorizzazione_domini_star,autorizzazione_tipi_vers_stari,ruoli) VALUES ('@PRINCIPAL@','@PRINCIPAL@',@BOOLEAN@, @BOOLEAN@, 'Amministratore');
INSERT INTO utenze (principal,principal_originale,autorizzazione_domini_star,autorizzazione_tipi_vers_stari,ruoli) VALUES ('@PRINCIPAL@','@PRINCIPAL@',@BOOLEAN-TRUE@, @BOOLEAN-TRUE@, 'Amministratore');
INSERT INTO operatori (nome, id_utenza) VALUES ('@RAGIONE_SOCIALE@', (select id from utenze where principal = '@PRINCIPAL@'));

-- Censimento del ruolo amministratore
Expand All @@ -27,10 +27,10 @@ INSERT INTO acl(ruolo,id_utenza,servizio,diritti) VALUES ('Operatore',null,'Gior
INSERT INTO tipi_tributo (cod_tributo, tipo_contabilita, cod_contabilita, descrizione) VALUES ('BOLLOT', '9', 'MBT', 'Marca da Bollo Telematica');

-- Censimento Tipo Pendenza Libera
INSERT INTO tipi_versamento (cod_tipo_versamento, descrizione, tipo, paga_terzi, abilitato) VALUES ('LIBERO', 'Pendenza libera', 'DOVUTO', false, true);
INSERT INTO tipi_versamento (cod_tipo_versamento, descrizione, tipo, paga_terzi, abilitato) VALUES ('LIBERO', 'Pendenza libera', 'DOVUTO', @BOOLEAN-FALSE@, @BOOLEAN-TRUE@);

-- Censimento Tipo Pendenza Bollo
INSERT INTO tipi_versamento (cod_tipo_versamento, descrizione, tipo, paga_terzi, abilitato) VALUES ('BOLLOT', 'Marca da Bollo Telematica', 'DOVUTO', false, true);
INSERT INTO tipi_versamento (cod_tipo_versamento, descrizione, tipo, paga_terzi, abilitato) VALUES ('BOLLOT', 'Marca da Bollo Telematica', 'DOVUTO', @BOOLEAN-FALSE@, @BOOLEAN-TRUE@);

-- Configurazione delle sonde

Expand Down
39 changes: 30 additions & 9 deletions src/main/resources/setup/core/installer/setup/ant/sql-build.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@

<project name="setup-sql" basedir=".">

<description>
SETUP SQL
</description>

<import file="utils.xml" />

<target name="sql_settings">

<antcall target="replace_token">
<param name="file" value="${file}"/>
<param name="token" value="@RAGIONE_SOCIALE@"/>
Expand All @@ -20,11 +16,36 @@
<param name="value" value="${antinstaller_cod_univoco}"/>
</antcall>
<antcall target="replace_token">
<param name="file" value="${file}"/>
<param name="token" value="@PRINCIPAL@"/>
<param name="value" value="${antinstaller_principal}"/>
</antcall>
<if>
<equals arg1="${antinstaller_tipo_database}" arg2="oracle"/>
<then>
<antcall target="replace_token">
<param name="file" value="${file}"/>
<param name="token" value="@BOOLEAN-TRUE@"/>
<param name="value" value="1"/>
</antcall>
<antcall target="replace_token">
<param name="file" value="${file}"/>
<param name="token" value="@BOOLEAN-FALSE@"/>
<param name="value" value="0"/>
</antcall>
</then>
<else>
<antcall target="replace_token">
<param name="file" value="${file}"/>
<param name="token" value="@BOOLEAN-TRUE@"/>
<param name="value" value="true"/>
</antcall>
<antcall target="replace_token">
<param name="file" value="${file}"/>
<param name="token" value="@PRINCIPAL@"/>
<param name="value" value="${antinstaller_principal}"/>
</antcall>

<param name="token" value="@BOOLEAN-FALSE@"/>
<param name="value" value="false"/>
</antcall>
</else>
</if>
</target>

</project>

0 comments on commit 0835373

Please sign in to comment.