-def setup_badges(sender, **kwargs):
- from forum.badges import ALL_BADGES
+def post_syncdb_callback(sender, **kwargs):
+ # Import the needed libraries to use the database and detect the
+ # DB engine/sever type being currently employed.
+ from django.db import connection, connections
+
+ verbosity = int(kwargs["verbosity"])
+
+ # Get the DB engine being used for persistence for this app.
+ current_db_engine = connections.databases[connection.alias]['ENGINE']
+
+ # Make sure the updates are only executed for a MySQL DB.
+ if current_db_engine.find("mysql") > 0:
+ # Ok, mysql was found in the engine description. Go ahead
+ # and attempt to execute the alter table statements.
+ cursor = connection.cursor()
+
+ # Pair the table names with the columns that need to be updated.
+ updatable_table_columns = {
+ "forum_tag": "name",
+ "auth_user": "username"
+ }