Python sqlalchemy 模块,Time() 实例源码

我们从Python开源项目中,提取了以下3个代码示例,用于说明如何使用sqlalchemy.Time()

项目:CTPU    作者:SimmyD    | 项目源码 | 文件源码
def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('event', sa.Column('finishTime', sa.Time(), nullable=True))
    op.add_column('event', sa.Column('startTime', sa.Time(), nullable=True))
    # ### end Alembic commands ###
项目:auto-aggregator    作者:milindl    | 项目源码 | 文件源码
def __str__(self):
        '''
        Method for pretty printing
        '''
        return '\n'.join(['Content: ' + str(self.content),
                          'Author: ' + str(self.author),
                          'Posting Date: ' + str(self.posting_date),
                          'To: ' + str(self.to),
                          'From: ' + str(self.frm),
                          'Time: ' + str(self.time),
                          'Date: ' + str(self.date),
                          'PostId: ' + str(self.post_id)
                          ])
项目:watchlist    作者:mbuthiya    | 项目源码 | 文件源码
def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('reviews',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('movie_id', sa.Integer(), nullable=True),
    sa.Column('movie_title', sa.String(), nullable=True),
    sa.Column('image_path', sa.String(), nullable=True),
    sa.Column('movie_review', sa.String(), nullable=True),
    sa.Column('posted', sa.Time(), nullable=True),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###