##// END OF EJS Templates
db: use base table args for all models defined.
marcink -
r2830:151c8101 default
parent child Browse files
Show More
@@ -140,6 +140,14 b' def in_filter_generator(qry, items, limi'
140 140 return parts
141 141
142 142
143 base_table_args = {
144 'extend_existing': True,
145 'mysql_engine': 'InnoDB',
146 'mysql_charset': 'utf8',
147 'sqlite_autoincrement': True
148 }
149
150
143 151 class EncryptedTextValue(TypeDecorator):
144 152 """
145 153 Special column for encrypted long text data, use like::
@@ -302,8 +310,7 b' class RhodeCodeSetting(Base, BaseModel):'
302 310 __tablename__ = 'rhodecode_settings'
303 311 __table_args__ = (
304 312 UniqueConstraint('app_settings_name'),
305 {'extend_existing': True, 'mysql_engine': 'InnoDB',
306 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
313 base_table_args
307 314 )
308 315
309 316 SETTINGS_TYPES = {
@@ -383,8 +390,7 b' class RhodeCodeUi(Base, BaseModel):'
383 390 __tablename__ = 'rhodecode_ui'
384 391 __table_args__ = (
385 392 UniqueConstraint('ui_key'),
386 {'extend_existing': True, 'mysql_engine': 'InnoDB',
387 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
393 base_table_args
388 394 )
389 395
390 396 HOOK_REPO_SIZE = 'changegroup.repo_size'
@@ -426,8 +432,7 b' class RepoRhodeCodeSetting(Base, BaseMod'
426 432 UniqueConstraint(
427 433 'app_settings_name', 'repository_id',
428 434 name='uq_repo_rhodecode_setting_name_repo_id'),
429 {'extend_existing': True, 'mysql_engine': 'InnoDB',
430 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
435 base_table_args
431 436 )
432 437
433 438 repository_id = Column(
@@ -502,8 +507,7 b' class RepoRhodeCodeUi(Base, BaseModel):'
502 507 UniqueConstraint(
503 508 'repository_id', 'ui_section', 'ui_key',
504 509 name='uq_repo_rhodecode_ui_repository_id_section_key'),
505 {'extend_existing': True, 'mysql_engine': 'InnoDB',
506 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
510 base_table_args
507 511 )
508 512
509 513 repository_id = Column(
@@ -535,9 +539,9 b' class User(Base, BaseModel):'
535 539 UniqueConstraint('username'), UniqueConstraint('email'),
536 540 Index('u_username_idx', 'username'),
537 541 Index('u_email_idx', 'email'),
538 {'extend_existing': True, 'mysql_engine': 'InnoDB',
539 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
542 base_table_args
540 543 )
544
541 545 DEFAULT_USER = 'default'
542 546 DEFAULT_USER_EMAIL = 'anonymous@rhodecode.org'
543 547 DEFAULT_GRAVATAR_URL = 'https://secure.gravatar.com/avatar/{md5email}?d=identicon&s={size}'
@@ -1034,8 +1038,7 b' class UserApiKeys(Base, BaseModel):'
1034 1038 __table_args__ = (
1035 1039 Index('uak_api_key_idx', 'api_key', unique=True),
1036 1040 Index('uak_api_key_expires_idx', 'api_key', 'expires'),
1037 {'extend_existing': True, 'mysql_engine': 'InnoDB',
1038 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
1041 base_table_args
1039 1042 )
1040 1043 __mapper_args__ = {}
1041 1044
@@ -1137,8 +1140,7 b' class UserEmailMap(Base, BaseModel):'
1137 1140 __table_args__ = (
1138 1141 Index('uem_email_idx', 'email'),
1139 1142 UniqueConstraint('email'),
1140 {'extend_existing': True, 'mysql_engine': 'InnoDB',
1141 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
1143 base_table_args
1142 1144 )
1143 1145 __mapper_args__ = {}
1144 1146
@@ -1168,8 +1170,7 b' class UserIpMap(Base, BaseModel):'
1168 1170 __tablename__ = 'user_ip_map'
1169 1171 __table_args__ = (
1170 1172 UniqueConstraint('user_id', 'ip_addr'),
1171 {'extend_existing': True, 'mysql_engine': 'InnoDB',
1172 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
1173 base_table_args
1173 1174 )
1174 1175 __mapper_args__ = {}
1175 1176
@@ -1208,8 +1209,7 b' class UserSshKeys(Base, BaseModel):'
1208 1209
1209 1210 UniqueConstraint('ssh_key_fingerprint'),
1210 1211
1211 {'extend_existing': True, 'mysql_engine': 'InnoDB',
1212 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
1212 base_table_args
1213 1213 )
1214 1214 __mapper_args__ = {}
1215 1215
@@ -1241,9 +1241,9 b' class UserSshKeys(Base, BaseModel):'
1241 1241 class UserLog(Base, BaseModel):
1242 1242 __tablename__ = 'user_logs'
1243 1243 __table_args__ = (
1244 {'extend_existing': True, 'mysql_engine': 'InnoDB',
1245 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
1244 base_table_args,
1246 1245 )
1246
1247 1247 VERSION_1 = 'v1'
1248 1248 VERSION_2 = 'v2'
1249 1249 VERSIONS = [VERSION_1, VERSION_2]
@@ -1291,8 +1291,7 b' class UserLog(Base, BaseModel):'
1291 1291 class UserGroup(Base, BaseModel):
1292 1292 __tablename__ = 'users_groups'
1293 1293 __table_args__ = (
1294 {'extend_existing': True, 'mysql_engine': 'InnoDB',
1295 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
1294 base_table_args,
1296 1295 )
1297 1296
1298 1297 users_group_id = Column("users_group_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
@@ -1479,8 +1478,7 b' class UserGroup(Base, BaseModel):'
1479 1478 class UserGroupMember(Base, BaseModel):
1480 1479 __tablename__ = 'users_groups_members'
1481 1480 __table_args__ = (
1482 {'extend_existing': True, 'mysql_engine': 'InnoDB',
1483 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
1481 base_table_args,
1484 1482 )
1485 1483
1486 1484 users_group_member_id = Column("users_group_member_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
@@ -1499,9 +1497,9 b' class RepositoryField(Base, BaseModel):'
1499 1497 __tablename__ = 'repositories_fields'
1500 1498 __table_args__ = (
1501 1499 UniqueConstraint('repository_id', 'field_key'), # no-multi field
1502 {'extend_existing': True, 'mysql_engine': 'InnoDB',
1503 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
1500 base_table_args,
1504 1501 )
1502
1505 1503 PREFIX = 'ex_' # prefix used in form to not conflict with already existing fields
1506 1504
1507 1505 repo_field_id = Column("repo_field_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
@@ -1537,8 +1535,7 b' class Repository(Base, BaseModel):'
1537 1535 __tablename__ = 'repositories'
1538 1536 __table_args__ = (
1539 1537 Index('r_repo_name_idx', 'repo_name', mysql_length=255),
1540 {'extend_existing': True, 'mysql_engine': 'InnoDB',
1541 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
1538 base_table_args,
1542 1539 )
1543 1540 DEFAULT_CLONE_URI = '{scheme}://{user}@{netloc}/{repo}'
1544 1541 DEFAULT_CLONE_URI_ID = '{scheme}://{user}@{netloc}/_{repoid}'
@@ -2381,8 +2378,7 b' class RepoGroup(Base, BaseModel):'
2381 2378 __table_args__ = (
2382 2379 UniqueConstraint('group_name', 'group_parent_id'),
2383 2380 CheckConstraint('group_id != group_parent_id'),
2384 {'extend_existing': True, 'mysql_engine': 'InnoDB',
2385 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
2381 base_table_args,
2386 2382 )
2387 2383 __mapper_args__ = {'order_by': 'group_name'}
2388 2384
@@ -2664,9 +2660,9 b' class Permission(Base, BaseModel):'
2664 2660 __tablename__ = 'permissions'
2665 2661 __table_args__ = (
2666 2662 Index('p_perm_name_idx', 'permission_name'),
2667 {'extend_existing': True, 'mysql_engine': 'InnoDB',
2668 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
2663 base_table_args,
2669 2664 )
2665
2670 2666 PERMS = [
2671 2667 ('hg.admin', _('RhodeCode Super Administrator')),
2672 2668
@@ -2889,9 +2885,9 b' class UserRepoToPerm(Base, BaseModel):'
2889 2885 __tablename__ = 'repo_to_perm'
2890 2886 __table_args__ = (
2891 2887 UniqueConstraint('user_id', 'repository_id', 'permission_id'),
2892 {'extend_existing': True, 'mysql_engine': 'InnoDB',
2893 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
2888 base_table_args
2894 2889 )
2890
2895 2891 repo_to_perm_id = Column("repo_to_perm_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
2896 2892 user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=False, unique=None, default=None)
2897 2893 permission_id = Column("permission_id", Integer(), ForeignKey('permissions.permission_id'), nullable=False, unique=None, default=None)
@@ -2918,9 +2914,9 b' class UserUserGroupToPerm(Base, BaseMode'
2918 2914 __tablename__ = 'user_user_group_to_perm'
2919 2915 __table_args__ = (
2920 2916 UniqueConstraint('user_id', 'user_group_id', 'permission_id'),
2921 {'extend_existing': True, 'mysql_engine': 'InnoDB',
2922 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
2917 base_table_args
2923 2918 )
2919
2924 2920 user_user_group_to_perm_id = Column("user_user_group_to_perm_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
2925 2921 user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=False, unique=None, default=None)
2926 2922 permission_id = Column("permission_id", Integer(), ForeignKey('permissions.permission_id'), nullable=False, unique=None, default=None)
@@ -2947,9 +2943,9 b' class UserToPerm(Base, BaseModel):'
2947 2943 __tablename__ = 'user_to_perm'
2948 2944 __table_args__ = (
2949 2945 UniqueConstraint('user_id', 'permission_id'),
2950 {'extend_existing': True, 'mysql_engine': 'InnoDB',
2951 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
2946 base_table_args
2952 2947 )
2948
2953 2949 user_to_perm_id = Column("user_to_perm_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
2954 2950 user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=False, unique=None, default=None)
2955 2951 permission_id = Column("permission_id", Integer(), ForeignKey('permissions.permission_id'), nullable=False, unique=None, default=None)
@@ -2965,9 +2961,9 b' class UserGroupRepoToPerm(Base, BaseMode'
2965 2961 __tablename__ = 'users_group_repo_to_perm'
2966 2962 __table_args__ = (
2967 2963 UniqueConstraint('repository_id', 'users_group_id', 'permission_id'),
2968 {'extend_existing': True, 'mysql_engine': 'InnoDB',
2969 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
2964 base_table_args
2970 2965 )
2966
2971 2967 users_group_to_perm_id = Column("users_group_to_perm_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
2972 2968 users_group_id = Column("users_group_id", Integer(), ForeignKey('users_groups.users_group_id'), nullable=False, unique=None, default=None)
2973 2969 permission_id = Column("permission_id", Integer(), ForeignKey('permissions.permission_id'), nullable=False, unique=None, default=None)
@@ -2995,9 +2991,9 b' class UserGroupUserGroupToPerm(Base, Bas'
2995 2991 __table_args__ = (
2996 2992 UniqueConstraint('target_user_group_id', 'user_group_id', 'permission_id'),
2997 2993 CheckConstraint('target_user_group_id != user_group_id'),
2998 {'extend_existing': True, 'mysql_engine': 'InnoDB',
2999 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
2994 base_table_args
3000 2995 )
2996
3001 2997 user_group_user_group_to_perm_id = Column("user_group_user_group_to_perm_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
3002 2998 target_user_group_id = Column("target_user_group_id", Integer(), ForeignKey('users_groups.users_group_id'), nullable=False, unique=None, default=None)
3003 2999 permission_id = Column("permission_id", Integer(), ForeignKey('permissions.permission_id'), nullable=False, unique=None, default=None)
@@ -3024,9 +3020,9 b' class UserGroupToPerm(Base, BaseModel):'
3024 3020 __tablename__ = 'users_group_to_perm'
3025 3021 __table_args__ = (
3026 3022 UniqueConstraint('users_group_id', 'permission_id',),
3027 {'extend_existing': True, 'mysql_engine': 'InnoDB',
3028 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
3023 base_table_args
3029 3024 )
3025
3030 3026 users_group_to_perm_id = Column("users_group_to_perm_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
3031 3027 users_group_id = Column("users_group_id", Integer(), ForeignKey('users_groups.users_group_id'), nullable=False, unique=None, default=None)
3032 3028 permission_id = Column("permission_id", Integer(), ForeignKey('permissions.permission_id'), nullable=False, unique=None, default=None)
@@ -3039,8 +3035,7 b' class UserRepoGroupToPerm(Base, BaseMode'
3039 3035 __tablename__ = 'user_repo_group_to_perm'
3040 3036 __table_args__ = (
3041 3037 UniqueConstraint('user_id', 'group_id', 'permission_id'),
3042 {'extend_existing': True, 'mysql_engine': 'InnoDB',
3043 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
3038 base_table_args
3044 3039 )
3045 3040
3046 3041 group_to_perm_id = Column("group_to_perm_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
@@ -3066,8 +3061,7 b' class UserGroupRepoGroupToPerm(Base, Bas'
3066 3061 __tablename__ = 'users_group_repo_group_to_perm'
3067 3062 __table_args__ = (
3068 3063 UniqueConstraint('users_group_id', 'group_id'),
3069 {'extend_existing': True, 'mysql_engine': 'InnoDB',
3070 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
3064 base_table_args
3071 3065 )
3072 3066
3073 3067 users_group_repo_group_to_perm_id = Column("users_group_repo_group_to_perm_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
@@ -3095,9 +3089,9 b' class UserGroupRepoGroupToPerm(Base, Bas'
3095 3089 class Statistics(Base, BaseModel):
3096 3090 __tablename__ = 'statistics'
3097 3091 __table_args__ = (
3098 {'extend_existing': True, 'mysql_engine': 'InnoDB',
3099 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
3092 base_table_args
3100 3093 )
3094
3101 3095 stat_id = Column("stat_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
3102 3096 repository_id = Column("repository_id", Integer(), ForeignKey('repositories.repo_id'), nullable=False, unique=True, default=None)
3103 3097 stat_on_revision = Column("stat_on_revision", Integer(), nullable=False)
@@ -3113,8 +3107,7 b' class UserFollowing(Base, BaseModel):'
3113 3107 __table_args__ = (
3114 3108 UniqueConstraint('user_id', 'follows_repository_id'),
3115 3109 UniqueConstraint('user_id', 'follows_user_id'),
3116 {'extend_existing': True, 'mysql_engine': 'InnoDB',
3117 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
3110 base_table_args
3118 3111 )
3119 3112
3120 3113 user_following_id = Column("user_following_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
@@ -3138,9 +3131,9 b' class CacheKey(Base, BaseModel):'
3138 3131 __table_args__ = (
3139 3132 UniqueConstraint('cache_key'),
3140 3133 Index('key_idx', 'cache_key'),
3141 {'extend_existing': True, 'mysql_engine': 'InnoDB',
3142 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
3134 base_table_args,
3143 3135 )
3136
3144 3137 CACHE_TYPE_ATOM = 'ATOM'
3145 3138 CACHE_TYPE_RSS = 'RSS'
3146 3139 CACHE_TYPE_README = 'README'
@@ -3265,8 +3258,7 b' class ChangesetComment(Base, BaseModel):'
3265 3258 __tablename__ = 'changeset_comments'
3266 3259 __table_args__ = (
3267 3260 Index('cc_revision_idx', 'revision'),
3268 {'extend_existing': True, 'mysql_engine': 'InnoDB',
3269 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
3261 base_table_args,
3270 3262 )
3271 3263
3272 3264 COMMENT_OUTDATED = u'comment_outdated'
@@ -3390,9 +3382,9 b' class ChangesetStatus(Base, BaseModel):'
3390 3382 Index('cs_revision_idx', 'revision'),
3391 3383 Index('cs_version_idx', 'version'),
3392 3384 UniqueConstraint('repo_id', 'revision', 'version'),
3393 {'extend_existing': True, 'mysql_engine': 'InnoDB',
3394 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
3385 base_table_args
3395 3386 )
3387
3396 3388 STATUS_NOT_REVIEWED = DEFAULT = 'not_reviewed'
3397 3389 STATUS_APPROVED = 'approved'
3398 3390 STATUS_REJECTED = 'rejected'
@@ -3662,8 +3654,7 b' class _PullRequestBase(BaseModel):'
3662 3654 class PullRequest(Base, _PullRequestBase):
3663 3655 __tablename__ = 'pull_requests'
3664 3656 __table_args__ = (
3665 {'extend_existing': True, 'mysql_engine': 'InnoDB',
3666 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
3657 base_table_args,
3667 3658 )
3668 3659
3669 3660 pull_request_id = Column(
@@ -3781,8 +3772,7 b' class PullRequest(Base, _PullRequestBase'
3781 3772 class PullRequestVersion(Base, _PullRequestBase):
3782 3773 __tablename__ = 'pull_request_versions'
3783 3774 __table_args__ = (
3784 {'extend_existing': True, 'mysql_engine': 'InnoDB',
3785 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
3775 base_table_args,
3786 3776 )
3787 3777
3788 3778 pull_request_version_id = Column(
@@ -3820,8 +3810,7 b' class PullRequestVersion(Base, _PullRequ'
3820 3810 class PullRequestReviewers(Base, BaseModel):
3821 3811 __tablename__ = 'pull_request_reviewers'
3822 3812 __table_args__ = (
3823 {'extend_existing': True, 'mysql_engine': 'InnoDB',
3824 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
3813 base_table_args,
3825 3814 )
3826 3815
3827 3816 @hybrid_property
@@ -3881,8 +3870,7 b' class Notification(Base, BaseModel):'
3881 3870 __tablename__ = 'notifications'
3882 3871 __table_args__ = (
3883 3872 Index('notification_type_idx', 'type'),
3884 {'extend_existing': True, 'mysql_engine': 'InnoDB',
3885 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
3873 base_table_args,
3886 3874 )
3887 3875
3888 3876 TYPE_CHANGESET_COMMENT = u'cs_comment'
@@ -3940,9 +3928,9 b' class UserNotification(Base, BaseModel):'
3940 3928 __tablename__ = 'user_to_notification'
3941 3929 __table_args__ = (
3942 3930 UniqueConstraint('user_id', 'notification_id'),
3943 {'extend_existing': True, 'mysql_engine': 'InnoDB',
3944 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
3931 base_table_args
3945 3932 )
3933
3946 3934 user_id = Column('user_id', Integer(), ForeignKey('users.user_id'), primary_key=True)
3947 3935 notification_id = Column("notification_id", Integer(), ForeignKey('notifications.notification_id'), primary_key=True)
3948 3936 read = Column('read', Boolean, default=False)
@@ -3962,9 +3950,9 b' class Gist(Base, BaseModel):'
3962 3950 __table_args__ = (
3963 3951 Index('g_gist_access_id_idx', 'gist_access_id'),
3964 3952 Index('g_created_on_idx', 'created_on'),
3965 {'extend_existing': True, 'mysql_engine': 'InnoDB',
3966 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
3953 base_table_args
3967 3954 )
3955
3968 3956 GIST_PUBLIC = u'public'
3969 3957 GIST_PRIVATE = u'private'
3970 3958 DEFAULT_FILENAME = u'gistfile1.txt'
@@ -4059,8 +4047,8 b' class ExternalIdentity(Base, BaseModel):'
4059 4047 __table_args__ = (
4060 4048 Index('local_user_id_idx', 'local_user_id'),
4061 4049 Index('external_id_idx', 'external_id'),
4062 {'extend_existing': True, 'mysql_engine': 'InnoDB',
4063 'mysql_charset': 'utf8'})
4050 base_table_args
4051 )
4064 4052
4065 4053 external_id = Column('external_id', Unicode(255), default=u'',
4066 4054 primary_key=True)
@@ -4121,8 +4109,7 b' class ExternalIdentity(Base, BaseModel):'
4121 4109 class Integration(Base, BaseModel):
4122 4110 __tablename__ = 'integrations'
4123 4111 __table_args__ = (
4124 {'extend_existing': True, 'mysql_engine': 'InnoDB',
4125 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
4112 base_table_args
4126 4113 )
4127 4114
4128 4115 integration_id = Column('integration_id', Integer(), primary_key=True)
@@ -4165,8 +4152,7 b' class Integration(Base, BaseModel):'
4165 4152 class RepoReviewRuleUser(Base, BaseModel):
4166 4153 __tablename__ = 'repo_review_rules_users'
4167 4154 __table_args__ = (
4168 {'extend_existing': True, 'mysql_engine': 'InnoDB',
4169 'mysql_charset': 'utf8', 'sqlite_autoincrement': True,}
4155 base_table_args
4170 4156 )
4171 4157
4172 4158 repo_review_rule_user_id = Column('repo_review_rule_user_id', Integer(), primary_key=True)
@@ -4184,9 +4170,9 b' class RepoReviewRuleUser(Base, BaseModel'
4184 4170 class RepoReviewRuleUserGroup(Base, BaseModel):
4185 4171 __tablename__ = 'repo_review_rules_users_groups'
4186 4172 __table_args__ = (
4187 {'extend_existing': True, 'mysql_engine': 'InnoDB',
4188 'mysql_charset': 'utf8', 'sqlite_autoincrement': True,}
4173 base_table_args
4189 4174 )
4175
4190 4176 VOTE_RULE_ALL = -1
4191 4177
4192 4178 repo_review_rule_users_group_id = Column('repo_review_rule_users_group_id', Integer(), primary_key=True)
@@ -4213,8 +4199,7 b' class RepoReviewRuleUserGroup(Base, Base'
4213 4199 class RepoReviewRule(Base, BaseModel):
4214 4200 __tablename__ = 'repo_review_rules'
4215 4201 __table_args__ = (
4216 {'extend_existing': True, 'mysql_engine': 'InnoDB',
4217 'mysql_charset': 'utf8', 'sqlite_autoincrement': True,}
4202 base_table_args
4218 4203 )
4219 4204
4220 4205 repo_review_rule_id = Column(
@@ -4364,9 +4349,9 b' class ScheduleEntry(Base, BaseModel):'
4364 4349 __table_args__ = (
4365 4350 UniqueConstraint('schedule_name', name='s_schedule_name_idx'),
4366 4351 UniqueConstraint('task_uid', name='s_task_uid_idx'),
4367 {'extend_existing': True, 'mysql_engine': 'InnoDB',
4368 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
4352 base_table_args,
4369 4353 )
4354
4370 4355 schedule_types = ['crontab', 'timedelta', 'integer']
4371 4356 schedule_entry_id = Column('schedule_entry_id', Integer(), primary_key=True)
4372 4357
@@ -4492,9 +4477,9 b' def set_task_uid(mapper, connection, tar'
4492 4477 class DbMigrateVersion(Base, BaseModel):
4493 4478 __tablename__ = 'db_migrate_version'
4494 4479 __table_args__ = (
4495 {'extend_existing': True, 'mysql_engine': 'InnoDB',
4496 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
4480 base_table_args,
4497 4481 )
4482
4498 4483 repository_id = Column('repository_id', String(250), primary_key=True)
4499 4484 repository_path = Column('repository_path', Text)
4500 4485 version = Column('version', Integer)
@@ -4503,8 +4488,7 b' class DbMigrateVersion(Base, BaseModel):'
4503 4488 class DbSession(Base, BaseModel):
4504 4489 __tablename__ = 'db_session'
4505 4490 __table_args__ = (
4506 {'extend_existing': True, 'mysql_engine': 'InnoDB',
4507 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
4491 base_table_args,
4508 4492 )
4509 4493
4510 4494 def __repr__(self):
@@ -4517,12 +4501,10 b' class DbSession(Base, BaseModel):'
4517 4501 data = Column('data', PickleType, nullable=False)
4518 4502
4519 4503
4520
4521 4504 class BeakerCache(Base, BaseModel):
4522 4505 __tablename__ = 'beaker_cache'
4523 4506 __table_args__ = (
4524 {'extend_existing': True, 'mysql_engine': 'InnoDB',
4525 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
4507 base_table_args,
4526 4508 )
4527 4509
4528 4510 def __repr__(self):
General Comments 0
You need to be logged in to leave comments. Login now