Skip to content
This repository has been archived by the owner on Jun 15, 2021. It is now read-only.

Commit

Permalink
added message_profile join column
Browse files Browse the repository at this point in the history
  • Loading branch information
miltontony committed Jun 30, 2014
1 parent 38ef2ea commit 6e28ebf
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions mamasbm/mamasbm/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,6 @@ class MessageProfile(Base):
class Message(Base):
__tablename__ = 'messages'
uuid = Column('uuid', UUID(), primary_key=True, default=uuid.uuid4)
message_profile_id = Column(Integer, ForeignKey('message_profiles.uuid'))
week = Column(Integer)
text = Column(Text)
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
"""add message_profile join field
Revision ID: 1c89d076746b
Revises: 18b7e31bc9ed
Create Date: 2014-06-30 14:58:32.839354
"""

# revision identifiers, used by Alembic.
revision = '1c89d076746b'
down_revision = '18b7e31bc9ed'

from alembic import op
import sqlalchemy as sa


def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.add_column('messages', sa.Column('message_profile_id', sa.Integer(), nullable=True))
### end Alembic commands ###


def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_column('messages', 'message_profile_id')
### end Alembic commands ###

0 comments on commit 6e28ebf

Please sign in to comment.