forked from damianmoore/easy-thumbnails
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes the max_length on the File.name from 255 to 1023 Adds: - django migration - south migration
- Loading branch information
Ziyad Soobhan
committed
Jul 6, 2016
1 parent
04b503c
commit 8eebda2
Showing
4 changed files
with
83 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
easy_thumbnails/migrations/0003_alter_name_max_length_to_1023.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import models, migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('easy_thumbnails', '0002_thumbnaildimensions'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='source', | ||
name='name', | ||
field=models.CharField(max_length=1023, db_index=True), | ||
preserve_default=True, | ||
), | ||
migrations.AlterField( | ||
model_name='thumbnail', | ||
name='name', | ||
field=models.CharField(max_length=1023, db_index=True), | ||
preserve_default=True, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
...thumbnails/south_migrations/0017_auto__chg_field_source_name__chg_field_thumbnail_name.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# -*- coding: utf-8 -*- | ||
from south.utils import datetime_utils as datetime | ||
from south.db import db | ||
from south.v2 import SchemaMigration | ||
from django.db import models | ||
|
||
|
||
class Migration(SchemaMigration): | ||
|
||
def forwards(self, orm): | ||
|
||
# Changing field 'Source.name' | ||
db.alter_column(u'easy_thumbnails_source', 'name', self.gf('django.db.models.fields.CharField')(max_length=1023)) | ||
|
||
# Changing field 'Thumbnail.name' | ||
db.alter_column(u'easy_thumbnails_thumbnail', 'name', self.gf('django.db.models.fields.CharField')(max_length=1023)) | ||
|
||
def backwards(self, orm): | ||
|
||
# Changing field 'Source.name' | ||
db.alter_column(u'easy_thumbnails_source', 'name', self.gf('django.db.models.fields.CharField')(max_length=255)) | ||
|
||
# Changing field 'Thumbnail.name' | ||
db.alter_column(u'easy_thumbnails_thumbnail', 'name', self.gf('django.db.models.fields.CharField')(max_length=255)) | ||
|
||
models = { | ||
u'easy_thumbnails.source': { | ||
'Meta': {'unique_together': "((u'storage_hash', u'name'),)", 'object_name': 'Source'}, | ||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), | ||
'name': ('django.db.models.fields.CharField', [], {'max_length': '1023', 'db_index': 'True'}), | ||
'storage_hash': ('django.db.models.fields.CharField', [], {'max_length': '40', 'db_index': 'True'}) | ||
}, | ||
u'easy_thumbnails.thumbnail': { | ||
'Meta': {'unique_together': "((u'storage_hash', u'name', u'source'),)", 'object_name': 'Thumbnail'}, | ||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), | ||
'name': ('django.db.models.fields.CharField', [], {'max_length': '1023', 'db_index': 'True'}), | ||
'source': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'thumbnails'", 'to': u"orm['easy_thumbnails.Source']"}), | ||
'storage_hash': ('django.db.models.fields.CharField', [], {'max_length': '40', 'db_index': 'True'}) | ||
}, | ||
u'easy_thumbnails.thumbnaildimensions': { | ||
'Meta': {'object_name': 'ThumbnailDimensions'}, | ||
'height': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}), | ||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'thumbnail': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "u'dimensions'", 'unique': 'True', 'to': u"orm['easy_thumbnails.Thumbnail']"}), | ||
'width': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}) | ||
} | ||
} | ||
|
||
complete_apps = ['easy_thumbnails'] |