11"""empty message
22
3- Revision ID: b25fcdb3cfcc
3+ Revision ID: 9e7208e2f6e8
44Revises:
5- Create Date: 2019-07-19 21:28:12.190440
5+ Create Date: 2019-07-22 11:02:10.139072
66
77"""
88from alembic import op
99import sqlalchemy as sa
1010
1111
1212# revision identifiers, used by Alembic.
13- revision = 'b25fcdb3cfcc '
13+ revision = '9e7208e2f6e8 '
1414down_revision = None
1515branch_labels = None
1616depends_on = None
@@ -25,13 +25,16 @@ def upgrade():
2525 sa .Column ('password' , sa .String (length = 255 ), nullable = False ),
2626 sa .Column ('created' , sa .TIMESTAMP (), server_default = sa .text ('CURRENT_TIMESTAMP' ), nullable = False ),
2727 sa .PrimaryKeyConstraint ('id' ),
28- sa .UniqueConstraint ('email ' ),
28+ sa .UniqueConstraint ('name ' ),
2929 mysql_collate = 'utf8_general_ci'
3030 )
31- op .create_table ('teams ' ,
31+ op .create_table ('posts ' ,
3232 sa .Column ('id' , sa .Integer (), nullable = False ),
33- sa .Column ('name' , sa .String (length = 255 ), nullable = False ),
3433 sa .Column ('author_id' , sa .Integer (), nullable = True ),
34+ sa .Column ('name' , sa .String (length = 255 ), nullable = False ),
35+ sa .Column ('title' , sa .String (length = 255 ), nullable = False ),
36+ sa .Column ('body' , sa .String (length = 1024 ), nullable = False ),
37+ sa .Column ('created' , sa .TIMESTAMP (), server_default = sa .text ('CURRENT_TIMESTAMP' ), nullable = False ),
3538 sa .ForeignKeyConstraint (['author_id' ], ['users.id' ], ),
3639 sa .PrimaryKeyConstraint ('id' ),
3740 mysql_collate = 'utf8_general_ci'
@@ -41,6 +44,6 @@ def upgrade():
4144
4245def downgrade ():
4346 # ### commands auto generated by Alembic - please adjust! ###
44- op .drop_table ('teams ' )
47+ op .drop_table ('posts ' )
4548 op .drop_table ('users' )
4649 # ### end Alembic commands ###
0 commit comments