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

could not open extension control zhparser.control #1

Open
luquitared opened this issue Aug 8, 2021 · 4 comments
Open

could not open extension control zhparser.control #1

luquitared opened this issue Aug 8, 2021 · 4 comments

Comments

@luquitared
Copy link

luquitared commented Aug 8, 2021

Hi. Cool project. Great work so far!

I am trying to get the app to run locally.

I've run "supabase start" in the root after running "supabase init". Works fine.

After, I do a migration to seed the DB:
npx prisma migrate dev --name init

I receive this error:

Error: P3006

Migration `20210429025219_init` failed to apply cleanly to the shadow database.
Error:
Database error
Error querying the database: db error: ERROR: could not open extension control file "/usr/share/postgresql/12/extension/zhparser.control": No such file or directory
   0: sql_migration_connector::flavour::postgres::sql_schema_from_migration_history
             at migration-engine/connectors/sql-migration-connector/src/flavour/postgres.rs:375
   1: sql_migration_connector::validate_migrations
             at migration-engine/connectors/sql-migration-connector/src/lib.rs:323
   2: migration_core::api::DevDiagnostic
             at migration-engine/core/src/api.rs:89

I am also running "docker-compose up" in a different terminal. Seems there is something wrong there as well as I get:

keeplink    | Error: P1001: Can't reach database server at `localhost`:`5432`
keeplink    |
keeplink    | Please make sure your database server is running at `localhost`:`5432`.

I have a feeling I am not running the docker stuff correctly for local development. Any suggestions?

@fengkx
Copy link
Owner

fengkx commented Aug 9, 2021

would you like to try npx prisma migrate deploy to see whether it throw any error.
It may have something related to the shadow database created by prisma check out this link: https://www.prisma.io/docs/concepts/components/prisma-migrate/shadow-database#cloud-hosted-shadow-databases-must-be-created-manually

The supabase in this project is eject to docker folder. You may need to check whether supabase update its setup and cause this error. I would like to keep it ejected until supabase supoort workflow and RUM, zhparser extension.

@luquitared
Copy link
Author

Here is my output after running
npx prisma migrate deploy

output:

Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "postgres", schema "public" at "localhost:5432"

5 migrations found in prisma/migrations
Error: P3009

migrate found failed migrations in the target database, new migrations will not be applied. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve
The `20210429025219_init` migration started at 2021-08-08 03:32:10.642253 UTC failed with the following logs:

(says there is logs printed below but nothing shows up)

@fengkx
Copy link
Owner

fengkx commented Aug 10, 2021

Maybe you should create a clean db before running it.

@fengkx
Copy link
Owner

fengkx commented Aug 10, 2021

You can try the following step:

  • create shadow database as the link I have posted (prisma docs)
  • use docker

supabase init may have changed its configuration, you should check it.

Supabase is missing some extensions use ejected supabase in docker folder.

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

No branches or pull requests

2 participants