Browse Source

Remove obsolete files #1

master
Daniel Quathamer 1 year ago
parent
commit
068144fe9c
  1. 10
      conf/excludes.txt
  2. 3
      conf/includes.txt
  3. 310
      conf/promstat.xml
  4. 22
      datentabellen/vacuum_pg.sql
  5. 120
      hilfstabellen/promstat_docprogram_aggr_fuellen.sql
  6. 15
      masken/46000_felderinfo.unl
  7. 1
      masken/46000_maske_system_bez.unl
  8. 14
      masken/46000_masken_felder_bez.unl
  9. 122
      masken/46000_maskeninfo.unl
  10. 1
      masken/46000_sachgeb_maske_bez.unl
  11. 2
      rohdaten/PROMSTAT_ENV.sam
  12. 1131
      rohdaten/promstat_unload.xml
  13. 102
      schluesseltabellen/captions_fuellen.sql
  14. 34
      schluesseltabellen/captions_fuellen.x
  15. 0
      schluesseltabellen/promstat_captions.unl
  16. 7
      schluesseltabellen/promstat_feste_konstanten_entfernen.sql
  17. 103
      schluesseltabellen/promstat_feste_konstanten_fuellen.sql
  18. 165
      schluesseltabellen/sx_stylesheets_einfuegen.sql
  19. 15
      upgrade/lm_upgrade_man.sql

10
conf/excludes.txt

