我用手机teamviewe监视我的云服务器,为什么电脑必须先远程登入后手机才能连接的上,要是电脑退出远程。手机reamviewer就没办法监视会自动断开。要如何设置才可以手机上直接监视云服务器?
添加约束:
def upgrade():
op.add_column('my_table', sa.Column('my_column', sa.String()))
op.execute('UPDATE my_table SET my_column=my_other_column')
op.alter_column('my_table', 'my_column', nullable=False)
op.add_column('mytable', sa.Column(
'mycolumn',
sa.String(),
nullable=False,
server_default='lorem ipsum', # <--- add this
))
例如你的upgrade()
职能是:
def upgrade():
op.add_column('mytable', sa.Column('mycolumn', sa.String(), nullable=False, server_default='lorem ipsum'))
op.alter_column('mytable', 'mycolumn', server_default=None)