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

How to support 'unique_together' #153

Open
LuoLuo0101 opened this issue Mar 23, 2022 · 1 comment · May be fixed by #154
Open

How to support 'unique_together' #153

LuoLuo0101 opened this issue Mar 23, 2022 · 1 comment · May be fixed by #154

Comments

@LuoLuo0101
Copy link

class RoleMenu(orm.Model):
tablename = "role_menu"
registry = registry_main

fields = {
    "id": orm.BigInteger(primary_key=True),
    "role_id": orm.BigInteger(index=True),
    "menu_id": orm.BigInteger(index=True),
    "is_active": orm.Boolean(default=False),
    "is_new": orm.Boolean(default=True),
}
# unique_together = (("role_id", "menu_id"),)
@SepehrBazyar SepehrBazyar linked a pull request Apr 1, 2022 that will close this issue
@SepehrBazyar
Copy link

Hi
I needed this feature in this project, therefore in this PR I tried to implement it.
I would really appreciate it if you take a look.
Thank you!

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 a pull request may close this issue.

2 participants