sqlalchemy.dialects.mysql.MEDIUMTEXT - python examples

Here are the examples of the python api sqlalchemy.dialects.mysql.MEDIUMTEXT taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

30 Examples 7

3 View Complete Implementation : 4430bb0ac79d_add_modaction_model.py
Copyright MIT License
Author : mitmedialab
def upgrade_development():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('mod_actions',
    sa.Column('id', sa.String(length=256), autoincrement=False, nullable=False),
    sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.Column('created_utc', sa.DateTime(), nullable=True),
    sa.Column('subreddit_id', sa.String(length=32), nullable=True),
    sa.Column('mod', sa.String(length=64), nullable=True),
    sa.Column('target_author', sa.String(length=64), nullable=True),
    sa.Column('action', sa.String(length=256), nullable=True),
    sa.Column('target_fullname', sa.String(length=256), nullable=True),
    sa.Column('action_data', mysql.MEDIUMTEXT(), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('id')
    )
    op.create_index(op.f('ix_mod_actions_subreddit_id'), 'mod_actions', ['subreddit_id'], unique=False)
    op.create_index(op.f('ix_mod_actions_target_author'), 'mod_actions', ['target_author'], unique=False)

3 View Complete Implementation : 4430bb0ac79d_add_modaction_model.py
Copyright MIT License
Author : mitmedialab
def upgrade_test():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('mod_actions',
    sa.Column('id', sa.String(length=256), autoincrement=False, nullable=False),
    sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.Column('created_utc', sa.DateTime(), nullable=True),
    sa.Column('subreddit_id', sa.String(length=32), nullable=True),
    sa.Column('mod', sa.String(length=64), nullable=True),
    sa.Column('target_author', sa.String(length=64), nullable=True),
    sa.Column('action', sa.String(length=256), nullable=True),
    sa.Column('target_fullname', sa.String(length=256), nullable=True),
    sa.Column('action_data', mysql.MEDIUMTEXT(), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('id')
    )
    op.create_index(op.f('ix_mod_actions_subreddit_id'), 'mod_actions', ['subreddit_id'], unique=False)
    op.create_index(op.f('ix_mod_actions_target_author'), 'mod_actions', ['target_author'], unique=False)

3 View Complete Implementation : 4430bb0ac79d_add_modaction_model.py
Copyright MIT License
Author : mitmedialab
def upgrade_production():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('mod_actions',
    sa.Column('id', sa.String(length=256), autoincrement=False, nullable=False),
    sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.Column('created_utc', sa.DateTime(), nullable=True),
    sa.Column('subreddit_id', sa.String(length=32), nullable=True),
    sa.Column('mod', sa.String(length=64), nullable=True),
    sa.Column('target_author', sa.String(length=64), nullable=True),
    sa.Column('action', sa.String(length=256), nullable=True),
    sa.Column('target_fullname', sa.String(length=256), nullable=True),
    sa.Column('action_data', mysql.MEDIUMTEXT(), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('id')
    )
    op.create_index(op.f('ix_mod_actions_subreddit_id'), 'mod_actions', ['subreddit_id'], unique=False)
    op.create_index(op.f('ix_mod_actions_target_author'), 'mod_actions', ['target_author'], unique=False)

3 View Complete Implementation : 4d46b88366fc_added_table_for_front_pages.py
Copyright MIT License
Author : mitmedialab
def upgrade_development():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('front_pages',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.Column('page_data', mysql.MEDIUMTEXT(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )

3 View Complete Implementation : 4d46b88366fc_added_table_for_front_pages.py
Copyright MIT License
Author : mitmedialab
def upgrade_test():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('front_pages',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.Column('page_data', mysql.MEDIUMTEXT(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )

3 View Complete Implementation : 4d46b88366fc_added_table_for_front_pages.py
Copyright MIT License
Author : mitmedialab
def upgrade_production():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('front_pages',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.Column('page_data', mysql.MEDIUMTEXT(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )

3 View Complete Implementation : 66a893890997_add_user_table.py
Copyright MIT License
Author : mitmedialab
def upgrade_development():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('users',
    sa.Column('name', sa.String(length=32), autoincrement=False, nullable=False),
    sa.Column('id', sa.String(length=32), nullable=True),
    sa.Column('created', sa.DateTime(), nullable=True),
    sa.Column('first_seen', sa.DateTime(), nullable=True),
    sa.Column('last_seen', sa.DateTime(), nullable=True),
    sa.Column('user_data', mysql.MEDIUMTEXT(), nullable=True),
    sa.PrimaryKeyConstraint('name'),
    sa.UniqueConstraint('name')
    )
    # removed to fix merge conflict
    #op.add_column('posts', sa.Column('created_at', sa.DateTime(), nullable=True))
#    op.drop_index('posts_ibfk_1', table_name='posts')
    op.add_column('subreddits', sa.Column('created_at', sa.DateTime(), nullable=True))

3 View Complete Implementation : 66a893890997_add_user_table.py
Copyright MIT License
Author : mitmedialab
def upgrade_test():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('users',
    sa.Column('name', sa.String(length=32), autoincrement=False, nullable=False),
    sa.Column('id', sa.String(length=32), nullable=True),
    sa.Column('created', sa.DateTime(), nullable=True),
    sa.Column('first_seen', sa.DateTime(), nullable=True),
    sa.Column('last_seen', sa.DateTime(), nullable=True),
    sa.Column('user_data', mysql.MEDIUMTEXT(), nullable=True),
    sa.PrimaryKeyConstraint('name'),
    sa.UniqueConstraint('name')
    )
    # removed to fix merge conflict
    #op.add_column('posts', sa.Column('created_at', sa.DateTime(), nullable=True))
#    op.drop_index('posts_ibfk_1', table_name='posts')
    op.add_column('subreddits', sa.Column('created_at', sa.DateTime(), nullable=True))

3 View Complete Implementation : 66a893890997_add_user_table.py
Copyright MIT License
Author : mitmedialab
def upgrade_production():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('users',
    sa.Column('name', sa.String(length=32), autoincrement=False, nullable=False),
    sa.Column('id', sa.String(length=32), nullable=True),
    sa.Column('created', sa.DateTime(), nullable=True),
    sa.Column('first_seen', sa.DateTime(), nullable=True),
    sa.Column('last_seen', sa.DateTime(), nullable=True),
    sa.Column('user_data', mysql.MEDIUMTEXT(), nullable=True),
    sa.PrimaryKeyConstraint('name'),
    sa.UniqueConstraint('name')
    )
    # removed to fix merge conflict
    #op.add_column('posts', sa.Column('created_at', sa.DateTime(), nullable=True))
#    op.drop_index('posts_ibfk_1', table_name='posts')
    op.add_column('subreddits', sa.Column('created_at', sa.DateTime(), nullable=True))

3 View Complete Implementation : a0f4fda7588f_add_model_for_snapshots_of_.py
Copyright MIT License
Author : mitmedialab
def upgrade_development():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('experiment_thing_snapshots',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('experiment_thing_id', sa.String(length=256), nullable=True),
    sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.Column('object_type', sa.Integer(), nullable=True),
    sa.Column('experiment_id', sa.Integer(), nullable=True),
    sa.Column('metadata_json', mysql.MEDIUMTEXT(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_experiment_thing_snapshots_experiment_id'), 'experiment_thing_snapshots', ['experiment_id'], unique=False)
    op.create_index(op.f('ix_experiment_thing_snapshots_experiment_thing_id'), 'experiment_thing_snapshots', ['experiment_thing_id'], unique=False)