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

pgcontents init issue #80

Open
hesiyuan opened this issue May 5, 2022 · 2 comments
Open

pgcontents init issue #80

hesiyuan opened this issue May 5, 2022 · 2 comments

Comments

@hesiyuan
Copy link

hesiyuan commented May 5, 2022

I'm seeing the following issue when running pgcontents init

sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedObject) constraint "directories_parent_user_id_fkey" of relation "directories" does not exist

[SQL: ALTER TABLE pgcontents.directories DROP CONSTRAINT directories_parent_user_id_fkey]

@gogasca
Copy link

gogasca commented Sep 18, 2022

Same issue. #74
Is not fixed yet.

Edit

pgcontents/alembic/versions/2d46c89138b0_.py
And comment out:

    # Drop the existing foreign key
    #op.drop_constraint(
    #    'directories_parent_user_id_fkey',
    #    'directories',
    #    type_='foreignkey',
    #    schema='pgcontents'
    #)

@hillarysanders
Copy link

hillarysanders commented Sep 18, 2024

Yeah #76 was supposed to fix this, but I'm also still encountering this error despite being on the most recent package version. (Though the ^^ above commenting trick fix works for me)

Edit: Ahhh so the issue was fixed, however as of now (Sep 2024), the pgcontents package that get installed when you run pip install pgcontents doesn't roll in the more recent updates. For that, try running

pip install git+https://github.com/quantopian/pgcontents.git

Doing this solved the issue for me.

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

3 participants