> Den 16. maj 2016 kl. 19.16 skrev JoeCodeswell <
joecod...@gmail.com>:
>
> How can I flush/clear database for single app, i.e. NOT the Project?
>
> I have a multi-app project.
> In a particular app I created my model with single class.
> I populated the db for that model with the Admin Interface.
> Now i have changed the model to have 2 classes related by a ForeignKey.
> I ran makemigrations on that app and it said, "you are trying to add a non-nullable field 'song' to part without a default; we can't do that (the database needs something to populate existing rows)."
> I don't want to keep the existing populated tables for that app.
) that deletes all relevant model instances, and place the migration before the migration that adds the ForeignKey.