i have created a python file setups.py to create all setup related models in single file. every Model contains a " name " field and i want to be sure that these names in Donation Category, Donation Types etc. should be unique and i created same constraints with different names but the field name is same in all constraints because the setups Models have same name, created constraint like below:
sql_constraints = [
('donation_type_name_unique',
'UNIQUE(name)',
"Donation Type Name must be unique"),
]
but it is throwing error... when remove one-by-one all except first it is working fine. is there any idea how i can have constraints for all setup models in singly python file? please help.
regards