@ -1,10 +0,0 @@
rohdaten/LM_ENV
rohdaten/*.properties
preparation.sql
finalize.sql
rohdaten/*.err
*.log
*.err
rohdaten/unl/*
conf/customize.sql
conf/*.log

3
conf/includes.txt

@ -1,3 +0,0 @@
doku/promstat_modul/promstat.html
WEB-INF/conf/edustore/db/bin/SQL_ENV_promstat.sam

310
conf/promstat.xml

@ -1,310 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--<!DOCTYPE module SYSTEM "../../../conf/superx-module.dtd"> -->
<module name="promstat" version="0.1b" sachgebiet_id="350"
sachgebiet="Promovierendenstatistik (Erw.)" systeminfo_id="350"
system="Promovierendenstatistik (Erw.)" thema="Promovierendenstatistik (Erw.)" thema_parent="Promovierende">
<database name="superx" version="3.0" system="superx">
<sachgebiete>
<sachgebiet id="350" name="Promovierendenstatistik (Erw.)" rightname="CS_BIA_STANDARDREPORTS_VIEW_REPORTS[PROMSTAT]"/>
</sachgebiete>
<table name="promstat_docprogram_aggr" version="1.0" thema="Promotionen"
typ="Hilfstabelle" releaseUnload="demo"
caption="Promotionsstatistik (erw.)">
<description>
Dies ist die Faktentabelle für Promotionsvorhaben aus dem Vorsystem (das wird zunächst nur HISinOne sein)
</description>
<columns>
<column name="person_id" type="INTEGER" size="4" default="" notnull="true" description="Person-ID" />
<column name="degree_program_id" type ="INTEGER" size ="4" default ="" notnull ="false" description="Studiengang" />
<column name="doctoral_program_id" type ="INTEGER" size ="4" default ="" notnull ="false" description="Promotionsvorhaben"/>
<column name="sem_rueck_beur_ein" type ="SMALLINT" size ="2" default ="" notnull ="false" description="Semester" />
<column name="examplan_id" type ="INTEGER" size ="4" default ="" notnull ="false" description="Promotionszugangsberechtigung" ><comment>Leistung, die zur Aufnahme einer Promotion berechtigt</comment></column>
<column name="course_of_study_id" type ="INTEGER" size ="4" default ="" notnull ="false" description="Studiengang" />
<column name="astat_bund" type ="CHAR" size ="10" default ="" notnull ="false" description="Abschluss (amtlich Bund)" currentlyUsed="false" ><comment>Amtlicher Statistikschlüssel des Bundes für den Abschluß</comment></column>
<column name="astat_land" type ="VARCHAR" size ="255" default ="" notnull ="false" description="Abschluss (amtlich Land)" currentlyUsed="false" ><comment>Schlüssel für die Meldung an das Land</comment></column>
<column name="k_type_of_doctorate" type ="VARCHAR" size ="255" default ="" notnull ="false" description="Art der Promotion" />
<column name="gueltig_von" type ="DATE" size ="4" default ="" notnull ="false" description="Gültig von" />
<column name="gueltig_bis" type ="DATE" size ="4" default ="" notnull ="false" description="Gültig bis" />
<column name="finished" type ="DATE" size ="4" default ="" notnull ="false" description="Abschlussdatum des Verlaufs"/>
<column name="structured_doctoral_program_id" type ="VARCHAR" size ="255" default ="" notnull ="false" description="Strukturiertes Promotionsprogramm" ><comment>Teilnahme an einem strukturierten Promotionsprogramm</comment></column>
<column name="stu_employment_business_id" type ="VARCHAR" size ="255" default ="" notnull ="false" description="Beschäftigungsverhältnis" ><comment>Beschäftigungsverhältnis an der Hochschule der Promotion</comment></column>
<column name="stu_employment_startdate" type ="DATE" size ="4" default ="" notnull ="false" description="Beschäftigungsverhältnis gültig von" />
<column name="stu_employment_enddate" type ="DATE" size ="4" default ="" notnull ="false" description="Beschäftigungsverhältnis gültig bis" />
<column name="k_examform_id" type ="INTEGER" size ="4" default ="" notnull ="false" description="Art der Dissertation" />
<column name="k_examform_un" type ="VARCHAR" size ="255" default ="" notnull ="false" description="Form der Dissertation" />
<column name="k_place_of_studies_astat" type ="VARCHAR" size ="255" default ="" notnull ="false" description="Standort" />
<!--neue Felder aus prom_promovierende-->
<column name="geschlecht_astat" type ="SMALLINT" size ="2" default ="" notnull ="false" description="Geschlecht" ><comment>Wert des amtlichen Schluessels, welcher das Geschlecht abbildet</comment></column>
<column name="staatsangehoerigkeit_1_astat" type ="INTEGER" size ="4" default ="" notnull ="false" description="Erste Staatsangehoerigkeit" ><comment>Wert des amtlichen Schluessels fuer erste Staatsangehoerigkeit</comment></column>
<column name="staatsangehoerigkeit_2_astat" type ="INTEGER" size ="4" default ="" notnull ="false" description="Zweite Staatsangehoerigkeit" ><comment>Wert des amtlichen Schluessels fuer zweite Staatsangehoerigkeit</comment></column>
<column name="hzb_datum" type ="DATE" size ="4" default ="" notnull ="false" description="HZB Datum"><comment>Datum des ersten Erwerbs einer Hochschulzulassungsberechtigung</comment></column>
<column name="hzb_jahr" type ="SMALLINT" size ="4" default ="" notnull ="false" description="HZB Jahr"><comment>Jahr des ersten Erwerbs einer Hochschulzulassungsberechtigung</comment></column>
<column name="hzb_type_astat" type ="CHAR" size ="10" default ="" notnull ="false" description="HZB-Art (amtlich)" ><comment>amtlicher Schluessel Art der ersten Hochschulzulassungsberechtigung</comment></column>
<column name="hzb_kreis_astat" type ="INTEGER" size ="255" default ="" notnull ="false" description="HZB-Ort" ><comment>amtlicher Schluessel Kreis des Erwerbs der ersten Hochschulzulassungsberechtigung</comment></column>
<column name="hzb_staat_astat" type ="INTEGER" size ="255" default ="" notnull ="false" description="HZB-Staat" ><comment>amtlicher Schluessel Staat des Erwerbs der ersten Hochschulzulassungsberechtigung</comment></column>
<column name="first_external_semester" type ="INTEGER" size ="2" default ="" notnull ="false" description="Erste externe Einschreibung Semester" />
<column name="first_external_year" type ="INTEGER" size ="2" default ="" notnull ="false" description="Erste externe Einschreibung Jahr" />
<column name="first_external_university_astat" type ="CHAR" size ="10" default ="" notnull ="false" description="Erste externe Einschreibung Hochschulstandort" />
<column name="first_external_country_astat" type ="INTEGER" size ="255" default ="" notnull ="false" description="Erste externe Einschreibung Staat" />
<column name="prev_exam_university_astat" type ="CHAR" size ="10" default ="" notnull ="false" description="Zur Promotion berechtigender Abschluss Hochschulstandort" />
<column name="prev_exam_semester" type ="INTEGER" size ="10" default ="" notnull ="false" description="Zur Promotion berechtigender Abschluss Semester" />
<column name="prev_exam_year" type ="INTEGER" size ="10" default ="" notnull ="false" description="Zur Promotion berechtigender Abschluss Jahr" />
<column name="prev_exam_country_astat" type ="INTEGER" size ="10" default ="" notnull ="false" description="Zur Promotion berechtigender Abschluss Staat" />
<column name="prev_exam_degree_land" type ="CHAR" size ="10" default ="" notnull ="false" description="Zur Promotion berechtigender Abschluss (Land)" />
<column name="prev_exam_degree_bund" type ="CHAR" size ="10" default ="" notnull ="false" description="Zur Promotion berechtigender Abschluss (Bund)" />
<column name="summe" type ="INTEGER" size ="255" default ="" notnull ="false" description="Summe" ><comment></comment></column>
</columns>
</table>
<views>
</views>
<functions>
</functions>
<themen>
</themen>
<masken>
<maske tid="46000" name="Promotionsvorhaben Datenblatt" thema="Promovierendenstatistik (Erw.)">
<src><path>$PROMSTAT_PFAD/masken</path></src>
</maske>
</masken>
<data-integrity>
<!--promstat_konto_pro_fs -->
<relation from="lm_course_of_study" to="promstat_docprogram_aggr" delete="FALSE" displayType="select" visibleFields="dtxt" format="%s">
<relation-column from="id" to="course_of_study_id" />
</relation>
<relation from="semester" to="promstat_docprogram_aggr" delete="FALSE" displayType="select" visibleFields="eintrag" format="%s">
<relation-column from="tid" to="sem_rueck_beur_ein" />
</relation>
<relation from="kenn_stg_astat" to="promstat_docprogram_aggr" delete="FALSE" displayType="select" visibleFields="dtxt" format="%s">
<relation-column from="astat" to="astat_bund" />
</relation>
<relation from="sos_k_stort" to="promstat_docprogram_aggr" delete="FALSE" displayType="select" visibleFields="druck" format="%s">
<relation-column from="astat" to="k_place_of_studies_astat" />
</relation>
<relation from="prom_promovierende" to="promstat_docprogram_aggr" delete="FALSE" displayType="select" visibleFields="nachname" format="%s">
<relation-column from="his_person_id" to="person_id" />
</relation>
<relation from="kenn_hzbart_astat_akt" to="promstat_docprogram_aggr" delete="FALSE" displayType="select" visibleFields="druck" format="%s">
<relation-column from="apnr" to="hzb_type_astat" />
</relation>
<relation from="sos_hzb_wohnsitz" to="promstat_docprogram_aggr" delete="FALSE" displayType="select" visibleFields="druck" format="%s">
<relation-column from="astat" to="hzb_kreis_astat" />
</relation>
<relation from="sos_hzb_wohnsitz" to="promstat_docprogram_aggr" delete="FALSE" displayType="select" visibleFields="druck" format="%s">
<relation-column from="astat" to="hzb_staat_astat" />
</relation>
<relation from="cif" to="promstat_docprogram_aggr" delete="FALSE" displayType="select" visibleFields="druck" format="%s">
<relation-column from="apnr" to="staatsangehoerigkeit_1_astat" />
<relation-column from="key" to="12" />
</relation>
<relation from="cif" to="promstat_docprogram_aggr" delete="FALSE" displayType="select" visibleFields="druck" format="%s">
<relation-column from="apnr" to="staatsangehoerigkeit_2_astat" />
<relation-column from="key" to="12" />
</relation>
<relation from="cifx" to="promstat_docprogram_aggr" delete="FALSE" displayType="select" visibleFields="druck" format="%s">
<relation-column from="apnr" to="k_examform_un" />
<relation-column from="key" to="9014" />
</relation>
<relation from="cifx" to="promstat_docprogram_aggr" delete="FALSE" displayType="select" visibleFields="druck" format="%s">
<relation-column from="apnr" to="first_external_university_astat" />
<relation-column from="key" to="36" />
</relation>
<relation from="cif" to="promstat_docprogram_aggr" delete="FALSE" displayType="select" visibleFields="druck" format="%s">
<relation-column from="apnr" to="first_external_country_astat" />
<relation-column from="key" to="12" />
</relation>
<relation from="kenn_abschl_astat" to="promstat_docprogram_aggr" delete="FALSE" displayType="select" visibleFields="dtxt" format="%s">
<relation-column from="astat" to="prev_exam_degree_bund" />
</relation>
<relation from="kenn_abschl_astat" to="promstat_docprogram_aggr" delete="FALSE" displayType="select" visibleFields="dtxt" format="%s">
<relation-column from="astat" to="prev_exam_degree_land" />
</relation>
<relation from="cif" to="promstat_docprogram_aggr" delete="FALSE" displayType="select" visibleFields="druck" format="%s">
<relation-column from="apnr" to="prev_exam_country_astat" />
<relation-column from="key" to="12" />
</relation>
<relation from="cifx" to="promstat_docprogram_aggr" delete="FALSE" displayType="select" visibleFields="druck" format="%s">
<relation-column from="apnr" to="prev_exam_university_astat" />
<relation-column from="key" to="36" />
</relation>
<relation from="semester" to="promstat_docprogram_aggr" delete="FALSE" displayType="select" visibleFields="eintrag" format="%s">
<relation-column from="tid" to="prev_exam_semester" />
</relation>
<!--ungeklärt: <relation from="kenn_abschl_astat" to="promstat_docprogram_aggr" delete="FALSE" displayType="select" visibleFields="dtxt" format="%s">
<relation-column from="astat" to="astat_bund" />
</relation>-->
</data-integrity>
</database>
<install_upgrade_job>
<install-upgrade-step name="pre_upgrade" type="container" id="promstat_preupgrade_containernode">
<action error="stop"/>
</install-upgrade-step>
<install-upgrade-step name="upgrade_tables" type="" id="promstat_upgrade_tables_actionstep">
<action error="stop">
<nativeaction sql="" scriptfile="$PROMSTAT_PFAD/upgrade/promstat_upgrade_tables_pg.sql" database=""/>
</action>
</install-upgrade-step>
<install-upgrade-step name="upgrade_fields" type="" id="promstat_upgrade_fields_actionstep">
<action error="stop">
<nativeaction sql="" scriptfile="$PROMSTAT_PFAD/upgrade/promstat_upgrade_fields_pg.sql" database=""/>
</action>
</install-upgrade-step>
<install-upgrade-step name="upgrade_views" type="" id="promstat_upgrade_views_actionstep">
<action error="stop">
<nativeaction sql="" scriptfile="$PROMSTAT_PFAD/upgrade/promstat_upgrade_views_pg.sql" database=""/>
</action>
</install-upgrade-step>
<install-upgrade-step name="install_functions" type="container" id="promstat_install_functions_containernode">
<action error="stop"/>
</install-upgrade-step>
<install-upgrade-step name="upgrade_indices" type="" id="promstat_upgrade_indices_actionstep">
<action error="stop">
<nativeaction sql="" scriptfile="$PROMSTAT_PFAD/upgrade/promstat_upgrade_indexes_pg.sql" database=""/>
</action>
</install-upgrade-step>
<install-upgrade-step name="fill_tables" type="" id="promstat_fill_tables_actionstep">
<action error="stop">
<nativeaction sql="" scriptfile="$PROMSTAT_PFAD/conf/sx_tables_fuellen.sql" database=""/>
</action>
</install-upgrade-step>
<install-upgrade-step name="fill_fields" type="" id="promstat_fill_fields_actionstep">
<action error="stop">
<nativeaction sql="" scriptfile="$PROMSTAT_PFAD/conf/sx_fields_fuellen.sql" database=""/>
</action>
</install-upgrade-step>
<install-upgrade-step name="fill_unload_parameter" type="" id="promstat_fill_unload_parameter_actionstep">
<action error="stop">
<nativeaction sql="" scriptfile="$PROMSTAT_PFAD/conf/unload_params_fuellen.sql" database=""/>
</action>
</install-upgrade-step>
<install-upgrade-step name="Update Module Metadata" type="container" id="promstat_update_module_metadata_actionstep">
<action error="stop">
<nativeaction sql="" scriptfile="$PROMSTAT_PFAD/conf/module_metadata.sql" database=""/>
</action>
</install-upgrade-step>
<install-upgrade-step name="update_topic_tree" type="" id="promstat_update_topictree_actionstep">
<action error="stop">
<nativeaction sql="" scriptfile="$PROMSTAT_PFAD/upgrade/promstat_upgrade_themenbaum.sql" database=""/>
</action>
</install-upgrade-step>
<install-upgrade-step name="install_masks" type="container" id="promstat_install_masks_containernode">
<action error="stop"/>
</install-upgrade-step>
</install_upgrade_job>
<!-- ********************* Liste der ETL-Prozesse ************************** -->
<etl>
<etl-step name="Upload der LEISTUNG-Modul-Rohdaten" type="load">
</etl-step>
<etl-step name="Transformation" type="trans">
</etl-step>
<etl-step name="Aggregation" type="aggr">
<action>
<nativeaction sql="" scriptfile="$PROMSTAT_PFAD/hilfstabellen/promstat_docprogram_aggr_fuellen.sql"
database=""/>
</action>
<action error="stop">
<nativeaction sql="" scriptfile="$PROMSTAT_PFAD/datentabellen/vacuum_pg.sql"
database="POSTGRES"/>
</action>
</etl-step>
</etl>
<install>
<install-step name="Installation">
<action>
<nativeaction sql="create table tmp_captions
(
id CHAR(200) ,
table_name CHAR(200) ,
field_name CHAR(200) ,
record_no INTEGER ,
locale CHAR(10) ,
contents_short CHAR(255) ,
contents_long text ,
equalitystatus SMALLINT ,
sachgebiete_id INTEGER,
doku_link character varying(255),
export_to_glossar integer DEFAULT 1
);" scriptfile="" database=""/>
</action>
<action>
<loadtable refresh="true" delimiter="^" header="false" tabname="tmp_captions"><file path="$PROMSTAT_PFAD/schluesseltabellen/promstat_captions.unl"/></loadtable>
</action>
<action>
<nativeaction sql="" scriptfile="$PROMSTAT_PFAD/schluesseltabellen/promstat_feste_konstanten_fuellen.sql"
database=""/>
<nativeaction sql="" scriptfile="$PROMSTAT_PFAD/schluesseltabellen/captions_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$PROMSTAT_PFAD/schluesseltabellen/sx_stylesheets_einfuegen.sql" database=""/>
</action>
</install-step>
</install>
<upgrade>
<upgrade-step>
<action>
<nativeaction sql="create table tmp_captions
(
id CHAR(200) ,
table_name CHAR(200) ,
field_name CHAR(200) ,
record_no INTEGER ,
locale CHAR(10) ,
contents_short CHAR(255) ,
contents_long text ,
equalitystatus SMALLINT ,
sachgebiete_id INTEGER,
doku_link character varying(255),
export_to_glossar integer DEFAULT 1
);" scriptfile="" database=""/>
</action>
<action>
<loadtable refresh="true" delimiter="^" header="false" tabname="tmp_captions"><file path="$PROMSTAT_PFAD/schluesseltabellen/promstat_captions.unl"/></loadtable>
</action>
<action>
<nativeaction sql="" scriptfile="$PROMSTAT_PFAD/schluesseltabellen/promstat_feste_konstanten_fuellen.sql"
database=""/>
<nativeaction sql="" scriptfile="$PROMSTAT_PFAD/schluesseltabellen/captions_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$PROMSTAT_PFAD/schluesseltabellen/sx_stylesheets_einfuegen.sql" database=""/>
</action>
</upgrade-step>
</upgrade>
<uninstall-step name="Deinstalliere Schlüssel">
<action error="stop">
<nativeaction sql="" scriptfile="$PROMSTAT_PFAD/schluesseltabellen/promstat_feste_konstanten_entfernen.sql"
database=""/>
<nativeaction sql="delete from sx_repository where sachgebiete_id=350;" scriptfile=""
database=""/>
</action>
</uninstall-step>
<dbforms>
</dbforms>
</module>

22
datentabellen/vacuum_pg.sql

@ -1,22 +0,0 @@
select * from xdummy;
--bei Postgres in HIS1 laufen alle Scripte in Transaktionen, daher muss man
--für vacuum erst committen
commit;
vacuum lm_exam_unit;
vacuum lm_exam_unit_studies;
vacuum lm_accreditation_neu;
vacuum lm_konto_pro_fs;
vacuum lm_unit;
vacuum lm_unitrelation;
vacuum lm_examrelation;
vacuum lm_examination;
vacuum lm_ects_soll_neu;
vacuum lm_ects_soll;
vacuum lm_pruefrout;

120
hilfstabellen/promstat_docprogram_aggr_fuellen.sql

@ -1,120 +0,0 @@
truncate table promstat_docprogram_aggr;
insert into promstat_docprogram_aggr( person_id,
degree_program_id,
doctoral_program_id,
sem_rueck_beur_ein,
examplan_id,
course_of_study_id,
astat_bund,
astat_land,
k_type_of_doctorate,
gueltig_von,
gueltig_bis,
finished,
structured_doctoral_program_id,
stu_employment_business_id,
stu_employment_startdate,
stu_employment_enddate,
k_examform_id,
k_examform_un,
k_place_of_studies_astat,
geschlecht_astat,
staatsangehoerigkeit_1_astat,
staatsangehoerigkeit_2_astat,
hzb_datum,
hzb_jahr,
hzb_type_astat,
hzb_kreis_astat,
hzb_staat_astat,
first_external_semester,
first_external_year,
first_external_country_astat,
first_external_university_astat,
summe
)
SELECT P.his_person_id,
P.degree_program_id,
P.doctoral_program_id,
P.sem_rueck_beur_ein,
P.examplan_id,
P.course_of_study_id,
substring(P.astat_bund from 1 for 10),
P.astat_land,
P.k_type_of_doctorate,
P.gueltig_von,
P.gueltig_bis,
P.finished,
P.structured_doctoral_program_id,
P.stu_employment_business_id,
P.stu_employment_startdate,
P.stu_employment_enddate,
P.k_examform_id,
P.k_examform_un,
P.k_place_of_studies_astat,
D.geschlecht_astat,
D.staatsangehoerigkeit_1_astat,
D.staatsangehoerigkeit_2_astat,
D.hzb_datum,
year(D.hzb_datum),
substring(D.hzb_type_astat from 1 for 10),
val(D.hzb_kreis_astat),
val(D.hzb_staat_astat),
D.first_external_semester,
val(substring('' || D.first_external_semester from 1 for 4)) as first_external_year,
val(D.first_external_country_astat),
substring(first_external_university_astat from 1 for 10),
count(*)
FROM prom_promotionen P left outer join prom_promovierende D
on (P.his_person_id=D.his_person_id)
group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
;
update promstat_docprogram_aggr set prev_exam_university_astat=A.ext_university_astat,
prev_exam_country_astat=val(ext_country_astat),
prev_exam_degree_land=substring(ext_degree_land_astat from 1 for 10),
prev_exam_degree_bund=substring(ext_degree_bund_astat from 1 for 10)
from prom_abschlusspruefungen A
where A.examplan_id=promstat_docprogram_aggr.examplan_id
;
update promstat_docprogram_aggr set prev_exam_semester=E.sem_der_pruefung
from lm_examplan E
where E.id=promstat_docprogram_aggr.examplan_id;
--nur wenn lm_examplan nichts findet:
update promstat_docprogram_aggr set prev_exam_semester=S.tid
from prom_abschlusspruefungen A, semester S
where promstat_docprogram_aggr.prev_exam_semester is null
and A.examplan_id=promstat_docprogram_aggr.examplan_id
and A.examination_date between S.sem_beginn and S.sem_ende
;
update promstat_docprogram_aggr set prev_exam_year=val(substring('' || prev_exam_semester from 1 for 4))
;
update promstat_docprogram_aggr set
prev_exam_degree_land=substring(int_degree_land_astat from 1 for 10)
from prom_abschlusspruefungen A
where A.examplan_id=promstat_docprogram_aggr.examplan_id
and promstat_docprogram_aggr.prev_exam_degree_land is null
;
update promstat_docprogram_aggr set
prev_exam_degree_bund=substring(int_degree_bund_astat from 1 for 10)
from prom_abschlusspruefungen A
where A.examplan_id=promstat_docprogram_aggr.examplan_id
and promstat_docprogram_aggr.prev_exam_degree_bund is null
;
-- update promstat_docprogram_aggr set abschluss_astat_bund=substring(abschluss_astat_bund from 3 for 2)
-- where length(abschluss_astat_bund)=4;
--
-- update promstat_docprogram_aggr set abschluss_astat_bund=substring(abschluss_astat_bund from 2 for 2)
-- where length(abschluss_astat_bund)=3;
--

15
masken/46000_felderinfo.unl

@ -1,15 +0,0 @@
46000^Fächer^4^0^0^170^200^1^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art='KENN-Fächer-Sicht' order by sortnr,name;^ ^^
46001^Seit Semester^2^0^0^170^150^1^integer^30^0^1^<<SQL>> select tid, druck from kenn_semester order by tid DESC;^^<<SQL>> select tid,druck from kenn_semester where today() between sem_beginn and sem_ende;^
46002^Registriernummer^100^350^-1^150^180^1^integer^200^0^0^^{InputCheck:matrikelnummern}^^
46003^Geschlecht^13^0^0^170^100^1^integer^30^0^1^<<SQL>> SELECT apnr,druck FROM kenn_geschl order by 2^^^
46005^bis Fachsemester^20^0^0^170^20^1^integer^30^0^0^^hidden^^
46006^Staatsangehörigkeit^11^0^0^170^120^1^sql^30^0^1^<<SQL>> select '!=0','Alle ohne Deutschland' from xdummy union select '=0','Deutsch' from xdummy order by 2;^^^
46011^Status^12^0^0^170^200^1^sql^30^0^1^<<SQL>> select apnr,eintrag from kenn_status order by 2^hidden^^
46013^ab Fachsemester^19^0^0^170^20^1^integer^30^0^0^^hidden^^
46014^Weitere Tabellen^123^0^0^140^140^10^char^30^0^1^<<SQL>> select name,string_not_null(caption) || ' - ' || name from sx_tables where name in ('xy') order by 2^^^
46015^Felder^125^0^0^150^190^10^char^2550^0^1^<<SQL>> select trim(F.table_name) || '.' || F.name,trim(T.caption) || ':' || trim(F.caption) || ' - ' || trim(F.name) from sx_fields F, sx_tables T where F.table_name=T.name and F.currentlyused=1 and (F.table_name ='promstat_docprogram_aggr' /* or F.table_name in (<<Weitere Tabellen>>) */)\
order by 2;^^^
46016^Schlüssel anzeigen^150^0^0^100^100^1^integer^30^1^1^<<SQL>> select 1,'Ja' from xdummy union select 0,'Nein' from xdummy^^<<SQL>> select 1,'Ja' from xdummy^
46017^Bis Semester^3^0^0^170^150^1^integer^30^0^1^<<SQL>> select tid, druck from kenn_semester order by tid DESC;^^<<SQL>> select tid,druck from kenn_semester where today() between sem_beginn and sem_ende;^
46018^tablestylesheet^120^0^0^100^200^1^char^200^1^1^<<SQL>> select distinct filename,X.caption from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=46000^^<<SQL>> select distinct filename,X.caption from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=46000 and S.ord=1^
46019^Ausgabeformat^2001^0^0^100^150^1^char^200^1^1^<<SQL>> select element_value,description from menu_element where element='Ausgabeformat' and nature::smallint<100 order by nature::smallint^^<<SQL>> select element_value,description from menu_element where element='Ausgabeformat' and description='HTML'^

