Commit 99c8d6b8 by benjaoming

Merge pull request #330 from spookylukey/reset_notifications_migrations

Migrations reset on the rather messed up notifications app
parents cf96c61a 38c0007a
...@@ -44,6 +44,11 @@ So it's not actually a missing data migration in 0.0.24 that's the reason ...@@ -44,6 +44,11 @@ So it's not actually a missing data migration in 0.0.24 that's the reason
why django-nyt starts out with zero subscriptions. It was a table renaming why django-nyt starts out with zero subscriptions. It was a table renaming
in 0.0.23 that caused the error. in 0.0.23 that caused the error.
If you wish to preserve your subscription data as much as possible, you should
do a plain text dump of the table ``notifications_articlesubscription`` using
your database tools. At the end up the upgrade process, you will have to
manually import this data into the database.
If you are having problems, please consider re-running the migrations If you are having problems, please consider re-running the migrations
for notifications like so: for notifications like so:
...@@ -56,6 +61,10 @@ Don't worry, just fake the backwards migration: ...@@ -56,6 +61,10 @@ Don't worry, just fake the backwards migration:
python manage.py migrate notifications zero --fake python manage.py migrate notifications zero --fake
If you get ``relation "notifications_articlesubscription" already exists`` you
may need to do a manual ``DROP TABLE notifications_articlesubscription;`` using
your DB shell (after backing up this data).
In order to create notifications for all article authors and editors, In order to create notifications for all article authors and editors,
run the following management command: run the following management command:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment