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

Allow for alternate names to be created besides "parcels" #77

Open
glw opened this issue Jan 6, 2021 · 1 comment
Open

Allow for alternate names to be created besides "parcels" #77

glw opened this issue Jan 6, 2021 · 1 comment

Comments

@glw
Copy link

glw commented Jan 6, 2021

Hi I was attempting to use this tool to digitize legal boundaries of things other than parcels. The issue Im having though, is that I already have a table in public named parcels. Would it be possible to have an option to change the name of the table being created?

An error has occurred while executing Python code:

psycopg2.errors.DuplicateTable: relation "parcels" already exists 
Traceback (most recent call last):
  File "/home/user/.local/share/QGIS/QGIS3/profiles/default/python/plugins/parcel_plugin/cogo_dialogs.py", line 239, in test_database_connection
    ok = self.test_database_schema()
  File "/home/user/.local/share/QGIS/QGIS3/profiles/default/python/plugins/parcel_plugin/cogo_dialogs.py", line 326, in test_database_schema
    cursor.execute(db_sql)
psycopg2.errors.DuplicateTable: relation "parcels" already exists

Python version: 3.5.2 (default, Oct 7 2020, 17:19:02) [GCC 5.4.0 20160609]
QGIS version: 3.4.15-Madeira Madeira, e83d02e274

@NyakudyaA
Copy link
Contributor

@glw During initialization the plugin creates some tables using a database script. You could try to change the name of the parcels view in the setup script. Just be mindful that there are other views that might be a join between the parcels and other tables

For now I think renaming your table would be a better option.

I think a safer enhancement would be to allow the option for the tables to be created in a schema other than public

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants