From b31357e34f90cb4298ea8a717017e286b1d853ba Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Fri, 20 Jan 2017 15:22:17 -0500 Subject: [PATCH] redo migrations --- dbfilestorage/migrations/0001_initial.py | 4 +++- .../migrations/0002_add_filehash_rename_files.py | 12 ------------ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/dbfilestorage/migrations/0001_initial.py b/dbfilestorage/migrations/0001_initial.py index 838d2c6..8ac6821 100644 --- a/dbfilestorage/migrations/0001_initial.py +++ b/dbfilestorage/migrations/0001_initial.py @@ -17,8 +17,10 @@ class Migration(migrations.Migration): name='DBFile', fields=[ ('name', models.CharField(max_length=100, - primary_key=True, serialize=False)), + ('filehash', models.CharField(max_length=32, + primary_key=True, + serialize=False)), ('content_type', models.CharField(max_length=100)), ('b64', models.TextField()), ], diff --git a/dbfilestorage/migrations/0002_add_filehash_rename_files.py b/dbfilestorage/migrations/0002_add_filehash_rename_files.py index 7d3666b..b0b5a82 100644 --- a/dbfilestorage/migrations/0002_add_filehash_rename_files.py +++ b/dbfilestorage/migrations/0002_add_filehash_rename_files.py @@ -27,18 +27,6 @@ class Migration(migrations.Migration): ] operations = [ - migrations.AlterField( - model_name='dbfile', - name='name', - field=models.CharField(max_length=100), - ), - migrations.AddField( - model_name='dbfile', - name='filehash', - field=models.CharField(default='filehash', max_length=32, primary_key=True, serialize=False), - preserve_default=False, - ), - migrations.RunPython(copy_filehash), migrations.RunPython(fix_filename), ]