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

db:fresh and db:wipe commands fail with PostGIS extension #820

Closed
brkn opened this issue Apr 5, 2022 · 4 comments · Fixed by #881
Closed

db:fresh and db:wipe commands fail with PostGIS extension #820

brkn opened this issue Apr 5, 2022 · 4 comments · Fixed by #881
Assignees

Comments

@brkn
Copy link
Contributor

brkn commented Apr 5, 2022

Package version

"@adonisjs/lucid": "^17.1.1",
"@adonisjs/core": "^5.6.2",
"@adonisjs/assembler": "^5.4.2",

"pg": "^8.7.3",

"knex-postgis": "^0.14.3",

Node.js and npm version

v16.1.0
7.11.2

Sample Code (to reproduce the issue)

  1. Add postGIS extension
CREATE extension if not exists postgis;
  1. Run node ace migration:fresh
❯ node ace migration:fresh

error: DROP table adonis_schema,adonis_schema_versions,api_tokens,app_configs,users CASCADE; -
cannot drop table spatial_ref_sys because extension postgis requires it


1 Parser.parseErrorMessage
  /node_modules/pg-protocol/src/parser.ts:369

2 Parser.handlePacket
  /node_modules/pg-protocol/src/parser.ts:188

3 Parser.parse
  /node_modules/pg-protocol/src/parser.ts:103

4 anonymous
  /node_modules/pg-protocol/src/index.ts:7
@brkn
Copy link
Contributor Author

brkn commented Apr 5, 2022

Rails have ignore_tables to solve this issue I think. A similar solution can be implemented maybe.

[0] https://stackoverflow.com/questions/40882420/rails-postgis-error-cannot-drop-table-spatial-ref-sys

@thetutlage thetutlage self-assigned this Apr 30, 2022
@thetutlage
Copy link
Member

Thanks for reporting. I will do some reading on this 👍

@stale
Copy link

stale bot commented Jul 10, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Abandoned Dropped and not into consideration label Jul 10, 2022
@thetutlage
Copy link
Member

@Julien-R44 Any plans to tackling this issue?

@stale stale bot removed the Status: Abandoned Dropped and not into consideration label Jul 11, 2022
@Julien-R44 Julien-R44 reopened this Sep 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants