0135_auto__chg_field_project_team.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:Sentry 作者: NetEaseGame 项目源码 文件源码
def forwards(self, orm):
        # this is shitty, but we dont care
        if connection.vendor == 'sqlite':
            transaction.set_autocommit(True)

        # ideally we would have done this data migration before this change, but
        # it was an oversight
        if not db.dry_run:
            try:
                self.fix_missing_teams(orm)
            except Exception as e:
                import traceback; traceback.print_exc()
                raise

        # Changing field 'Project.team'
        db.alter_column('sentry_project', 'team_id', self.gf('sentry.db.models.fields.FlexibleForeignKey')(to=orm['sentry.Team']))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号