class Migration:
def forwards(self):
- db.add_column('catalogue_book', 'extra_info', JSONField())
+ db.add_column('catalogue_book', 'extra_info', JSONField(null=False, default='{}'))
def backwards(self):
db.delete_column('catalogue_book', 'extra_info')
class Migration:
def forwards(self):
- db.add_column('catalogue_book', 'mp3_file', FileField())
- db.add_column('catalogue_book', 'ogg_file', FileField())
+ db.add_column('catalogue_book', 'mp3_file', FileField(null=True))
+ db.add_column('catalogue_book', 'ogg_file', FileField(null=True))
def backwards(self):
db.delete_column('catalogue_book', 'mp3_file')
class Migration:
def forwards(self):
- db.add_column('catalogue_tag', 'gazeta_link', models.CharField(blank=True, max_length=240))
- db.add_column('catalogue_book', 'gazeta_link', models.CharField(blank=True, max_length=240))
+ db.add_column('catalogue_tag', 'gazeta_link', models.CharField(blank=True, max_length=240, default=''))
+ db.add_column('catalogue_book', 'gazeta_link', models.CharField(blank=True, max_length=240, default=''))
def backwards(self):
db.delete_column('catalogue_tag', 'gazeta_link')
class Migration:
def forwards(self):
- db.add_column('catalogue_tag', 'wiki_link', models.CharField(blank=True, max_length=240))
- db.add_column('catalogue_book', 'wiki_link', models.CharField(blank=True, max_length=240))
+ db.add_column('catalogue_tag', 'wiki_link', models.CharField(blank=True, max_length=240, default=''))
+ db.add_column('catalogue_book', 'wiki_link', models.CharField(blank=True, max_length=240, default=''))
def backwards(self):
db.delete_column('catalogue_tag', 'wiki_link')