# Generated by Django 2.2 on 2019-05-03 17:56

import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models

import p2.api.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('p2_core', '0017_auto_20190503_1755'),
    ]

    operations = [
        migrations.CreateModel(
            name='APIKey',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField()),
                ('access_key', models.CharField(default=p2.api.models.get_access_key, max_length=20)),
                ('secret_key', models.CharField(default=p2.api.models.get_secret_key, max_length=40)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('volume', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, to='p2_core.Volume')),
            ],
            options={
                'verbose_name': 'API Key',
                'verbose_name_plural': 'API Keys',
                'unique_together': {('access_key', 'secret_key')},
            },
        ),
    ]

# Generated by Django 2.2 on 2019-05-03 17:56

import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models

import p2.api.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('p2_core', '0017_auto_20190503_1755'),
    ]

    operations = [
        migrations.CreateModel(
            name='APIKey',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField()),
                ('access_key', models.CharField(default=p2.api.models.get_access_key, max_length=20)),
                ('secret_key', models.CharField(default=p2.api.models.get_secret_key, max_length=40)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('volume', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, to='p2_core.Volume')),
            ],
            options={
                'verbose_name': 'API Key',
                'verbose_name_plural': 'API Keys',
                'unique_together': {('access_key', 'secret_key')},
            },
        ),
    ]

# Generated by Django 2.2 on 2019-05-03 17:56