We changed the precision from 5 to 10 and were able to make the datadump. However, we still got the 100 precision error during the database sync as stated below:
`(myevn) 15:53 ~/ontwikkelomgeving $ python3.6 manage.py migrate --run-syncdb
System check identified some issues:
WARNINGS:
?: (mysql.W002) MySQL Strict Mode is not set for database connection 'default'
HINT: MySQL's Strict Mode fixes many data integrity problems in MySQL, such as data truncation upon insertion, by escalating warnings into errors. It is strongly recommended you activate it. See: https://docs.djangoproject.com/en/2.1/ref/databases/#mysql-sql-mode
Operations to perform:
Synchronize unmigrated apps: messages, staticfiles, ziekenhuisroosters
Apply all migrations: Evelien, admin, auth, contenttypes, kinderdagverblijf, sessions
Synchronizing apps without migrations:
Creating tables...
Running deferred SQL...
Running migrations:
Applying contenttypes.0001_initial... OK
Applying contenttypes.0002_remove_content_type_name... OK
Applying auth.0001_initial... OK
Applying auth.0002_alter_permission_name_max_length... OK
Applying auth.0003_alter_user_email_max_length... OK
Applying auth.0004_alter_user_username_opts... OK
Applying auth.0005_alter_user_last_login_null... OK
Applying auth.0006_require_contenttypes_0002... OK
Applying auth.0007_alter_validators_add_error_messages... OK
Applying auth.0008_alter_user_username_max_length... OK
Applying auth.0009_alter_user_last_name_max_length... OK
Applying Evelien.0001_initial...Traceback (most recent call last):
File "/home/ziekenhuisroosters/.virtualenvs/myevn/lib/python3.6/site-packages/django/db/backends/utils.py", line 83, in _execute
return self.cursor.execute(sql)
File "/home/ziekenhuisroosters/.virtualenvs/myevn/lib/python3.6/site-packages/django/db/backends/mysql/base.py", line 71, in execute
return self.cursor.execute(query, args)
File "/home/ziekenhuisroosters/.virtualenvs/myevn/lib/python3.6/site-packages/MySQLdb/cursors.py", line 198, in execute
res = self._query(query)
File "/home/ziekenhuisroosters/.virtualenvs/myevn/lib/python3.6/site-packages/MySQLdb/cursors.py", line 304, in _query
db.query(q)
File "/home/ziekenhuisroosters/.virtualenvs/myevn/lib/python3.6/site-packages/MySQLdb/connections.py", line 217, in query
_mysql.connection.query(self, query)
MySQLdb._exceptions.OperationalError: (1426, "Too big precision 100 specified for column 'plusminuren_def'. Maximum is 65.")
The above exception was the direct cause of the following exception:`
We think you are right that the database still has the 100 precision... do you have any idea what to do next? Can we delete this database table and create it again with the right precisions?
In addition to the above, in the error log we see (even tough we execuded pip install mysqlclient succesfully in the virtual environment) the following:
2019-02-05 17:10:58,110: Error running WSGI application
2019-02-05 17:10:58,111: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
2019-02-05 17:10:58,111: Did you install mysqlclient?
2019-02-05 17:10:58,111: File "/var/www/ziekenhuisroosters_pythonanywhere_com_wsgi.py", line 26, in <module>
2019-02-05 17:10:58,111: application = get_wsgi_application()