<gh_stars>0
# Generated by Django 3.2.12 on 2022-02-25 22:09

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


class Migration(migrations.Migration):

    dependencies = [
        ('store', '0013_auto_20220224_2311'),
    ]

    operations = [
        migrations.RenameModel(
            old_name='CartItem',
            new_name='OrderItem',
        ),
        migrations.RemoveField(
            model_name='order',
            name='address_detail',
        ),
        migrations.CreateModel(
            name='Payment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('stripe_charge_id', models.CharField(max_length=50)),
                ('amount', models.DecimalField(decimal_places=2, max_digits=6)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('city', models.CharField(max_length=256)),
                ('street_1', models.CharField(max_length=256)),
                ('street_2', models.CharField(blank=True, max_length=256, null=True)),
                ('zip_code', models.CharField(max_length=10)),
                ('comment', models.TextField(blank=True, null=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='order',
            name='address',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.DO_NOTHING, to='store.address'),
            preserve_default=False,
        ),
    ]

# Generated by Django 3.2.12 on 2022-02-25 22:09

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


class Migration(migrations.Migration):

    dependencies = [
        ('store', '0013_auto_20220224_2311'),
    ]

    operations = [
        migrations.RenameModel(
            old_name='CartItem',
            new_name='OrderItem',
        ),
        migrations.RemoveField(
            model_name='order',
            name='address_detail',
        ),
        migrations.CreateModel(
            name='Payment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('stripe_charge_id', models.CharField(max_length=50)),
                ('amount', models.DecimalField(decimal_places=2, max_digits=6)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('city', models.CharField(max_length=256)),
                ('street_1', models.CharField(max_length=256)),
                ('street_2', models.CharField(blank=True, max_length=256, null=True)),
                ('zip_code', models.CharField(max_length=10)),
                ('comment', models.TextField(blank=True, null=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='order',
            name='address',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.DO_NOTHING, to='store.address'),
            preserve_default=False,
        ),
    ]
# Generated by Django 3.2.12 on 2022-02-25 22:09