Skip to content

Commit

Permalink
nas2alb: Buchstabenerweiterung bei Buchungsblattnummer berücksichtigen
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Oct 26, 2018
1 parent c94999d commit c5727f2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion about.ui
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<ul>
<li><a href="http://www.norbit.de/75/">QGIS-Plugin zum Import in QGIS-Projekte und zur Erzeugung von UMN-Mapfiles</span></a> (GPLv2) </li>
<li><a href="http://www.norbit.de/76/">Darstellung in AutoCAD & BricsCAD</span></a> (proprietär) </li></ul>
<p>Lizenz: <a href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html">GPLv2</a>, <a href="http://www.norbit.de/68/">Homepage</a>, <a href=" https://github.com/norBIT/alkisimport">Code-Repository</a></p>
<p>Lizenz: <a href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html">GPLv2</a>, <a href="http://www.norbit.de/68/">Homepage</a>, <a href="https://github.com/norBIT/alkisimport">Code-Repository</a></p>
<br>
</body>
&lt;/html&gt;</string>
Expand Down
4 changes: 2 additions & 2 deletions postcreate.d/nas2alb.sql
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ SET search_path = :"alkis_schema", :"postgis_schema", public;

SELECT alkis_dropobject('alb_version');
CREATE TABLE alb_version(version integer);
INSERT INTO alb_version(version) VALUES (3);
INSERT INTO alb_version(version) VALUES (4);

-- Sichten löschen, die von alkis_toint abhängen
SELECT alkis_dropobject('ax_tatsaechlichenutzung');
Expand Down Expand Up @@ -177,7 +177,7 @@ SELECT alkis_dropobject('bestand');
CREATE TABLE bestand (
bestdnr character(16) NOT NULL,
gbbz character(4),
gbblnr character(7),
gbblnr varchar,
anteil character(24),
auftlnr character(12),
bestfl varchar,
Expand Down
2 changes: 1 addition & 1 deletion postprocessing.d/4_nas2alb/4_bestand.sql
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ INSERT INTO bestand(bestdnr,gbbz,gbblnr,anteil,auftlnr,bestfl,ff_entst,ff_stand,
SELECT
to_char(alkis_toint(land),'fm00') || to_char(alkis_toint(bezirk),'fm0000') || '-' || trim(buchungsblattnummermitbuchstabenerweiterung) AS bestdnr,
to_char(alkis_toint(bezirk),'fm0000') AS gbbz,
to_char(to_number(buchungsblattnummermitbuchstabenerweiterung,'0000000')::int,'fm0000000') AS gbblnr,
buchungsblattnummermitbuchstabenerweiterung AS gbblnr,
NULL AS anteil,
NULL AS auftrlnr,
NULL AS bestfl,
Expand Down
8 changes: 7 additions & 1 deletion postupdate.d/nas2alb.sql
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,14 @@ BEGIN
COMMENT ON TABLE kls_shl IS 'BASE: Klassifiziersschlüssel';

ALTER TABLE strassen ALTER hausnr TYPE varchar;
END IF;

IF v<4 THEN
RAISE NOTICE 'Migriere auf Schema-Version 4';

ALTER TABLE bestand ALTER gbblnr TYPE varchar;

UPDATE alb_version SET version=3;
UPDATE alb_version SET version=4;

r := coalesce(r||E'\n','') || 'ALB-Schema migriert';
END IF;
Expand Down

0 comments on commit c5727f2

Please sign in to comment.