Coverage for django_napse/auth/migrations/0002_napseapikey.py: 100%

5 statements  

« prev     ^ index     » next       coverage.py v7.4.3, created at 2024-03-12 13:49 +0000

1# Generated by Django 4.2.5 on 2023-10-14 14:07 

2 

3from django.db import migrations, models 

4import django.db.models.deletion 

5 

6 

7class Migration(migrations.Migration): 

8 

9 dependencies = [ 

10 ("rest_framework_api_key", "0005_auto_20220110_1102"), 

11 ("django_napse_auth", "0001_initial"), 

12 ] 

13 

14 operations = [ 

15 migrations.CreateModel( 

16 name="NapseAPIKey", 

17 fields=[ 

18 ( 

19 "apikey_ptr", 

20 models.OneToOneField( 

21 auto_created=True, 

22 on_delete=django.db.models.deletion.CASCADE, 

23 parent_link=True, 

24 primary_key=True, 

25 serialize=False, 

26 to="rest_framework_api_key.apikey", 

27 ), 

28 ), 

29 ("is_master_key", models.BooleanField(default=False)), 

30 ], 

31 options={ 

32 "verbose_name": "API key", 

33 "verbose_name_plural": "API keys", 

34 "ordering": ("-created",), 

35 "abstract": False, 

36 }, 

37 bases=("rest_framework_api_key.apikey",), 

38 ), 

39 ]