Skip to content
Snippets Groups Projects
Commit 69e3350f7777 authored by Houzefa Abbasbhay's avatar Houzefa Abbasbhay :slight_smile:
Browse files

Code unicity constraints: Per-company

parent f9e92c3c7c68
No related branches found
No related tags found
No related merge requests found
......@@ -58,5 +58,7 @@
)
_sql_constraints = [
('unique_code', 'UNIQUE(code)', 'The code must be unique.'),
('unique_code_per_company',
'UNIQUE(code, company_id)',
'The code must be unique.'),
]
......@@ -94,5 +94,7 @@
)
_sql_constraints = [
('unique_code', 'UNIQUE(code)', 'The code must be unique.'),
('unique_code_per_company',
'UNIQUE(code, company_id)',
'The code must be unique.'),
]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment