New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: MySQL/MariaDB error with typeclasses tag migration 0007 #1184
Comments
|
That's what I learned on the wiki, I should use 'evennia migrate'
directly. However this still failed with an empty (and clean)
database. The error was the same. In the log of the IRC channel is a
URL to a StackOverflow question/answer on the same topic, it seems,
although I was unable to find a solution.
Quick fix: for the time being, I ran 'evennia migrate' (that failed)
and, after that, 'evennia migrate --fake' to "pass" the 7th migration
without error. This temporarily solves the issue, although I guess my
tables aren't up-to-date and errors will arise sooner or later.
…On 1/30/2017 11:13 PM, Griatch wrote:
|evennia makemigrations| should not be used except on one's own
models. The MySQL wiki page was updated. Will have to test with mysql
to see if I can reproduce.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1184 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB_doqr3we_xQqwRTPBh1mItF1lqpbAaks5rXt8DgaJpZM4LyQmk>.
|
I am not sure this is related, but a similar error is shown on a Stack overflow post. If I'm following well, the constraint that is sought doesn't match the one that was created. Perhaps quick editing in the migration file would allow to fix it. I'll check. |
I still don't get the error. Someone with a better understanding of Django migrations might though. Here's what I've gathered. After migration 6, the table
The constraint that causes the error contains only three fields (db_key, db_category and db_tagtype). It looks like it could be ``typeclasses_tag_db_key_31dd2997_uniq I hope this helps in debugging the error. I have a working MySQL server (MariaDB on Windows), don't hesitate if there's something to test. |
I just ran this on mysql from a fresh install and didn't get any traceback at migration. I take it you are testing it with a pre-populated database? |
No, it was a newly-created database as described on the wiki. I followed the instructions step by step. But I'm running MariaDB on Windows, it might make a difference. |
As far as I can tell at this time, this appears to be a MariaDB error, not a MySQL error. I get errors (not this one though) with MariaDB while it works with MySQL. Maybe someone else can try. |
Received the same errors when trying to migrate, as @Griatch put it, a pre-populated database into MySQL (God and tutorial_world were both created, which looks to be a decent amount of data).
At this point, I ran the initial migrate and everything completed without incident. Server initialized and started correctly and the God character has been properly created. I can log in and install tutorial_world, and start playing around with it. Also can confirm that data is being generated correctly in MySQL. |
@depwl9992 Good to hear it works for you, this appears to be a MariaDB error rather than a MySQL error. Oh, and I added a note about the need for a Python bridge to the mysql doc thanks. :) |
@Griatch Alright. I just figured I'd throw in my 2 cents, since I was getting the same behavior with MySQL as well. But what you're saying is the symptoms were maybe caused by a slightly different thing then? Actually, come to think of it, I'm not even sure what Maria is. Does this run in tandem with MySQL, or as an alternative? |
I've been getting this similar error; I've been getting it when I start with an existing sqllite db migrating to a new MySQL db, and when I've just started the first evennia migrate into a new MySQL db. Did a whole new clone of Evennia with the latest commit, did evennia --init , setup it up for sqllite and did a migrate. Started the game with just the Superuser and limbo. Setup up settings.py for mysql, and did a migrate in my folder only. Gave me the traceback. Did a whole new clone of Evennia with the latest commit, did evennia --init , setup it up for mysql and did a migrate into a clean db. Gave me the traceback.
|
Just to add something to this, I don't have any problems with MariaDB. Migrations ran perfectly fine. Server is running Ubuntu Server 16.04 Evennia: |
SOLVED: Somewhere on the Evennia wiki (and elsewhere in Django documentation) users are directed to set up their database by using something like:
If you did this, then you experienced this error. You may have experienced this error for other reasons, but if you did this, then you experienced this error. We know for sure that this affects MySQL and MariaDB, but it probably affects every other database Django interacts with too. If you use the external db.cnf then when django.db.backends.mysql.introspection tries to do a query, it pulls the database name for that query from self.connection.settings_dict which is totally unpopulated. There's no username, no password, no db address, no database name. So the query always always always returns NOTHING and that's why you experienced this error. Your solution is to put the following directly into your Evennia configuration settings file. If you want everybody on your git to know your db information (not a big deal if you did a proper setup, with a firewall blocking external access to database ports on top of mysql allowing access to your user only from localhost or only from whatever static IP your Evennia will be connecting from), you'd use settings.py. If you're a little less up to speed on firewalls and database user configurations then you DEFINITELY want to put this into secret_settings.py which Evennia has kindly slipped into .gitignore for you by default so anyone on your game's git team won't be seeing it. If you aren't sure which one to use, use secret_settings.py
|
@tekmunkey thanks so much. I tested it and it worked fine out of the box. I guess we could close this issue, since the wiki has been updated too. |
@tekmunkey Excellent, thanks for the explanation and solution. That's a weird error. |
1 similar comment
@tekmunkey Excellent, thanks for the explanation and solution. That's a weird error. |
Brief summary of issue / Description of requested feature:
Since the new migration, 'evennia migrate' hangs. See traceback below.
Steps to reproduce the issue / Reasons for adding feature:
I am using MySQL to host the evennia database. Everything worked until I pulled and installed a new, clean database.
The text was updated successfully, but these errors were encountered: