Python sqlalchemy.dialects.mysql.MEDIUMTEXT Examples
The following are 30
code examples of sqlalchemy.dialects.mysql.MEDIUMTEXT().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
sqlalchemy.dialects.mysql
, or try the search function
.
Example #1
Source File: 4430bb0ac79d_add_modaction_model.py From CivilServant with MIT License | 6 votes |
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) ### end Alembic commands ###
Example #2
Source File: 4430bb0ac79d_add_modaction_model.py From CivilServant with MIT License | 6 votes |
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) ### end Alembic commands ###
Example #3
Source File: 4430bb0ac79d_add_modaction_model.py From CivilServant with MIT License | 6 votes |
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) ### end Alembic commands ###
Example #4
Source File: a0cca001e8a7_added_message_log.py From CivilServant with MIT License | 6 votes |
def upgrade_test(): # ### commands auto generated by Alembic - please adjust! ### op.create_table('message_logs', sa.Column('id', sa.Integer(), nullable=False), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('message_sent', sa.Boolean(), nullable=True), sa.Column('message_failure_reason', sa.String(length=63), nullable=True), sa.Column('platform', sa.String(length=64), nullable=True), sa.Column('username', sa.String(length=256), nullable=True), sa.Column('subject', sa.String(length=256), nullable=True), sa.Column('message_task_id', sa.String(length=256), nullable=True), sa.Column('body', mysql.MEDIUMTEXT(), nullable=True), sa.Column('metadata_json', mysql.MEDIUMTEXT(), nullable=True), sa.PrimaryKeyConstraint('id') ) op.create_index(op.f('ix_message_logs_created_at'), 'message_logs', ['created_at'], unique=False) op.create_index(op.f('ix_message_logs_message_task_id'), 'message_logs', ['message_task_id'], unique=False) op.create_index(op.f('ix_message_logs_platform'), 'message_logs', ['platform'], unique=False) op.create_index(op.f('ix_message_logs_username'), 'message_logs', ['username'], unique=False) op.drop_index('ix_mod_actions_created_utc_index', table_name='mod_actions') # ### end Alembic commands ###
Example #5
Source File: a0cca001e8a7_added_message_log.py From CivilServant with MIT License | 6 votes |
def upgrade_development(): # ### commands auto generated by Alembic - please adjust! ### op.create_table('message_logs', sa.Column('id', sa.Integer(), nullable=False), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('message_sent', sa.Boolean(), nullable=True), sa.Column('message_failure_reason', sa.String(length=63), nullable=True), sa.Column('platform', sa.String(length=64), nullable=True), sa.Column('username', sa.String(length=256), nullable=True), sa.Column('subject', sa.String(length=256), nullable=True), sa.Column('message_task_id', sa.String(length=256), nullable=True), sa.Column('body', mysql.MEDIUMTEXT(), nullable=True), sa.Column('metadata_json', mysql.MEDIUMTEXT(), nullable=True), sa.PrimaryKeyConstraint('id') ) op.create_index(op.f('ix_message_logs_created_at'), 'message_logs', ['created_at'], unique=False) op.create_index(op.f('ix_message_logs_message_task_id'), 'message_logs', ['message_task_id'], unique=False) op.create_index(op.f('ix_message_logs_platform'), 'message_logs', ['platform'], unique=False) op.create_index(op.f('ix_message_logs_username'), 'message_logs', ['username'], unique=False) op.drop_index('ix_mod_actions_created_utc_index', table_name='mod_actions') # ### end Alembic commands ###
Example #6
Source File: e06fa0a86214_added_comment_model.py From CivilServant with MIT License | 6 votes |
def upgrade_production(): ### commands auto generated by Alembic - please adjust! ### op.create_table('comments', 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('post_id', sa.String(length=32), nullable=True), sa.Column('user_id', sa.String(length=64), nullable=True), sa.Column('comment_data', mysql.MEDIUMTEXT(), nullable=True), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('id') ) op.create_index(op.f('ix_comments_post_id'), 'comments', ['post_id'], unique=False) op.create_index(op.f('ix_comments_subreddit_id'), 'comments', ['subreddit_id'], unique=False) op.create_index(op.f('ix_comments_user_id'), 'comments', ['user_id'], unique=False) ### end Alembic commands ###
Example #7
Source File: c71e52b908e6_create_extensions.py From ok with Apache License 2.0 | 6 votes |
def upgrade(): # ### commands auto generated by Alembic - please adjust! ### op.create_table('extension', sa.Column('created', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=False), sa.Column('id', sa.Integer(), nullable=False), sa.Column('staff_id', sa.Integer(), nullable=False), sa.Column('assignment_id', sa.Integer(), nullable=False), sa.Column('user_id', sa.Integer(), nullable=False), sa.Column('message', mysql.MEDIUMTEXT(), nullable=True), sa.Column('expires', sa.DateTime(timezone=True), nullable=True), sa.Column('custom_submission_time', sa.DateTime(timezone=True), nullable=True), sa.ForeignKeyConstraint(['assignment_id'], ['assignment.id'], name=op.f('fk_extension_assignment_id_assignment')), sa.ForeignKeyConstraint(['staff_id'], ['user.id'], name=op.f('fk_extension_staff_id_user')), sa.ForeignKeyConstraint(['user_id'], ['user.id'], name=op.f('fk_extension_user_id_user')), sa.PrimaryKeyConstraint('id', name=op.f('pk_extension')), sa.UniqueConstraint('assignment_id', 'user_id', name=op.f('uq_extension_assignment_id_user_id')) ) # ### end Alembic commands ###
Example #8
Source File: e06fa0a86214_added_comment_model.py From CivilServant with MIT License | 6 votes |
def upgrade_test(): ### commands auto generated by Alembic - please adjust! ### op.create_table('comments', 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('post_id', sa.String(length=32), nullable=True), sa.Column('user_id', sa.String(length=64), nullable=True), sa.Column('comment_data', mysql.MEDIUMTEXT(), nullable=True), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('id') ) op.create_index(op.f('ix_comments_post_id'), 'comments', ['post_id'], unique=False) op.create_index(op.f('ix_comments_subreddit_id'), 'comments', ['subreddit_id'], unique=False) op.create_index(op.f('ix_comments_user_id'), 'comments', ['user_id'], unique=False) ### end Alembic commands ###
Example #9
Source File: e06fa0a86214_added_comment_model.py From CivilServant with MIT License | 6 votes |
def upgrade_development(): ### commands auto generated by Alembic - please adjust! ### op.create_table('comments', 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('post_id', sa.String(length=32), nullable=True), sa.Column('user_id', sa.String(length=64), nullable=True), sa.Column('comment_data', mysql.MEDIUMTEXT(), nullable=True), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('id') ) op.create_index(op.f('ix_comments_post_id'), 'comments', ['post_id'], unique=False) op.create_index(op.f('ix_comments_subreddit_id'), 'comments', ['subreddit_id'], unique=False) op.create_index(op.f('ix_comments_user_id'), 'comments', ['user_id'], unique=False) ### end Alembic commands ###
Example #10
Source File: aae7a3158d13_added_comment_archive_table_to_split_.py From CivilServant with MIT License | 6 votes |
def upgrade_production(): ### commands auto generated by Alembic - please adjust! ### op.create_table('archived_comments', 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('post_id', sa.String(length=32), nullable=True), sa.Column('user_id', sa.String(length=64), nullable=True), sa.Column('comment_data', mysql.MEDIUMTEXT(), nullable=True), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('id') ) op.create_index(op.f('ix_archived_comments_created_at'), 'archived_comments', ['created_at'], unique=False) op.create_index(op.f('ix_archived_comments_post_id'), 'archived_comments', ['post_id'], unique=False) op.create_index(op.f('ix_archived_comments_subreddit_id'), 'archived_comments', ['subreddit_id'], unique=False) op.create_index(op.f('ix_archived_comments_user_id'), 'archived_comments', ['user_id'], unique=False) ### end Alembic commands ###
Example #11
Source File: aae7a3158d13_added_comment_archive_table_to_split_.py From CivilServant with MIT License | 6 votes |
def upgrade_test(): ### commands auto generated by Alembic - please adjust! ### op.create_table('archived_comments', 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('post_id', sa.String(length=32), nullable=True), sa.Column('user_id', sa.String(length=64), nullable=True), sa.Column('comment_data', mysql.MEDIUMTEXT(), nullable=True), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('id') ) op.create_index(op.f('ix_archived_comments_created_at'), 'archived_comments', ['created_at'], unique=False) op.create_index(op.f('ix_archived_comments_post_id'), 'archived_comments', ['post_id'], unique=False) op.create_index(op.f('ix_archived_comments_subreddit_id'), 'archived_comments', ['subreddit_id'], unique=False) op.create_index(op.f('ix_archived_comments_user_id'), 'archived_comments', ['user_id'], unique=False) ### end Alembic commands ###
Example #12
Source File: 66a893890997_add_user_table.py From CivilServant with MIT License | 6 votes |
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)) ### end Alembic commands ###
Example #13
Source File: 66a893890997_add_user_table.py From CivilServant with MIT License | 6 votes |
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)) ### end Alembic commands ###
Example #14
Source File: aae7a3158d13_added_comment_archive_table_to_split_.py From CivilServant with MIT License | 6 votes |
def upgrade_development(): ### commands auto generated by Alembic - please adjust! ### op.create_table('archived_comments', 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('post_id', sa.String(length=32), nullable=True), sa.Column('user_id', sa.String(length=64), nullable=True), sa.Column('comment_data', mysql.MEDIUMTEXT(), nullable=True), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('id') ) op.create_index(op.f('ix_archived_comments_created_at'), 'archived_comments', ['created_at'], unique=False) op.create_index(op.f('ix_archived_comments_post_id'), 'archived_comments', ['post_id'], unique=False) op.create_index(op.f('ix_archived_comments_subreddit_id'), 'archived_comments', ['subreddit_id'], unique=False) op.create_index(op.f('ix_archived_comments_user_id'), 'archived_comments', ['user_id'], unique=False) ### end Alembic commands ###
Example #15
Source File: 4d46b88366fc_added_table_for_front_pages.py From CivilServant with MIT License | 5 votes |
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') ) ### end Alembic commands ###
Example #16
Source File: 4d46b88366fc_added_table_for_front_pages.py From CivilServant with MIT License | 5 votes |
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') ) ### end Alembic commands ###
Example #17
Source File: d2ae31099d61_increase_text_size_for_mysql.py From airflow with Apache License 2.0 | 5 votes |
def upgrade(): # noqa: D103 if context.config.get_main_option('sqlalchemy.url').startswith('mysql'): op.alter_column(table_name='variable', column_name='val', type_=mysql.MEDIUMTEXT)
Example #18
Source File: edc5377c32c7_adding_subreddit_page_and_post_tables.py From CivilServant with MIT License | 5 votes |
def upgrade_development(): ### commands auto generated by Alembic - please adjust! ### op.create_table('subreddit_pages', sa.Column('id', sa.Integer(), nullable=False), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('page_type', sa.Integer(), nullable=True), sa.Column('page_data', mysql.MEDIUMTEXT(), nullable=True), sa.PrimaryKeyConstraint('id') ) op.create_table('subreddits', sa.Column('id', sa.String(length=32), autoincrement=False, nullable=False), sa.Column('name', sa.String(length=32), nullable=True), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('id') ) op.create_table('posts', sa.Column('id', sa.String(length=32), autoincrement=False, nullable=False), sa.Column('subreddit_id', sa.String(length=32), nullable=True), sa.Column('created', sa.DateTime(), nullable=True), sa.Column('post_data', mysql.MEDIUMTEXT(), nullable=True), sa.ForeignKeyConstraint(['subreddit_id'], ['subreddits.id'], ), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('id') ) op.add_column('front_pages', sa.Column('page_type', sa.Integer(), nullable=True)) ### end Alembic commands ###
Example #19
Source File: edc5377c32c7_adding_subreddit_page_and_post_tables.py From CivilServant with MIT License | 5 votes |
def upgrade_test(): ### commands auto generated by Alembic - please adjust! ### op.create_table('subreddit_pages', sa.Column('id', sa.Integer(), nullable=False), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('page_type', sa.Integer(), nullable=True), sa.Column('page_data', mysql.MEDIUMTEXT(), nullable=True), sa.PrimaryKeyConstraint('id') ) op.create_table('subreddits', sa.Column('id', sa.String(length=32), autoincrement=False, nullable=False), sa.Column('name', sa.String(length=32), nullable=True), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('id') ) op.create_table('posts', sa.Column('id', sa.String(length=32), autoincrement=False, nullable=False), sa.Column('subreddit_id', sa.String(length=32), nullable=True), sa.Column('created', sa.DateTime(), nullable=True), sa.Column('post_data', mysql.MEDIUMTEXT(), nullable=True), sa.ForeignKeyConstraint(['subreddit_id'], ['subreddits.id'], ), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('id') ) op.add_column('front_pages', sa.Column('page_type', sa.Integer(), nullable=True)) ### end Alembic commands ###
Example #20
Source File: edc5377c32c7_adding_subreddit_page_and_post_tables.py From CivilServant with MIT License | 5 votes |
def upgrade_production(): ### commands auto generated by Alembic - please adjust! ### op.create_table('subreddit_pages', sa.Column('id', sa.Integer(), nullable=False), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('page_type', sa.Integer(), nullable=True), sa.Column('page_data', mysql.MEDIUMTEXT(), nullable=True), sa.PrimaryKeyConstraint('id') ) op.create_table('subreddits', sa.Column('id', sa.String(length=32), autoincrement=False, nullable=False), sa.Column('name', sa.String(length=32), nullable=True), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('id') ) op.create_table('posts', sa.Column('id', sa.String(length=32), autoincrement=False, nullable=False), sa.Column('subreddit_id', sa.String(length=32), nullable=True), sa.Column('created', sa.DateTime(), nullable=True), sa.Column('post_data', mysql.MEDIUMTEXT(), nullable=True), sa.ForeignKeyConstraint(['subreddit_id'], ['subreddits.id'], ), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('id') ) op.add_column('front_pages', sa.Column('page_type', sa.Integer(), nullable=True)) ### end Alembic commands ###
Example #21
Source File: da0fe56f616b_create_models_for_experiment_objects.py From CivilServant with MIT License | 5 votes |
def upgrade_test(): ### commands auto generated by Alembic - please adjust! ### op.create_table('experiment_actions', sa.Column('id', sa.Integer(), nullable=False), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('experiment_id', sa.Integer(), nullable=True), sa.Column('praw_key_id', sa.String(length=256), nullable=True), sa.Column('action_subject_type', sa.String(length=64), nullable=True), sa.Column('action_subject_id', sa.String(length=256), nullable=True), sa.Column('action_object_type', sa.String(length=64), nullable=True), sa.Column('action_object_id', sa.String(length=256), nullable=True), sa.Column('metadata_json', mysql.MEDIUMTEXT(), nullable=True), sa.PrimaryKeyConstraint('id') ) op.create_index(op.f('ix_experiment_actions_action_object_id'), 'experiment_actions', ['action_object_id'], unique=False) op.create_index(op.f('ix_experiment_actions_action_subject_id'), 'experiment_actions', ['action_subject_id'], unique=False) op.create_index(op.f('ix_experiment_actions_experiment_id'), 'experiment_actions', ['experiment_id'], unique=False) op.create_index(op.f('ix_experiment_actions_praw_key_id'), 'experiment_actions', ['praw_key_id'], unique=False) op.create_table('experiment_things', sa.Column('id', sa.String(length=256), nullable=False), 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('object_created', sa.DateTime(), nullable=True), sa.Column('metadata_json', mysql.MEDIUMTEXT(), nullable=True), sa.PrimaryKeyConstraint('id') ) op.create_index(op.f('ix_experiment_things_experiment_id'), 'experiment_things', ['experiment_id'], unique=False) op.create_table('experiments', sa.Column('id', sa.Integer(), nullable=False), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('name', sa.String(length=256), nullable=False), sa.Column('controller', sa.String(length=256), nullable=False), sa.Column('start_time', sa.DateTime(), nullable=True), sa.Column('end_time', sa.DateTime(), nullable=True), sa.Column('settings_json', mysql.MEDIUMTEXT(), nullable=True), sa.PrimaryKeyConstraint('id') ) op.create_index(op.f('ix_experiments_name'), 'experiments', ['name'], unique=False) ### end Alembic commands ###
Example #22
Source File: da0fe56f616b_create_models_for_experiment_objects.py From CivilServant with MIT License | 5 votes |
def upgrade_development(): ### commands auto generated by Alembic - please adjust! ### op.create_table('experiment_actions', sa.Column('id', sa.Integer(), nullable=False), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('experiment_id', sa.Integer(), nullable=True), sa.Column('praw_key_id', sa.String(length=256), nullable=True), sa.Column('action_subject_type', sa.String(length=64), nullable=True), sa.Column('action_subject_id', sa.String(length=256), nullable=True), sa.Column('action_object_type', sa.String(length=64), nullable=True), sa.Column('action_object_id', sa.String(length=256), nullable=True), sa.Column('metadata_json', mysql.MEDIUMTEXT(), nullable=True), sa.PrimaryKeyConstraint('id') ) op.create_index(op.f('ix_experiment_actions_action_object_id'), 'experiment_actions', ['action_object_id'], unique=False) op.create_index(op.f('ix_experiment_actions_action_subject_id'), 'experiment_actions', ['action_subject_id'], unique=False) op.create_index(op.f('ix_experiment_actions_experiment_id'), 'experiment_actions', ['experiment_id'], unique=False) op.create_index(op.f('ix_experiment_actions_praw_key_id'), 'experiment_actions', ['praw_key_id'], unique=False) op.create_table('experiment_things', sa.Column('id', sa.String(length=256), nullable=False), 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('object_created', sa.DateTime(), nullable=True), sa.Column('metadata_json', mysql.MEDIUMTEXT(), nullable=True), sa.PrimaryKeyConstraint('id') ) op.create_index(op.f('ix_experiment_things_experiment_id'), 'experiment_things', ['experiment_id'], unique=False) op.create_table('experiments', sa.Column('id', sa.Integer(), nullable=False), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('name', sa.String(length=256), nullable=False), sa.Column('controller', sa.String(length=256), nullable=False), sa.Column('start_time', sa.DateTime(), nullable=True), sa.Column('end_time', sa.DateTime(), nullable=True), sa.Column('settings_json', mysql.MEDIUMTEXT(), nullable=True), sa.PrimaryKeyConstraint('id') ) op.create_index(op.f('ix_experiments_name'), 'experiments', ['name'], unique=False) ### end Alembic commands ###
Example #23
Source File: a0f4fda7588f_add_model_for_snapshots_of_.py From CivilServant with MIT License | 5 votes |
def upgrade_production(): ### 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) ### end Alembic commands ###
Example #24
Source File: a0f4fda7588f_add_model_for_snapshots_of_.py From CivilServant with MIT License | 5 votes |
def upgrade_test(): ### 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) ### end Alembic commands ###
Example #25
Source File: a0f4fda7588f_add_model_for_snapshots_of_.py From CivilServant with MIT License | 5 votes |
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) ### end Alembic commands ###
Example #26
Source File: core.py From incubator-superset with Apache License 2.0 | 5 votes |
def MediumText() -> Variant: # pylint:disable=invalid-name return Text().with_variant(MEDIUMTEXT(), "mysql")
Example #27
Source File: 131bc6d9d550_job_logs_should_use_mediumtext.py From ok with Apache License 2.0 | 5 votes |
def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.alter_column('job', 'failed', existing_type=mysql.MEDIUMTEXT, type_=mysql.TEXT, existing_nullable=False) ### end Alembic commands ###
Example #28
Source File: 131bc6d9d550_job_logs_should_use_mediumtext.py From ok with Apache License 2.0 | 5 votes |
def upgrade(): ### commands auto generated by Alembic - please adjust! ### op.alter_column('job', 'log', existing_type=mysql.TEXT, type_=mysql.MEDIUMTEXT, existing_nullable=True) ### end Alembic commands ###
Example #29
Source File: 47e948205fbd_store_job_results.py From ok with Apache License 2.0 | 5 votes |
def upgrade(): # ### commands auto generated by Alembic - please adjust! ### op.add_column('job', sa.Column('result', mysql.MEDIUMTEXT(), nullable=True)) op.add_column('job', sa.Column('result_kind', sa.Enum('html', 'string', 'link', name='result_kind'), nullable=True)) # ### end Alembic commands ###
Example #30
Source File: types.py From oslo.db with Apache License 2.0 | 5 votes |
def __init__(self, mysql_as_long=False, mysql_as_medium=False): """Initialize JSON-encoding type.""" super(JsonEncodedType, self).__init__() if mysql_as_long and mysql_as_medium: raise TypeError("mysql_as_long and mysql_as_medium are mutually " "exclusive") if mysql_as_long: self.impl = Text().with_variant(mysql.LONGTEXT(), 'mysql') elif mysql_as_medium: self.impl = Text().with_variant(mysql.MEDIUMTEXT(), 'mysql')