You probably want the --freeze option to schemamigration

http://south.readthedocs.org/en/latest/ormfreezing.html


On Wed, Jun 4, 2014 at 2:30 PM, Josh B <[email protected]>
wrote:

> All I am trying to create a new model that has a foreignkey to the
> shop.Product model. But for some reason when I try and run the migration I
> get the following error.
>
> ValueError: Cannot successfully create field 'product' for model
> 'shippingspecification': "The model 'product' from the app 'shop' is not
> available in this migration.".
>
> I have tried a couple of things with out success. Anyone have any ideas?
>
> Here is the migration:
>
>
>     def forwards(self, orm):
>
>         # Adding model 'ShippingSpecification'
>
>         db.create_table(u'shipping_shippingspecification', (
>
>             (u'id', self.gf
> ('django.db.models.fields.AutoField')(primary_key=True)),
>
>             ('product', 
> self.gf('django.db.models.fields.related.ForeignKey')(related_name='shipping_product',
> to=orm['shop.Product'])),
>
>             ('length', 
> self.gf('django.db.models.fields.DecimalField')(default=0.0,
> max_digits=7, decimal_places=2)),
>
>             ('width', 
> self.gf('django.db.models.fields.DecimalField')(default=0.0,
> max_digits=7, decimal_places=2)),
>
>             ('height', 
> self.gf('django.db.models.fields.DecimalField')(default=0.0,
> max_digits=7, decimal_places=2)),
>
>             ('weight', 
> self.gf('django.db.models.fields.DecimalField')(default=0.0,
> max_digits=7, decimal_places=2)),
>
>         ))
>
>         db.send_create_signal(u'shipping', ['ShippingSpecification'])
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Stephen McDonald
http://jupo.org

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to