Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise to QGIS 3.22 and PG 13 #168

Merged
merged 2 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
profiles:
- "qgis"
- "db"
image: kartoza/postgis:11.5-2.5 # Despite the tag, it's a 11.7 version
image: kartoza/postgis:13-3
container_name: postgis
networks:
qgis_plugin_network:
Expand All @@ -30,7 +30,7 @@ services:
qgis:
profiles:
- "qgis"
image: qgis/qgis:release-3_16
image: qgis/qgis:release-3_22
container_name: qgis
networks:
qgis_plugin_network:
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Raise to QGIS 3.22 minimum version
* Upgrade to PostgreSQL 13 for testing and SQL files

## 1.3.0 - 2024-02-05

* Additional glossary terms for publication frequency and link types (contribution from @effjot Florian Jenn)
Expand Down
4 changes: 2 additions & 2 deletions pg_metadata/install/sql/pgmetadata/10_FUNCTION.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ BEGIN;
-- PostgreSQL database dump
--

-- Dumped from database version 11.7 (Debian 11.7-2.pgdg100+1)
-- Dumped by pg_dump version 11.7 (Debian 11.7-2.pgdg100+1)
-- Dumped from database version 13.4 (Debian 13.4-1.pgdg110+1)
-- Dumped by pg_dump version 13.4 (Debian 13.4-1.pgdg110+1)

SET statement_timeout = 0;
SET lock_timeout = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ BEGIN;
-- PostgreSQL database dump
--

-- Dumped from database version 11.7 (Debian 11.7-2.pgdg100+1)
-- Dumped by pg_dump version 11.7 (Debian 11.7-2.pgdg100+1)
-- Dumped from database version 13.4 (Debian 13.4-1.pgdg110+1)
-- Dumped by pg_dump version 13.4 (Debian 13.4-1.pgdg110+1)

SET statement_timeout = 0;
SET lock_timeout = 0;
Expand All @@ -19,7 +19,7 @@ SET row_security = off;

SET default_tablespace = '';

SET default_with_oids = false;
;

-- contact
CREATE TABLE pgmetadata.contact (
Expand Down
16 changes: 8 additions & 8 deletions pg_metadata/install/sql/pgmetadata/30_VIEW.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ BEGIN;
-- PostgreSQL database dump
--

-- Dumped from database version 11.7 (Debian 11.7-2.pgdg100+1)
-- Dumped by pg_dump version 11.7 (Debian 11.7-2.pgdg100+1)
-- Dumped from database version 13.4 (Debian 13.4-1.pgdg110+1)
-- Dumped by pg_dump version 13.4 (Debian 13.4-1.pgdg110+1)

SET statement_timeout = 0;
SET lock_timeout = 0;
Expand Down Expand Up @@ -274,7 +274,7 @@ CREATE VIEW pgmetadata.v_locales AS
UNION
SELECT replace((columns.column_name)::text, 'label_'::text, ''::text) AS locale
FROM information_schema.columns
WHERE (((columns.table_schema)::text = 'pgmetadata'::text) AND ((columns.table_name)::text = 'glossary'::text) AND ((columns.column_name)::text ~~ 'label_%'::text))
WHERE (((columns.table_schema)::name = 'pgmetadata'::name) AND ((columns.table_name)::name = 'glossary'::name) AND ((columns.column_name)::name ~~ 'label_%'::text))
ORDER BY 1;


Expand Down Expand Up @@ -305,7 +305,7 @@ CREATE VIEW pgmetadata.v_orphan_tables AS
FROM information_schema.tables
WHERE ((NOT (concat(tables.table_schema, '.', tables.table_name) IN ( SELECT concat(dataset.schema_name, '.', dataset.table_name) AS concat
FROM pgmetadata.dataset))) AND ((tables.table_schema)::name <> ALL (ARRAY['pg_catalog'::name, 'information_schema'::name])))
ORDER BY (tables.table_schema)::text, (tables.table_name)::text;
ORDER BY ((tables.table_schema)::text), ((tables.table_name)::text);


-- VIEW v_orphan_tables
Expand All @@ -317,8 +317,8 @@ CREATE VIEW pgmetadata.v_schema_list AS
SELECT row_number() OVER () AS id,
(schemata.schema_name)::text AS schema_name
FROM information_schema.schemata
WHERE ((schemata.schema_name)::text <> ALL ((ARRAY['pg_toast'::character varying, 'pg_temp_1'::character varying, 'pg_toast_temp_1'::character varying, 'pg_catalog'::character varying, 'information_schema'::character varying])::text[]))
ORDER BY (schemata.schema_name)::text;
WHERE ((schemata.schema_name)::name <> ALL (ARRAY['pg_toast'::name, 'pg_temp_1'::name, 'pg_toast_temp_1'::name, 'pg_catalog'::name, 'information_schema'::name]))
ORDER BY ((schemata.schema_name)::text);


-- VIEW v_schema_list
Expand Down Expand Up @@ -350,8 +350,8 @@ CREATE VIEW pgmetadata.v_table_list AS
(tables.table_schema)::text AS schema_name,
(tables.table_name)::text AS table_name
FROM information_schema.tables
WHERE ((tables.table_schema)::text <> ALL ((ARRAY['pg_toast'::character varying, 'pg_temp_1'::character varying, 'pg_toast_temp_1'::character varying, 'pg_catalog'::character varying, 'information_schema'::character varying])::text[]))
ORDER BY tables.table_schema, (tables.table_name)::text;
WHERE ((tables.table_schema)::name <> ALL (ARRAY['pg_toast'::name, 'pg_temp_1'::name, 'pg_toast_temp_1'::name, 'pg_catalog'::name, 'information_schema'::name]))
ORDER BY tables.table_schema, ((tables.table_name)::text);


-- VIEW v_table_list
Expand Down
4 changes: 2 additions & 2 deletions pg_metadata/install/sql/pgmetadata/40_INDEX.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ BEGIN;
-- PostgreSQL database dump
--

-- Dumped from database version 11.7 (Debian 11.7-2.pgdg100+1)
-- Dumped by pg_dump version 11.7 (Debian 11.7-2.pgdg100+1)
-- Dumped from database version 13.4 (Debian 13.4-1.pgdg110+1)
-- Dumped by pg_dump version 13.4 (Debian 13.4-1.pgdg110+1)

SET statement_timeout = 0;
SET lock_timeout = 0;
Expand Down
4 changes: 2 additions & 2 deletions pg_metadata/install/sql/pgmetadata/50_TRIGGER.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ BEGIN;
-- PostgreSQL database dump
--

-- Dumped from database version 11.7 (Debian 11.7-2.pgdg100+1)
-- Dumped by pg_dump version 11.7 (Debian 11.7-2.pgdg100+1)
-- Dumped from database version 13.4 (Debian 13.4-1.pgdg110+1)
-- Dumped by pg_dump version 13.4 (Debian 13.4-1.pgdg110+1)

SET statement_timeout = 0;
SET lock_timeout = 0;
Expand Down
4 changes: 2 additions & 2 deletions pg_metadata/install/sql/pgmetadata/60_CONSTRAINT.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ BEGIN;
-- PostgreSQL database dump
--

-- Dumped from database version 11.7 (Debian 11.7-2.pgdg100+1)
-- Dumped by pg_dump version 11.7 (Debian 11.7-2.pgdg100+1)
-- Dumped from database version 13.4 (Debian 13.4-1.pgdg110+1)
-- Dumped by pg_dump version 13.4 (Debian 13.4-1.pgdg110+1)

SET statement_timeout = 0;
SET lock_timeout = 0;
Expand Down
4 changes: 2 additions & 2 deletions pg_metadata/install/sql/pgmetadata/70_COMMENT.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ BEGIN;
-- PostgreSQL database dump
--

-- Dumped from database version 11.7 (Debian 11.7-2.pgdg100+1)
-- Dumped by pg_dump version 11.7 (Debian 11.7-2.pgdg100+1)
-- Dumped from database version 13.4 (Debian 13.4-1.pgdg110+1)
-- Dumped by pg_dump version 13.4 (Debian 13.4-1.pgdg110+1)

SET statement_timeout = 0;
SET lock_timeout = 0;
Expand Down
5 changes: 3 additions & 2 deletions pg_metadata/locator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from qgis.core import (
Qgis,
QgsDataSourceUri,
QgsIconUtils,
QgsLocatorFilter,
QgsLocatorResult,
QgsProject,
Expand All @@ -13,6 +14,7 @@
QgsRasterLayer,
QgsSettings,
QgsVectorLayer,
QgsWkbTypes,
)
from qgis.PyQt.QtCore import QLocale
from qgis.PyQt.QtWidgets import QDockWidget
Expand All @@ -22,7 +24,6 @@
connections_list,
)
from pg_metadata.qgis_plugin_tools.tools.i18n import tr
from pg_metadata.tools import icon_for_geometry_type

SCHEMA = 'pgmetadata'

Expand Down Expand Up @@ -98,7 +99,7 @@ def fetch_result_single_database(self, search: str, connection_name: str):
result = QgsLocatorResult()
result.filter = self
result.displayString = item[0]
result.icon = icon_for_geometry_type(item[3])
result.icon = QgsIconUtils.iconForWkbType(QgsWkbTypes.parseType(item[3]))
result.userData = {
'name': item[4],
'connection': connection_name,
Expand Down
2 changes: 1 addition & 1 deletion pg_metadata/metadata.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[general]
name=PgMetadata
qgisMinimumVersion=3.16
qgisMinimumVersion=3.22
description=Store some metadata about layers which are stored in PostgreSQL. It's possible to define title, abstract, links, contacts etc. It also provides some search tool, in the QGIS Locator bar for instance.
author=3Liz
[email protected]
Expand Down
Loading