notum-cz / strapi-plugin-location

This plugin allows users to create location inputs and store latitude and longitude values as geometry types in a PostGIS database. It also provides functionality to filter items based on their location.
MIT License
26 stars 13 forks source link

Cannot use a custom database schema name #14

Closed Chralu closed 11 months ago

Chralu commented 1 year ago

Bug report

Describe the bug

Using Postgres 15.3, with a schema different from the default one (public), location fields cannot be created.

This error doesn't seem to happen when using the default public schema.

Steps to reproduce the behavior

  1. On your Postgres instance, create a new schema ( CREATE SCHEMA IF NOT EXISTS strapi;)
  2. Setup Strapi to use that schema.
  3. Add the strapi-plugin-location plugin to Strapi
  4. In the Content-Type builder, create a type with a location field
  5. apply changes

Expected behavior

Strapi restarts and the database is updated

Actual behavior

Strapi restart fails with the following error :

error: 
              ALTER TABLE user_profiles
              ADD COLUMN address_geopoint_geom GEOMETRY(Point, 4326);
             - relation "user_profiles" does not exist
omikulcik commented 1 year ago

Hi @Chralu, I was unfortunately unable to reproduce this bug. I followed the steps you have provided and everything went through just fine. Please, see the screenshot attached.

image

Have you used Postgres with the Postgis extension?

omikulcik commented 1 year ago

@Chralu, do you please have any updates on this or can I close this issue?

omikulcik commented 11 months ago

Closed for inactivity