Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: 部分数据库在 alembic 生成 UserRoleLink 等数据表错误 #7

Merged
merged 1 commit into from
Apr 23, 2022
Merged

Fix: 部分数据库在 alembic 生成 UserRoleLink 等数据表错误 #7

merged 1 commit into from
Apr 23, 2022

Conversation

dongfengweixiao
Copy link
Contributor

解决部分数据库在使用 alembic 迁移数据库时报错:

(sqlalchemy.dialects.postgresql.asyncpg.ProgrammingError) <class 'asyncpg.exceptions.InvalidTableDefinitionError'>: column "group_id" is in a primary key

解决部分数据库在使用 alembic 迁移数据库时报错:

(sqlalchemy.dialects.postgresql.asyncpg.ProgrammingError) <class 'asyncpg.exceptions.InvalidTableDefinitionError'>: column "group_id" is in a primary key
@sourcery-ai
Copy link

sourcery-ai bot commented Apr 21, 2022

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 1.02%.

Quality metrics Before After Change
Complexity 0.03 ⭐ 0.03 ⭐ 0.00
Method Length 70.00 🙂 71.78 🙂 1.78 👎
Working memory 9.42 🙂 9.77 🙂 0.35 👎
Quality 66.69% 🙂 65.67% 🙂 -1.02% 👎
Other metrics Before After Change
Lines 171 171 0
Changed files Quality Before Quality After Quality Change
fastapi_user_auth/auth/models.py 66.69% 🙂 65.67% 🙂 -1.02% 👎

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
fastapi_user_auth/auth/models.py BaseUser._stmt_exists_role 0 ⭐ 80 🙂 10 😞 71.85% 🙂 Extract out complex expressions
fastapi_user_auth/auth/models.py BaseUser.has_group 0 ⭐ 57 ⭐ 11 😞 73.48% 🙂 Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

@amisadmin amisadmin merged commit da45df1 into amisadmin:master Apr 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants