@@ -25,7 +25,14 @@ class Migration(migrations.Migration):
2525 (
2626 "category" ,
2727 models .CharField (
28- help_text = "Award category (e.g., 'WASPY', 'Lifetime Achievement')" ,
28+ choices = [
29+ ("WASPY" , "WASPY" ),
30+ (
31+ "Distinguished Lifetime Memberships" ,
32+ "Distinguished Lifetime Memberships" ,
33+ ),
34+ ],
35+ help_text = "Award category (e.g., 'WASPY', 'Distinguished Lifetime Memberships')" ,
2936 max_length = 100 ,
3037 verbose_name = "Category" ,
3138 ),
@@ -35,6 +42,7 @@ class Migration(migrations.Migration):
3542 models .CharField (
3643 help_text = "Award name/title (e.g., 'Event Person of the Year')" ,
3744 max_length = 200 ,
45+ unique = True ,
3846 verbose_name = "Name" ,
3947 ),
4048 ),
@@ -50,9 +58,7 @@ class Migration(migrations.Migration):
5058 (
5159 "year" ,
5260 models .IntegerField (
53- blank = True ,
54- help_text = "Year the award was given (null for category definitions)" ,
55- null = True ,
61+ help_text = "Year the award was given" ,
5662 verbose_name = "Year" ,
5763 ),
5864 ),
@@ -85,16 +91,6 @@ class Migration(migrations.Migration):
8591 verbose_name = "Winner Image" ,
8692 ),
8793 ),
88- (
89- "award_type" ,
90- models .CharField (
91- choices = [("category" , "Category" ), ("award" , "Award" )],
92- default = "award" ,
93- help_text = "Type of entry: category definition or individual award" ,
94- max_length = 20 ,
95- verbose_name = "Award Type" ,
96- ),
97- ),
9894 (
9995 "user" ,
10096 models .ForeignKey (
@@ -117,11 +113,6 @@ class Migration(migrations.Migration):
117113 models .Index (fields = ["-year" ], name = "owasp_award_year_desc" ),
118114 models .Index (fields = ["name" ], name = "owasp_award_name" ),
119115 ],
120- "constraints" : [
121- models .UniqueConstraint (
122- fields = ("name" , "year" , "category" ), name = "unique_award_name_year_category"
123- )
124- ],
125116 },
126117 ),
127118 ]
0 commit comments