1
masken/46000_maske_system_bez.unl

@ -1 +0,0 @@
46000^350^

14
masken/46000_masken_felder_bez.unl

@ -1,14 +0,0 @@
46000^46000^
46000^46001^
46000^46002^
46000^46003^
46000^46005^
46000^46006^
46000^46011^
46000^46013^
46000^46014^
46000^46015^
46000^46016^
46000^46017^
46000^46018^
46000^46019^

122
masken/46000_maskeninfo.unl

@ -1,122 +0,0 @@
46000^Promotionsvorhaben Datenblatt^--Freemarker Template\
--ram excelexport\
<#include "SQL_lingua_franca"/>\
<#include "SuperX_general"/>\
--<#include "SQL_multitable_output"/> \
\
<sqlvars>\
<sqlvar name="get_tables"><![CDATA[\
SELECT distinct name,name\
from sx_tables\
where name in ('promstat_docprogram_aggr'\
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)}\
\
)\
order by 2;]]>\
</sqlvar>\
<sqlvar name="get_table_joins"><![CDATA[\
select table_name || '.' || name || '=' || foreignkey_tab || '.' || foreignkey_col,table_name \
from sx_fields where table_name in ('promstat_docprogram_aggr'\
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)} )\
and foreignkey_tab in ('promstat_docprogram_aggr'\
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)})\
;]]>\
</sqlvar>\
<sqlvar name="get_felder"><![CDATA[\
SELECT name,\
caption,\
(trim(field_type) || '#' || is_primarykey || '#' || trim(string_not_null(foreignkey_tab)) || '#' || trim(string_not_null(foreignkey_col))\
|| '#' || trim(string_not_null(foreignkey_cap))\
|| '#' || trim(string_not_null(foreignkey_cond))\
|| '#' || trim(string_not_null(foreignkey_func))\
|| '#' || trim(string_not_null(table_name)))::char(255) as strukturStr\
from sx_fields\
where table_name in ('promstat_docprogram_aggr'\
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)}\
)\
and currentlyused=1\
${DatenblattFields(<<tablestylesheet>>,"<<Felder>>",FelderObject.allKeys)}\
order by 2,3;]]>\
</sqlvar>\
<sqlvar name="get_felder_fk"><![CDATA[\
SELECT name,\
caption,\
(trim(table_name)\
|| '#' || trim(string_not_null(foreignkey_tab)))::char(255) as strukturStr\
from sx_fields\
where table_name in ('promstat_docprogram_aggr' ${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)}\
)\
and currentlyused=1\
${DatenblattFields(<<tablestylesheet>>,"<<Felder>>",FelderObject.allKeys)}\
order by 2,3;]]>\
</sqlvar>\
</sqlvars>\
\
<@generate_multitable_list />\
<@generate_field_list_multitable aggregationsfeld="summe" aggregatfunktion="sum(" />\
<@generate_foreign_fields_multitable />\
\
\
<#assign filter="\
/* and sem_rueck_beur_ein <= <<Bis Semester>> */\
/* and sem_rueck_beur_ein >= <<Seit Semester>> */\
/* and fach_sem_zahl <= <<bis Fachsemester>> */\
/* and fach_sem_zahl >= <<ab Fachsemester>> */\
/* and hssem <= <<bis Hochschulsemester>> */\
/* and abschluss in (<<Abschluss>>) */\
/* and kz_fach = <<Fachkennz.>> */\
/* and promstat_docprogram_aggr.his_person_id in (select P.his_person_id from prom_promovierende P where P.geschlecht_astat = <<Geschlecht>>) */\
/* and kz_rueck_beur_ein in(<<Status>>) */\
/* and promstat_docprogram_aggr.his_person_id in (select P.his_person_id from prom_promovierende P where P.staatsangehoerigkeit_1_astat <<Staatsangehörigkeit>>) */\
/* and promstat_docprogram_aggr.his_person_id in (select P.his_person_id from prom_promovierende P where P.registrationnumber= <<Registriernummer>>) */\
" />\
\
/* \
<#assign filter = filter + " and (promstat_docprogram_aggr.astat_bund in "+Fächer.allNeededKeysList /> --<<Fächer>> */\
\
\
\
<@generate_resultset_multitable tabellen=table_list\
p_show_keys=<<Schlüssel anzeigen>>\
p_field_list_select=field_list_select\
p_foreign_fields=foreign_fields\
p_filter=filter\
p_field_list_groupby=field_list_groupby\
p_join_clause=join_clause\
/>^--Freemarker Template \
<sqlvars>\
<sqlvar name="get_felder">\
SELECT caption,\
foreignkey_tab,\
description as strukturStr\
from sx_fields\
where table_name in ('promstat_docprogram_aggr'\
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)}\
)\
\
and currentlyused=1\
${DatenblattFields(<<tablestylesheet>>,"<<Felder>>",FelderObject.allKeys)}\
\
order by 1;\
</sqlvar>\
</sqlvars>\
XIL List\
sizable_columns horizontal_scrolling\
white_space_color=COLOR_WHITE fixed_columns=1\
min_heading_height=35\
<#assign i=1 />\
<#if get_felder?has_content >\
<#foreach myfield in get_felder>\
<#assign i=i+1 />\
Column CID=${i} heading_text="${myfield.key}" explanation="${myfield.strukturStr}" center_heading\
row_selectable col_selectable rightJust heading_platform readonly\
width=20\
<#if myfield.name != ''>\
<#assign i=i+1 />\
Column CID=${i} heading_text="${myfield.key}\\n(Schlüssel)" explanation="Schlüssel des Feldes ${myfield.key}" center_heading\
row_selectable col_selectable rightJust heading_platform readonly\
width=20\
</#if>\
</#foreach>\
</#if>\
@@@^Studienfach^Anzahl bzw. Anteil^Statistik der Promotionsvorhaben und Merkmalen der Promivierenden HZB früheres Studium^drop table tmp_tabelle;^studallg.dat^1^850^600^0^1^<<SQL>> select 'Letzte Lieferung: ' || date_str(max(datum)) from kenn_lieferung where (1 =0 /* or hs_nr::char(10) in (<<Hochschule>>) */ /* or hs_nr::char(10) in (select key_apnr from organigramm where parent in (<<Hochschule>>)) */ /* or <<Hochschule>>='0' */ ) and kennzahl ='STDI'^

1
masken/46000_sachgeb_maske_bez.unl

@ -1 +0,0 @@
350^46000^

2
rohdaten/PROMSTAT_ENV.sam

@ -1,2 +0,0 @@
#bitte einen symbolischen Link auf die SOS_ENV setzen

1131
rohdaten/promstat_unload.xml

File diff suppressed because it is too large Load Diff

102
schluesseltabellen/captions_fuellen.sql

@ -1,102 +0,0 @@
--freemarker template
delete from sx_captions where id like 'doku_16000%';
delete from sx_captions where id like 'doku_16020%';
delete from sx_captions where id like 'doku_16040%';
delete from sx_captions where id like 'doku_16060%';
delete from sx_captions where id like 'doku_16100%';
delete from sx_captions where id like 'doku_16120%';
delete from sx_captions where id like 'doku_16140%';
delete from sx_captions where id like 'doku_16160%';
delete from sx_captions where id like 'doku_16180%';
delete from sx_captions where id like 'doku_16200%';
delete from sx_captions where id like 'doku_16220%';
delete from sx_captions where id like 'doku_16240%';
delete from sx_captions where id like 'doku_16260%';
delete from sx_captions where id like 'doku_16280%';
delete from sx_captions where id like 'doku_16300%';
delete from sx_captions where id like 'doku_16340%';
delete from sx_captions where id like 'doku_16360%';
delete from sx_captions where id like 'doku_16380%';
delete from sx_captions where id like 'doku_16400%';
delete from sx_captions where id like 'doku_16450%';
delete from sx_captions where id like 'doku_16470%';
delete from sx_captions where id like 'doku_16490%';
delete from sx_captions where id like 'doku_16530%';
delete from sx_captions where id like 'doku_16550%';
delete from sx_captions where id like 'doku_16570%';
delete from sx_captions where id like 'doku_16590%';
delete from sx_captions where id like 'doku_16610%';
delete from sx_captions where id like 'doku_16630%';
delete from sx_captions where id like 'doku_16650%';
delete from sx_captions where id like 'doku_16690%';
delete from sx_captions where id like 'doku_16710%';
delete from sx_captions where id like 'doku_16730%';
delete from sx_captions where id like 'doku_16750%';
delete from sx_captions where id like 'doku_16770%';
delete from sx_captions where id like 'sos_doku_benutzer_url%';
delete from sx_captions where id like 'sos_doku_admin_url%';
delete from sx_captions where id like 'einzelpruefungen_doku_benutzer_url%';
delete from sx_captions where id like 'studierende_doku_benutzer_url%';
delete from sx_captions where id like 'pruefungen_doku_benutzer_url%';
delete from sx_captions where id like 'abschlusspruefungen_doku_benutzer_url%';
delete from sx_captions where id like 'sos_astat_doku_url%';
--Für Update Felderinfo mit neuen Spalten
--Prüfungen/ Studierene 120
--delete from sx_captions where table_name like 'felderinfo%' and sachgebiete_id=120;
--Abschlusspruefungen 16
--delete from sx_captions where table_name like 'felderinfo%' and sachgebiete_id=16;
--Einzelpruefungen 34
--delete from sx_captions where table_name like 'felderinfo%' and sachgebiete_id=34;
--in tmp_captions stehen release captions:
--Löschung der release captions nach id bzw. felderinfo, Feldname, tid:
--z.B. id=sos_auslaender_w_absol
--oder table_name=felderinfo und field_name=Seit Semester
delete from tmp_captions where
--Löschung der release captions nach id
(id is not null
and id in (select id from sx_captions where id is not null))
--Löschung der release captions nach felderinfo, Feldname: , tid:
or (
id is null and record_no is null and field_name is not null and field_name in
(select field_name from sx_captions where field_name is not null
--Wenn keine record_no, dann gilt es für alle Felder mit dem Namen
and record_no is null));
--record_no abfangen, wenn vorhanden
delete from tmp_captions
where id is null and field_name is not null
--Wenn record_no gefüllt:
and record_no is not null
and (trim(field_name) || record_no in (select trim(field_name) || record_no from sx_captions
where field_name is not null
and record_no is not null));
<#if SQLdialect='Postgres'>
select sp_update_sequence('sx_captions');
</#if>
insert into sx_captions ( id,table_name,field_name,record_no,locale,contents_short,contents_long, equalitystatus,sachgebiete_id
<#if TableFieldExists?exists && TableFieldExists('sx_captions','doku_link')>
,doku_link
</#if>
<#if TableFieldExists?exists && TableFieldExists('sx_captions','export_to_glossar')>
,export_to_glossar
</#if>
)
select id,table_name,field_name,record_no,locale,contents_short,contents_long, equalitystatus,sachgebiete_id
<#if TableFieldExists?exists && TableFieldExists('sx_captions','doku_link')>
,doku_link
</#if>
<#if TableFieldExists?exists && TableFieldExists('sx_captions','export_to_glossar')>
,export_to_glossar
</#if>
from tmp_captions;
drop table tmp_captions;

34
schluesseltabellen/captions_fuellen.x

@ -1,34 +0,0 @@
#/bin/sh
DOQUERY "create table tmp_captions
(
id CHAR(200) ,
table_name CHAR(200) ,
field_name CHAR(200) ,
record_no INTEGER ,
locale CHAR(10) ,
contents_short CHAR(255) ,
contents_long text ,
equalitystatus SMALLINT ,
sachgebiete_id INTEGER,
doku_link character varying(255),
export_to_glossar integer DEFAULT 1
)"
sx_auto_upload_table.x tmp_captions "./lm_captions.unl"
DOQUERY "delete from tmp_captions where (id is not null
and id in (select id from sx_captions where id is not null))
or (id is null and field_name is not null and field_name in (select field_name from sx_captions where field_name is not null));"
if [ "$DATABASE" = "POSTGRES" ]
then
DOQUERY "select sp_update_sequence('sx_captions');"
fi
DOQUERY "insert into sx_captions ( id,table_name,field_name,record_no,locale,contents_short,contents_long, equalitystatus,sachgebiete_id,doku_link,export_to_glossar)
select id,table_name,field_name,record_no,locale,contents_short,contents_long, equalitystatus,sachgebiete_id,doku_link,export_to_glossar from tmp_captions;"
DOQUERY "drop table tmp_captions;"

0
schluesseltabellen/promstat_captions.unl

7
schluesseltabellen/promstat_feste_konstanten_entfernen.sql

@ -1,7 +0,0 @@
delete from konstanten where systeminfo_id=350;

103
schluesseltabellen/promstat_feste_konstanten_fuellen.sql

@ -1,103 +0,0 @@
--freemarker template
<#if SQLdialect='Postgres'>
<#assign texttype="text" />
<#else>
EXECUTE PROCEDURE IFX_ALLOW_NEWLINE('T');
<#assign texttype="lvarchar" />
</#if>
<#assign newline="'
'" />
create temp table tmp_konstanten
(
tid serial,
apnr integer,
beschreibung char(255),
defaultvalue integer,
description ${texttype},
systeminfo_id integer,
doku_link varchar(255),
read_only integer,
wertebereich varchar(250),
ab_version varchar(10),
gruppe varchar(255),
sachgebiete_id integer
);
insert into tmp_konstanten(apnr, beschreibung, defaultvalue, description, systeminfo_id, doku_link, read_only, wertebereich, ab_version, gruppe, sachgebiete_id)
values (6,'PROMSTAT_Quellsystem', 6,'Anzeige der Datenquelle für die BI-Komponente',
350, '',
1,'6 = HISinOne', '8.0', 'Datenquelle, Entladestartzeitpunkt, -umfang', 350);
--vorhandene Schlüssel Metadaten updaten:
<#if SQLdialect='Postgres'>
--Postgres Dialekt:
update konstanten set defaultvalue=T.defaultvalue,
description=T.description,
systeminfo_id=T.systeminfo_id ,
doku_link=T.doku_link,
read_only=T.read_only ,
wertebereich=T.wertebereich,
ab_version=T.ab_version,
gruppe=T.gruppe ,
sachgebiete_id=T.sachgebiete_id
from tmp_konstanten T
where T.beschreibung=konstanten.beschreibung;
<#else>
--Informix Dialekt:
update konstanten set (defaultvalue,
description,
systeminfo_id,
doku_link,
read_only,
wertebereich,
ab_version,
gruppe,
sachgebiete_id)
= ((select
defaultvalue,
description,
systeminfo_id,
doku_link,
read_only,
wertebereich,
ab_version,
gruppe,
sachgebiete_id
from tmp_konstanten T
where T.beschreibung=konstanten.beschreibung))
where beschreibung in (
select T.beschreibung
from tmp_konstanten T)
;
</#if>
select 'vorh. Konstanten apnrs bleiben erhalten' from xdummy;
delete from tmp_konstanten where beschreibung in (select beschreibung from konstanten);
create temp table tmp_hilf (tid integer);
insert into tmp_hilf select max(tid) from konstanten;
update tmp_hilf set tid=0 where tid is null;
insert into konstanten(tid , apnr ,beschreibung, defaultvalue, description, systeminfo_id, doku_link, read_only, wertebereich, ab_version, gruppe, sachgebiete_id )
select H.tid+K.tid , K.apnr ,K.beschreibung, K.defaultvalue, K.description, K.systeminfo_id, K.doku_link, K.read_only, K.wertebereich, K.ab_version, K.gruppe, K.sachgebiete_id from tmp_konstanten K, tmp_hilf H;
drop table tmp_konstanten;
drop table tmp_hilf;
--Konstante LM_ECTS_SOLL_SRC auf Wert von SOS setzen, wenn noch nicht gesetzt:
update konstanten set apnr=1
where beschreibung='LM_ECTS_SOLL_SRC'
and apnr=2
and 0< (select count(*) from konstanten K2 where K2.beschreibung='SOS_ECTS_SOLL_SRC' and K2.apnr=1);

