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

Fix down migrations #85

Open
galbwe opened this issue Aug 10, 2021 · 0 comments
Open

Fix down migrations #85

galbwe opened this issue Aug 10, 2021 · 0 comments
Labels
backend bug Something isn't working

Comments

@galbwe
Copy link
Collaborator

galbwe commented Aug 10, 2021

From the head migration, run alembic downgrade 2021_05_04.

Output:

INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO  [alembic.runtime.migration] Will assume transactional DDL.
INFO  [alembic.runtime.migration] Running downgrade dc0ca6997b4d -> 9d857b23b162, Database for CNP
INFO  [alembic.runtime.migration] Running downgrade 9d857b23b162 -> 3d9074e4b65e, add assigned column
Traceback (most recent call last):
  File "/Users/wes/projects/partner-finder/backend/venv/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1763, in _execute_context
    self.dialect.do_execute(
  File "/Users/wes/projects/partner-finder/backend/venv/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 717, in do_execute
    cursor.execute(statement, parameters)
psycopg2.errors.UndefinedColumn: column "assigned" of relation "leads" does not exist
...
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedColumn) column "assigned" of relation "leads" does not exist

[SQL: 
        ALTER TABLE leads
        DROP COLUMN assigned;
        ]
(Background on this error at: http://sqlalche.me/e/14/f405)
@galbwe galbwe added bug Something isn't working backend labels Aug 10, 2021
@galbwe galbwe added the Hacktoberfest Hacktoberfest 2021 label Oct 1, 2021
@galbwe galbwe removed the Hacktoberfest Hacktoberfest 2021 label Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant