<reponame>lyonkvalid/Audifye
# Generated by Django 3.2.5 on 2021-08-13 19:00

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('authentication', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Artist',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_add', models.DateTimeField(default=django.utils.timezone.now)),
                ('clicks', models.IntegerField(default=0)),
                ('artist', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='library_artist', to='authentication.profile')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-clicks', '-date_add'],
            },
        ),
        migrations.CreateModel(
            name='Collection',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_add', models.DateTimeField(default=django.utils.timezone.now)),
                ('genre', models.CharField(blank=True, choices=[('hip-hop', 'hip-hop'), ('k-pop', 'k-pop'), ('rock', 'rock'), ('regae', 'regea'), ('Trap', 'Trap'), ('Drill', 'Drill'), ('Rap', 'Rap'), ('Altè', 'Altè'), ('Emo', 'Emo'), ('RnB', 'RnB'), ('Pop', 'Pop'), ('Afropop', 'Afropop'), ('Afrobeats', 'Afrobeats'), ('Afrofusion', 'Afrofusion'), ('Grime', 'Grime'), ('Amapiano', 'Amapiano'), ('Soul', 'Soul'), ('Electronic', 'Electronic')], max_length=32, null=True)),
                ('type', models.CharField(choices=[('single', 'single'), ('song', 'song'), ('ep', 'ep'), ('playlist', 'playlist'), ('offline', 'offline'), ('chart', 'chart'), ('album', 'album'), ('instrumental', 'instrumental')], max_length=16)),
                ('description', models.TextField(blank=True, default='', null=True)),
                ('monetize', models.CharField(choices=[('free', 'free'), ('ads', 'ads'), ('paid', 'paid'), ('subscribe', 'subscribe')], default='ads', max_length=16)),
                ('is_collaborative', models.BooleanField(default=False, max_length=24)),
                ('visibility', models.CharField(choices=[('public', 'public'), ('friends', 'friends'), ('private', 'private')], default='public', max_length=24)),
                ('collaborator', models.ManyToManyField(blank=True, related_name='collaborator', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-date_add'],
            },
        ),
        migrations.CreateModel(
            name='MetaData',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('art', models.ImageField(default='#', upload_to='uploads/files/.musics/.arts/')),
                ('clicks', models.IntegerField(default=0)),
                ('title', models.CharField(default='', max_length=32)),
                ('artist', models.CharField(default='', max_length=32)),
                ('UPC', models.CharField(blank=True, max_length=64, null=True)),
                ('ISRC', models.CharField(blank=True, max_length=64, null=True)),
            ],
            options={
                'ordering': ['-clicks'],
            },
        ),
        migrations.CreateModel(
            name='MLToolKit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('country', models.CharField(default='NGN', max_length=24)),
                ('ip', models.GenericIPAddressField()),
            ],
        ),
        migrations.CreateModel(
            name='Song',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(upload_to='uploads/files/.musics/')),
                ('date_add', models.DateTimeField(default=django.utils.timezone.now)),
                ('genre', models.CharField(choices=[('hip-hop', 'hip-hop'), ('k-pop', 'k-pop'), ('rock', 'rock'), ('regae', 'regea'), ('Trap', 'Trap'), ('Drill', 'Drill'), ('Rap', 'Rap'), ('Altè', 'Altè'), ('Emo', 'Emo'), ('RnB', 'RnB'), ('Pop', 'Pop'), ('Afropop', 'Afropop'), ('Afrobeats', 'Afrobeats'), ('Afrofusion', 'Afrofusion'), ('Grime', 'Grime'), ('Amapiano', 'Amapiano'), ('Soul', 'Soul'), ('Electronic', 'Electronic')], max_length=32)),
                ('meta_data', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='models.metadata')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-date_add'],
            },
        ),
        migrations.CreateModel(
            name='Playlist',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_add', models.DateTimeField(default=django.utils.timezone.now)),
                ('clicks', models.IntegerField(default=0)),
                ('collection', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='models.collection')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-clicks', '-date_add'],
            },
        ),
        migrations.CreateModel(
            name='MyLibrary',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(choices=[('offline', 'offline'), ('online', 'online'), ('search', 'search'), ('history', 'history')], max_length=32)),
                ('date_add', models.DateTimeField(default=django.utils.timezone.now)),
                ('artists', models.ManyToManyField(blank=True, to='models.Artist')),
                ('playlists', models.ManyToManyField(blank=True, to='models.Playlist')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-date_add'],
            },
        ),
        migrations.AddField(
            model_name='metadata',
            name='click_info',
            field=models.ManyToManyField(blank=True, to='models.MLToolKit'),
        ),
        migrations.AddField(
            model_name='metadata',
            name='downloads',
            field=models.ManyToManyField(blank=True, related_name='downloads', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='metadata',
            name='streams',
            field=models.ManyToManyField(blank=True, related_name='streams', to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='Library',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=32)),
                ('clicks', models.IntegerField(default=0)),
                ('date_add', models.DateTimeField(default=django.utils.timezone.now)),
                ('collections', models.ManyToManyField(blank=True, to='models.Collection')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-clicks', '-date_add'],
            },
        ),
        migrations.AddField(
            model_name='collection',
            name='meta_data',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='models.metadata'),
        ),
        migrations.AddField(
            model_name='collection',
            name='songs',
            field=models.ManyToManyField(blank=True, to='models.Song'),
        ),
        migrations.AddField(
            model_name='collection',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]

# Generated by Django 3.2.5 on 2021-08-13 19:00

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('authentication', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Artist',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_add', models.DateTimeField(default=django.utils.timezone.now)),
                ('clicks', models.IntegerField(default=0)),
                ('artist', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='library_artist', to='authentication.profile')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-clicks', '-date_add'],
            },
        ),
        migrations.CreateModel(
            name='Collection',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_add', models.DateTimeField(default=django.utils.timezone.now)),
                ('genre', models.CharField(blank=True, choices=[('hip-hop', 'hip-hop'), ('k-pop', 'k-pop'), ('rock', 'rock'), ('regae', 'regea'), ('Trap', 'Trap'), ('Drill', 'Drill'), ('Rap', 'Rap'), ('Altè', 'Altè'), ('Emo', 'Emo'), ('RnB', 'RnB'), ('Pop', 'Pop'), ('Afropop', 'Afropop'), ('Afrobeats', 'Afrobeats'), ('Afrofusion', 'Afrofusion'), ('Grime', 'Grime'), ('Amapiano', 'Amapiano'), ('Soul', 'Soul'), ('Electronic', 'Electronic')], max_length=32, null=True)),
                ('type', models.CharField(choices=[('single', 'single'), ('song', 'song'), ('ep', 'ep'), ('playlist', 'playlist'), ('offline', 'offline'), ('chart', 'chart'), ('album', 'album'), ('instrumental', 'instrumental')], max_length=16)),
                ('description', models.TextField(blank=True, default='', null=True)),
                ('monetize', models.CharField(choices=[('free', 'free'), ('ads', 'ads'), ('paid', 'paid'), ('subscribe', 'subscribe')], default='ads', max_length=16)),
                ('is_collaborative', models.BooleanField(default=False, max_length=24)),
                ('visibility', models.CharField(choices=[('public', 'public'), ('friends', 'friends'), ('private', 'private')], default='public', max_length=24)),
                ('collaborator', models.ManyToManyField(blank=True, related_name='collaborator', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-date_add'],
            },
        ),
        migrations.CreateModel(
            name='MetaData',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('art', models.ImageField(default='#', upload_to='uploads/files/.musics/.arts/')),
                ('clicks', models.IntegerField(default=0)),
                ('title', models.CharField(default='', max_length=32)),
                ('artist', models.CharField(default='', max_length=32)),
                ('UPC', models.CharField(blank=True, max_length=64, null=True)),
                ('ISRC', models.CharField(blank=True, max_length=64, null=True)),
            ],
            options={
                'ordering': ['-clicks'],
            },
        ),
        migrations.CreateModel(
            name='MLToolKit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('country', models.CharField(default='NGN', max_length=24)),
                ('ip', models.GenericIPAddressField()),
            ],
        ),
        migrations.CreateModel(
            name='Song',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(upload_to='uploads/files/.musics/')),
                ('date_add', models.DateTimeField(default=django.utils.timezone.now)),
                ('genre', models.CharField(choices=[('hip-hop', 'hip-hop'), ('k-pop', 'k-pop'), ('rock', 'rock'), ('regae', 'regea'), ('Trap', 'Trap'), ('Drill', 'Drill'), ('Rap', 'Rap'), ('Altè', 'Altè'), ('Emo', 'Emo'), ('RnB', 'RnB'), ('Pop', 'Pop'), ('Afropop', 'Afropop'), ('Afrobeats', 'Afrobeats'), ('Afrofusion', 'Afrofusion'), ('Grime', 'Grime'), ('Amapiano', 'Amapiano'), ('Soul', 'Soul'), ('Electronic', 'Electronic')], max_length=32)),
                ('meta_data', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='models.metadata')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-date_add'],
            },
        ),
        migrations.CreateModel(
            name='Playlist',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_add', models.DateTimeField(default=django.utils.timezone.now)),
                ('clicks', models.IntegerField(default=0)),
                ('collection', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='models.collection')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-clicks', '-date_add'],
            },
        ),
        migrations.CreateModel(
            name='MyLibrary',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(choices=[('offline', 'offline'), ('online', 'online'), ('search', 'search'), ('history', 'history')], max_length=32)),
                ('date_add', models.DateTimeField(default=django.utils.timezone.now)),
                ('artists', models.ManyToManyField(blank=True, to='models.Artist')),
                ('playlists', models.ManyToManyField(blank=True, to='models.Playlist')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-date_add'],
            },
        ),
        migrations.AddField(
            model_name='metadata',
            name='click_info',
            field=models.ManyToManyField(blank=True, to='models.MLToolKit'),
        ),
        migrations.AddField(
            model_name='metadata',
            name='downloads',
            field=models.ManyToManyField(blank=True, related_name='downloads', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='metadata',
            name='streams',
            field=models.ManyToManyField(blank=True, related_name='streams', to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='Library',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=32)),
                ('clicks', models.IntegerField(default=0)),
                ('date_add', models.DateTimeField(default=django.utils.timezone.now)),
                ('collections', models.ManyToManyField(blank=True, to='models.Collection')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-clicks', '-date_add'],
            },
        ),
        migrations.AddField(
            model_name='collection',
            name='meta_data',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='models.metadata'),
        ),
        migrations.AddField(
            model_name='collection',
            name='songs',
            field=models.ManyToManyField(blank=True, to='models.Song'),
        ),
        migrations.AddField(
            model_name='collection',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
# Generated by Django 3.2.5 on 2021-08-13 19:00