Coverage for django_email_accounts/migrations/0001_initial_v2.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v6.5.0, created at 2025-01-12 09:15 +0000

1# Generated by Django 3.2.20 on 2023-08-19 16:13 

2 

3from django.db import migrations, models 

4import django.db.models.deletion 

5 

6 

7class Migration(migrations.Migration): 

8 

9 initial = True 

10 

11 replaces = [ 

12 ('django_email_accounts', '0001_initial'), 

13 ('django_email_accounts', '0002_django18_compat'), 

14 ('django_email_accounts', '0003_user_email_blank_user'), 

15 ('django_email_accounts', '0004_auto_20230731_2032'), 

16 ('django_email_accounts', '0005_auto_20230808_2105'), 

17 ('django_email_accounts', '0006_alter_user_id'), 

18 ] 

19 

20 dependencies = [ 

21 ('auth', '0012_alter_user_first_name_max_length'), 

22 ] 

23 

24 operations = [ 

25 migrations.CreateModel( 

26 name='User', 

27 fields=[ 

28 ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 

29 ('password', models.CharField(max_length=128, verbose_name='password')), 

30 ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), 

31 ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), 

32 ('main_email', models.EmailField(max_length=255, unique=True, verbose_name='email')), 

33 ('first_name', models.CharField(blank=True, max_length=100, null=True)), 

34 ('last_name', models.CharField(blank=True, max_length=100, null=True)), 

35 ('is_active', models.BooleanField(default=False)), 

36 ('is_staff', models.BooleanField(default=False)), 

37 ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')), 

38 ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')), 

39 ], 

40 options={ 

41 'abstract': False, 

42 }, 

43 ), 

44 migrations.CreateModel( 

45 name='UserRegistrationConfirmation', 

46 fields=[ 

47 ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 

48 ('confirmation_key', models.CharField(max_length=40, unique=True)), 

49 ('date_created', models.DateTimeField(auto_now_add=True)), 

50 ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='confirmation', to='django_email_accounts.user')), 

51 ], 

52 options={ 

53 'abstract': False, 

54 }, 

55 ), 

56 migrations.CreateModel( 

57 name='UserEmail', 

58 fields=[ 

59 ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 

60 ('email', models.EmailField(max_length=244, unique=True)), 

61 ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='emails', to='django_email_accounts.user')), 

62 ], 

63 ), 

64 migrations.CreateModel( 

65 name='ResetPasswordConfirmation', 

66 fields=[ 

67 ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 

68 ('confirmation_key', models.CharField(max_length=40, unique=True)), 

69 ('date_created', models.DateTimeField(auto_now_add=True)), 

70 ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reset_password_confirmations', to='django_email_accounts.user')), 

71 ], 

72 options={ 

73 'abstract': False, 

74 }, 

75 ), 

76 migrations.CreateModel( 

77 name='MergeAccountConfirmation', 

78 fields=[ 

79 ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 

80 ('confirmation_key', models.CharField(max_length=40, unique=True)), 

81 ('date_created', models.DateTimeField(auto_now_add=True)), 

82 ('initial_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='merge_account_initial_set', to='django_email_accounts.user')), 

83 ('merge_with', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='merge_account_with_set', to='django_email_accounts.user')), 

84 ], 

85 options={ 

86 'abstract': False, 

87 }, 

88 ), 

89 migrations.CreateModel( 

90 name='AddEmailConfirmation', 

91 fields=[ 

92 ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 

93 ('confirmation_key', models.CharField(max_length=40, unique=True)), 

94 ('date_created', models.DateTimeField(auto_now_add=True)), 

95 ('email', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_email_accounts.useremail')), 

96 ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_email_accounts.user')), 

97 ], 

98 options={ 

99 'abstract': False, 

100 }, 

101 ), 

102 ]