11# Generated by Django 4.0.8 on 2023-03-01 13:06
22
3+ import uuid
4+
35from django .conf import settings
46from django .db import migrations , models
57import django .db .models .deletion
810
911
1012class Migration (migrations .Migration ):
11-
1213 initial = True
1314
1415 dependencies = [
@@ -17,18 +18,32 @@ class Migration(migrations.Migration):
1718
1819 operations = [
1920 migrations .CreateModel (
20- name = ' Photo' ,
21+ name = " Photo" ,
2122 fields = [
22- ('id' , models .BigAutoField (auto_created = True , primary_key = True , serialize = False , verbose_name = 'ID' )),
23- ('image' , mosquito_alert .images .fields .ProcessedImageField (upload_to = mosquito_alert .images .models .image_upload_to )),
24- ('created_at' , models .DateTimeField (auto_now_add = True )),
25- ('user' , models .ForeignKey (blank = True , null = True , on_delete = django .db .models .deletion .SET_NULL , related_name = 'photos' , to = settings .AUTH_USER_MODEL )),
23+ ("id" , models .UUIDField (default = uuid .uuid4 , editable = False , primary_key = True , serialize = False )),
24+ (
25+ "image" ,
26+ mosquito_alert .images .fields .ProcessedImageField (
27+ upload_to = mosquito_alert .images .models .image_upload_to
28+ ),
29+ ),
30+ ("created_at" , models .DateTimeField (auto_now_add = True )),
31+ (
32+ "user" ,
33+ models .ForeignKey (
34+ blank = True ,
35+ null = True ,
36+ on_delete = django .db .models .deletion .SET_NULL ,
37+ related_name = "photos" ,
38+ to = settings .AUTH_USER_MODEL ,
39+ ),
40+ ),
2641 ],
2742 options = {
28- ' verbose_name' : ' photo' ,
29- ' verbose_name_plural' : ' photos' ,
30- ' ordering' : [' -created_at' ],
31- ' permissions' : [(' view_exif' , ' Can view exif metadata' )],
43+ " verbose_name" : " photo" ,
44+ " verbose_name_plural" : " photos" ,
45+ " ordering" : [" -created_at" ],
46+ " permissions" : [(" view_exif" , " Can view exif metadata" )],
3247 },
3348 ),
3449 ]
0 commit comments