Migrations

Ain’t no flock of birds.

So if we’ve been following spapas’ tutorial on how to set-up Wagtail, we will also know how to do a syncdb and migrate

Now that my Wagtail dashboard is finally up, I can move on to the next step in the tutorial. Adding a blog page.

Bump! Migration draws up Not Synced (use migrations) on my wagtails and taggit. But running the usual manage.py migrate returns

— nothing to migrate

Solution:

1. Use schemamigrate

2. Wait patiently for changes to catch up?

SCHEMAMIGRATE

This means I’d use South to handle the migration. Like in this answer by running

python manage.py schemamigration --initial wagweb

This returns:

The error was: table "wagweb_blogpage" already exists
 ! Error found during real run of migration! Aborting.
! Since you have a database that does not support running
 ! schema-altering statements in transactions, we have had 
 ! to leave it in an interim state between migrations.

 

This means I shouldn’t be using South for migration in this format since Wagtail is already handling that.

Despite this error, I have now refreshed my Wagtail dashboard again and notice that my blogpage template is indeed in!

Maybe I should use solution #2.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s