# Generated by Django 4.1.3 on 2022-12-10 15:23 import 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): replaces = [ ("api_tokens", "0001_initial"), ("api_tokens", "0002_auto_20200821_1446"), ("api_tokens", "0003_alter_apitoken_created"), ("api_tokens", "0004_alter_apitoken_token"), ("api_tokens", "0005_alter_apitoken_id"), ] 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=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, ), ), ], ), ]