Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed migrations to work n postgres

  • Loading branch information...
commit cde3b8b56bd7e6f0c4d5eafbaa6e83a020357b44 1 parent d299508
Honza Král HonzaKral authored
5 ella_galleries/migrations/0001_initial.py
View
@@ -9,8 +9,7 @@
class Migration(SchemaMigration):
depends_on = (
- ("core", "0001_initial"),
- ("photos", "0001_initial"),
+ ("core", "0002_initial_publishable"),
)
def forwards(self, orm):
@@ -26,7 +25,7 @@ def forwards(self, orm):
# Adding model 'GalleryItem'
db.create_table('galleries_galleryitem', (
('id', models.AutoField(primary_key=True)),
- ('gallery', models.ForeignKey(orm.Gallery, verbose_name=_("Parent gallery"))),
+ ('gallery_id', models.IntegerField(null=False)),
('target_ct', models.ForeignKey(orm['contenttypes.ContentType'], verbose_name=_('Target content type'))),
('target_id', models.IntegerField(_('Target ID'), db_index=True)),
('order', models.IntegerField(_('Object order'))),
1  ella_galleries/migrations/0005_rename_tables_to_ella_galleries_prefix.py
View
@@ -9,6 +9,7 @@ class Migration(SchemaMigration):
def forwards(self, orm):
db.rename_table('galleries_gallery', 'ella_galleries_gallery')
db.rename_table('galleries_galleryitem', 'ella_galleries_galleryitem')
+ db.alter_column('ella_galleries_galleryitem', 'gallery_id', models.ForeignKey(orm['ella_galleries.Gallery'], null=False))
def backwards(self, orm):
Please sign in to comment.
Something went wrong with that request. Please try again.