165
schluesseltabellen/sx_stylesheets_einfuegen.sql

@ -1,165 +0,0 @@
--Freemarker Template
--Achtung: Macro fügt Inhalte ein
--Bitte nur Freemarker Variablen füllen
<#assign masken = [
{"mask":"46000", "filename":"tabelle_html_datenblatt.xsl", "ord":"1"}
] />
<#assign stylesheet = [
] />
<#assign stylesheet_field = [
] />
--Hier eventuell notwendige delete's auf die Tabellen sx_mask_style, sx_stylesheets oder stylesheet_field einfügen.
--Achtung: ab hier nicht ändern, Mutterdatei ist $SUPERX_DIR/db/module/sos/schluesseltabellen/sx_stylesheets_fuellen.sql
<@sx_stylesheets_insert
m_masken=masken
m_stylesheet=stylesheet
m_stylesheet_field=stylesheet_field
/>
<#macro sx_stylesheets_insert m_masken m_stylesheet m_stylesheet_field>
--Sicherstellen, dass keine Duplikate vorkommen:
--####################################################################################################
<#foreach column in m_masken>
delete from sx_mask_style where maskeninfo_id=${column.mask} and stylesheet_id in (select tid from sx_stylesheets where filename ='${column.filename}') and ord=${column.ord};
</#foreach>
<#foreach column in m_stylesheet_field>
delete from stylesheet_field where stylesheet_id in (select tid from sx_stylesheets where filename ='${column.filename}');
</#foreach>
-- Stylesheets füllen
--####################################################################################################
create temp table tmp_stylesheets (
tid serial not null,
filename CHAR(255) ,
caption CHAR(255) ,
description CHAR(255) ,
relation CHAR(10) ,
useragent CHAR(255) ,
contenttype CHAR(200) ,
is_generic smallint
);
create temp table tmp_hilf (tid integer);
insert into tmp_hilf select max(tid) from sx_stylesheets;
update tmp_hilf set tid=1 where tid is null;
<#assign counter_tid = 1 />
<#foreach column in m_stylesheet>
insert into tmp_stylesheets (tid,filename,caption,description,relation,contenttype,is_generic)
select max(tid)+${counter_tid},'${column.filename}',
'${column.caption}',
'${column.description}',
'${column.relation}',
'${column.contenttype}',
${column.is_generic}
from tmp_hilf;
<#assign counter_tid = counter_tid + 1 />
</#foreach>
<#if TableFieldExists?exists && TableFieldExists('sx_stylesheets','is_generic')>
update sx_stylesheets set is_generic=1
where filename in (select T.filename from tmp_stylesheets T where T.is_generic=1);
</#if>
--delete für tml_stylesheets hinzugefügt #ak 06.03.2013
delete from tmp_stylesheets where filename in (select filename from sx_stylesheets);
insert into sx_stylesheets (tid,
filename, caption, description, relation, useragent, contenttype
<#if TableFieldExists?exists && TableFieldExists('sx_stylesheets','is_generic')>
,is_generic
</#if>
)
SELECT tid, filename, caption, description, relation, useragent, contenttype
<#if TableFieldExists?exists && TableFieldExists('sx_stylesheets','is_generic')>
,is_generic
</#if>
FROM tmp_stylesheets;
drop table tmp_stylesheets;
-- Mask Style füllen
--####################################################################################################
create temp table tmp_mask_style (
tid serial not null,
maskeninfo_id INTEGER ,
stylesheet_id INTEGER ,
ord SMALLINT,
filename char(255)
);
delete from tmp_hilf;
insert into tmp_hilf select max(tid) from sx_mask_style;
update tmp_hilf set tid=1 where tid is null;
<#assign counter_tid = 1 />
<#foreach column in m_masken>
insert into tmp_mask_style (tid,maskeninfo_id,ord,filename)
select max(tid)+${counter_tid},${column.mask},${column.ord},'${column.filename}' from tmp_hilf;
update tmp_mask_style set stylesheet_id=(select max(tid) from sx_stylesheets where filename='${column.filename}')
where filename='${column.filename}';
<#assign counter_tid = counter_tid + 1 />
</#foreach>
insert into sx_mask_style ( tid, maskeninfo_id, stylesheet_id, ord)
SELECT tid, maskeninfo_id, stylesheet_id, ord
FROM tmp_mask_style;
drop table tmp_mask_style;
--Field zu Stylesheet Zuordnungen:
--####################################################################################################
CREATE temp TABLE tmp_stylesheet_field
(
tid serial NOT NULL,
stylesheet_id INTEGER,
tablename char(255),
fieldname char(255),
filename char(255)
);
delete from tmp_hilf;
insert into tmp_hilf select max(tid) from stylesheet_field;
update tmp_hilf set tid=1 where tid is null;
<#assign counter_tid = 1 />
<#foreach column in m_stylesheet_field>
INSERT INTO tmp_stylesheet_field (tid, filename, tablename, fieldname)
select max(tid)+${counter_tid}, '${column.filename}', '${column.tablename}', '${column.fieldname}' from tmp_hilf;
update tmp_stylesheet_field set stylesheet_id=(select max(tid) from sx_stylesheets where filename='${column.filename}')
where filename='${column.filename}';
<#assign counter_tid = counter_tid + 1 />
</#foreach>
insert into stylesheet_field ( tid, stylesheet_id, tablename, fieldname)
SELECT tid, stylesheet_id, tablename, fieldname
FROM tmp_stylesheet_field;
drop table tmp_stylesheet_field;
drop table tmp_hilf;
<#if SQLdialect='Postgres'>
select sp_update_sequence('sx_stylesheets');
select sp_update_sequence('sx_mask_style');
select sp_update_sequence('stylesheet_field');
</#if>
</#macro>

15
upgrade/lm_upgrade_man.sql

@ -1,15 +0,0 @@
--Freemarker Template
<#if '${SQLdialect}'='Postgres' >
alter table lm_ects_soll alter column pversion type varchar(255);
alter table lm_ects_soll_neu alter column pversion type varchar(255);
alter table lm_accreditation_neu alter column k_accreditationtype_id type varchar(255);
</#if>
<#if '${SQLdialect}'='Informix' >
--nun Informix:
alter table lm_ects_soll modify(pversion varchar(255));
alter table lm_ects_soll_neu modify(pversion varchar(255));
alter table lm_accreditation_neu modify(k_accreditationtype_id varchar(255));
</#if>
Loading…
Cancel
Save