# Generated by Django 4.1.3 on 2022-12-10 15:23 import apps.api_tokens.models import bitfield.models from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name="APIToken", fields=[ ( "id", models.BigAutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID", ), ), ( "token", models.CharField( default=apps.api_tokens.models.generate_token, editable=False, max_length=64, unique=True, ), ), ("label", models.CharField(blank=True, max_length=255)), ( "scopes", bitfield.models.BitField( ( "project:read", "project:write", "project:admin", "project:releases", "team:read", "team:write", "team:admin", "event:read", "event:write", "event:admin", "org:read", "org:write", "org:admin", "member:read", "member:write", "member:admin", ), default=None, ), ), ("created", models.DateTimeField(auto_now_add=True, db_index=True)), ( "user", models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, ), ), ], ), ]