Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Migrations? #60

Open
dolugen opened this issue Nov 7, 2012 · 0 comments
Open

Migrations? #60

dolugen opened this issue Nov 7, 2012 · 0 comments

Comments

@dolugen
Copy link

dolugen commented Nov 7, 2012

I was getting some database errors today on emit_notices command. Here is the end of the traceback:

...
OperationalError: (1054, "Unknown column 'recipient_id' in 'field list'")

What? The notification model says there is recipient_id (as well as sender_id), but my database have user_id field instead in notification_notice table...

Hmm, my version is 0.2, but my database structure differs. Finally, I checked the model of 0.1 and there it was: user_id.

So, I had to do:

ALTER TABLE  `notification_notice` CHANGE  `user_id`  `recipient_id` INT( 11 ) NOT NULL;
ALTER TABLE  `notification_notice` ADD  `sender_id` INT NULL AFTER  `recipient_id`;

No South migration was supplied for upgrading from 0.1 to 0.2. But I guess everyone is using "fresh" 0.2 install, so no one complained before. I'm just reporting this in case anyone did a late upgrade like I did and had the same trouble.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant