Skip to content

Commit

Permalink
fixed migrations to work n postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
honzakral committed Feb 23, 2012
1 parent d299508 commit cde3b8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ella_galleries/migrations/0001_initial.py
Expand Up @@ -9,8 +9,7 @@
class Migration(SchemaMigration):

depends_on = (
("core", "0001_initial"),
("photos", "0001_initial"),
("core", "0002_initial_publishable"),
)

def forwards(self, orm):
Expand All @@ -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'))),
Expand Down
Expand Up @@ -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):
Expand Down

0 comments on commit cde3b8b

Please sign in to comment.