From 89a28ad22f08a62c506e9df7fdb65bbd188010be Mon Sep 17 00:00:00 2001 From: Jasper Siepkes Date: Tue, 23 Apr 2019 17:05:56 +0200 Subject: [PATCH] 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. --- edition/storage/postgresql.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edition/storage/postgresql.go b/edition/storage/postgresql.go index 4695bd51..71730a7a 100644 --- a/edition/storage/postgresql.go +++ b/edition/storage/postgresql.go @@ -244,7 +244,7 @@ func (p PostgreSQLProvider) QueryGetDatabaseVersionLegacy() string { func (p PostgreSQLProvider) QueryTableList() string { return fmt.Sprintf(`select table_name 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