-
Notifications
You must be signed in to change notification settings - Fork 103
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
Fixes for using PostgreSQL #2467
Conversation
Created enum types should also be dropped on downgrade. Dropping tables must be committed to become visible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expect that his works. I can verify this again later when we have merged both to develop.
op.drop_table('messages') | ||
sa.Enum(name='messagetype').drop(op.get_bind(), checkfirst=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just looked into the model definition: "message_type"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The column that uses the type is called message_type
, but the enum type in the database is created with the name messagetype
. You can see that here:
MSS/mslib/mscolab/migrations/versions/92eaba86a92e_to_version_8_3_5_initial_migration.py
Line 61 in c602415
sa.Column('message_type', sa.Enum('TEXT', 'SYSTEM_MESSAGE', 'IMAGE', 'DOCUMENT', name='messagetype'), nullable=True), |
name='messagetype'
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it derives that name from simply lowercasing the class name of the enum defined here:
MSS/mslib/mscolab/message_type.py
Line 28 in c602415
class MessageType(enum.IntEnum): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is "message_type" please double check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, thx.
Created enum types should also be dropped on downgrade. Dropping tables must be committed to become visible.
Purpose of PR?:
Fixes #
Does this PR introduce a breaking change?
If the changes in this PR are manually verified, list down the scenarios covered::
Additional information for reviewer? :
Mention if this PR is part of any design or a continuation of previous PRs
Does this PR results in some Documentation changes?
If yes, include the list of Documentation changes
Checklist:
<type>: <subject>