1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-21 14:19:43 +02:00

Ignore PostGIS when determining if PostgreSQL is empty

If the PostGIS extension is installed in PostgreSQL the
'spatial_ref_sys' will automatically have been installed in the public
schema. Documize would see this table and incorrectly assume it
shouldn't enter setup mode.
This commit is contained in:
Jasper Siepkes 2019-04-23 17:05:56 +02:00
parent 8e4ad6422b
commit 89a28ad22f
No known key found for this signature in database
GPG key ID: 26561247092EC4D2

View file

@ -244,7 +244,7 @@ func (p PostgreSQLProvider) QueryGetDatabaseVersionLegacy() string {
func (p PostgreSQLProvider) QueryTableList() string { func (p PostgreSQLProvider) QueryTableList() string {
return fmt.Sprintf(`select table_name return fmt.Sprintf(`select table_name
FROM information_schema.tables FROM information_schema.tables
WHERE table_type='BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') AND table_catalog='%s'`, p.DatabaseName()) WHERE table_type='BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema') AND table_name != 'spatial_ref_sys' AND table_catalog='%s'`, p.DatabaseName())
} }
// QueryDateInterval returns provider specific interval style // QueryDateInterval returns provider specific interval style