You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: request_token/migrations/0001_initial.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ class Migration(migrations.Migration):
23
23
('issued_at', models.DateTimeField(help_text='Time the token was created, set in the initial save.', null=True, blank=True)),
24
24
('max_uses', models.IntegerField(default=1, help_text='Cap on the number of times the token can be used, defaults to 1 (single use).')),
25
25
('used_to_date', models.IntegerField(default=0, help_text='Denormalised count of the number times the token has been used.')),
26
-
('user', models.ForeignKey(blank=True, to=settings.AUTH_USER_MODEL, help_text='Intended recipient of the JWT.', null=True)),
26
+
('user', models.ForeignKey(blank=True, to=settings.AUTH_USER_MODEL, help_text='Intended recipient of the JWT.', null=True, on_delete=models.deletion.CASCADE)),
27
27
],
28
28
),
29
29
migrations.CreateModel(
@@ -33,8 +33,8 @@ class Migration(migrations.Migration):
33
33
('user_agent', models.TextField(help_text='User-agent of client used to make the request.', blank=True)),
34
34
('client_ip', models.CharField(help_text='Client IP of device used to make the request.', max_length=15)),
35
35
('timestamp', models.DateTimeField(help_text='Time the request was logged.')),
36
-
('token', models.ForeignKey(help_text='The RequestToken that was used.', to='request_token.RequestToken')),
37
-
('user', models.ForeignKey(blank=True, to=settings.AUTH_USER_MODEL, help_text='The user who made the request (None if anonymous).', null=True)),
36
+
('token', models.ForeignKey(help_text='The RequestToken that was used.', to='request_token.RequestToken', on_delete=models.deletion.CASCADE)),
37
+
('user', models.ForeignKey(blank=True, to=settings.AUTH_USER_MODEL, help_text='The user who made the request (None if anonymous).', null=True, on_delete=models.deletion.CASCADE)),
0 commit comments