Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

flask db upgrade add new not nullable column

op.add_column('mytable', sa.Column(
    'mycolumn', 
    sa.String(), 
    nullable=False, 
    server_default='lorem ipsum', #  <---  add this
))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #flask #db #upgrade #add #nullable #column
ADD COMMENT
Topic
Name
6+1 =