-
Notifications
You must be signed in to change notification settings - Fork 40
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
Error on "alembic upgrade head" #51
Comments
Got a different error when attempting the
|
Ah, I was too fast with reporting this issue. The user in postgres was not "superuser". When associating the user with this role, the Python 3.5 command completed without issues. |
Hm. There's no mention about the "superuser" role in the Stalker docs on "Installing a database". Should the stalker db owner have this role set at all times? |
Figured I'd quickly mention that the upgrade of the database doesn't work in Python 2.7 even if my user has the "superuser" role. Here, I'm still seeing the ImportError for add_exclude_constraint. |
Could you be importing the wrong Stalker version. I mean it seams to me that the alembic script is trying to import File "c:\users\iruser\skalman\condaenvs\skalman_py27\lib\site-packages\alembic\runtime\migration.py", line 312, in run_migrations
...
File "C:\Users\iruser\code\repos\stalker\alembic\versions\31b1e22b455e_added_exclude_and_check_constraints_to_.py", line 121, in upgrade |
Probably, yes. Now when I reinstalled everything and retried this it all worked just fine without issues. |
@eoyilmaz about the "superuser" role. Does your database owner (user) have this role? |
Yes my database user has superuser role, and as you've said it is probably necessary only during the upgrade. |
I wonder if that's really the case. I believe you actually need the supervisor role in order restore a backed up database (as in backed up via I feel this is something which should be in the docs. I'm now setting my stalker db user to have this supervisor role since I'm unsure how this role works. |
SQLdump doesn't require your user to be a superuser.
On Mar 22, 2017 12:18 PM, "Fredrik Averpil" <notifications@github.com> wrote:
it is probably necessary only during the upgrade.
I wonder if that's really the case. I believe you actually need the
supervisor role in order restore a backed up database (as in backed up via
pg_dump). Perhaps it's even required in order to perform the SQL dump
(backup) itself.
I feel this is something which should be in the docs. I'm now setting my
stalker db user to have this supervisor role since I'm unsure how this role
works.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#51 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABtDtO4TRDJIFJl1rcP_R4_xOozBwH2Nks5roOdjgaJpZM4MbRzT>
.
|
Ok. Do you know why this role must be enabled during an alembic upgrade of the db? |
because Alembic upgrade changes the database schema, it is not like dumping
the data with sqldump which is a read-only task.
Erkan Ozgur Yilmaz
…On Fri, Mar 24, 2017 at 10:07 AM, Fredrik Averpil ***@***.***> wrote:
Ok. Do you know why this role must be enabled during an alembic upgrade of
the db?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#51 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABtDtPliz-zA-diX5brEPxUR_D4l4-eYks5ro2u3gaJpZM4MbRzT>
.
|
Ok, thanks for clarifying! :) |
I'm closing this. |
I ran
alembic.exe upgrade head
from my Python 3.5 installation on my Windows machine and I got this error:The text was updated successfully, but these errors were encountered: