diff --git a/django_lostplaces/lostplaces/migrations/0002_temp_create.py b/django_lostplaces/lostplaces/migrations/0002_temp_create.py deleted file mode 100644 index 6774831..0000000 --- a/django_lostplaces/lostplaces/migrations/0002_temp_create.py +++ /dev/null @@ -1,60 +0,0 @@ -# Generated by Django 3.1.1 on 2020-09-27 17:39 -from django.conf import settings -import django.core.validators -from django.db import migrations, models -import django.db.models.deletion -import easy_thumbnails.fields -import lostplaces.models -import taggit.managers - - -class Migration(migrations.Migration): - - dependencies = [ - ('lostplaces', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='Expireable', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('created_when', models.DateTimeField(auto_now_add=True)), - ('expires_when', models.DateTimeField()), - ], - ), - migrations.AddField( - model_name='photoalbum', - name='id', - field=models.AutoField(auto_created=True, null=True, primary_key=True, serialize=False, verbose_name='ID'), - preserve_default=False, - ), - migrations.AddField( - model_name='photoalbum', - name='label', - field=models.CharField(null=True, max_length=100), - preserve_default=False, - ), - migrations.AddField( - model_name='photoalbum', - name='submitted_by', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='photoalbums', to='lostplaces.explorer'), - ), - migrations.AddField( - model_name='photoalbum', - name='submitted_when', - field=models.DateTimeField(auto_now_add=True, null=True), - ), - migrations.AddField( - model_name='photoalbum', - name='url', - field=models.URLField(null=True), - preserve_default=False, - ), - migrations.AddField( - model_name='voucher', - name='expireable_ptr', - field=models.OneToOneField(auto_created=True, null=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='lostplaces.expireable'), - preserve_default=False, - ), - ] diff --git a/django_lostplaces/lostplaces/migrations/0003_migrate_data.py b/django_lostplaces/lostplaces/migrations/0003_migrate_data.py deleted file mode 100644 index 1b430a1..0000000 --- a/django_lostplaces/lostplaces/migrations/0003_migrate_data.py +++ /dev/null @@ -1,27 +0,0 @@ -# Generated by Django 3.1.1 on 2020-09-27 17:40 - -from django.conf import settings -import django.core.validators -from django.db import migrations, models -import django.db.models.deletion -import easy_thumbnails.fields -import lostplaces.models -import taggit.managers -from django.apps import apps as global_apps - -def migrate_data(apps, schema_editor): - OldModel = apps.get_model('lostplaces', 'ExternalLink') - NewModel = apps.get_model('lostplaces', 'PhotoAlbum') - - print(OldModel, NewModel) - -class Migration(migrations.Migration): - - dependencies = [ - ('lostplaces', '0002_temp_create'), - ] - - operations = [ -# migrations.RunPython(migrate_data), - ] - diff --git a/django_lostplaces/lostplaces/migrations/0004_alter_fields_back.py b/django_lostplaces/lostplaces/migrations/0004_alter_fields_back.py deleted file mode 100644 index 487f186..0000000 --- a/django_lostplaces/lostplaces/migrations/0004_alter_fields_back.py +++ /dev/null @@ -1,78 +0,0 @@ -# Generated by Django 3.1.1 on 2020-09-27 17:40 - -from django.conf import settings -import django.core.validators -from django.db import migrations, models -import django.db.models.deletion -import easy_thumbnails.fields -import lostplaces.models -import taggit.managers -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('lostplaces', '0003_migrate_data'), - ] - - operations = [ - migrations.AlterField( - model_name='voucher', - name='expireable_ptr', - field=models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='lostplaces.expireable'), - preserve_default=False, - ), - migrations.AlterField( - model_name='photoalbum', - name='url', - field=models.URLField(), - preserve_default=False, - ), - migrations.AlterField( - model_name='photoalbum', - name='label', - field=models.CharField(max_length=100), - preserve_default=False, - ), - migrations.AlterField( - model_name='photoalbum', - name='id', - field=models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), - preserve_default=False, - ), - migrations.RemoveField( - model_name='photoalbum', - name='externallink_ptr', - ), - migrations.RemoveField( - model_name='voucher', - name='created_when', - ), - migrations.RemoveField( - model_name='voucher', - name='expires_when', - ), - migrations.RemoveField( - model_name='voucher', - name='id', - ), - migrations.AlterField( - model_name='photoalbum', - name='place', - field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='photoalbums', to='lostplaces.place'), - ), - migrations.AlterField( - model_name='place', - name='submitted_by', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='places', to='lostplaces.explorer'), - ), - migrations.AlterField( - model_name='placeimage', - name='submitted_by', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='placeimages', to='lostplaces.explorer'), - ), - migrations.DeleteModel( - name='ExternalLink', - ), - ]