-
Notifications
You must be signed in to change notification settings - Fork 0
Reference for Misc. Issue Fixes
##Resolving issues with migrations when pulling commit c25d39f after stega.py was integrated into the site##
When you pull commit c25d39f there is a good chance there will be database conflicts. Once you pull, you have to run python manage.py makemigrations and python manage.py migrate so that the new models that were added for the encryptions can be added to the database as tables. However, there are some issues. If you do this, and run the site you will see an error like the one below when you try to access the Encrypt page.
If you follow the steps outlined below the screenshot, this should resolve the issue.
This is, hopefully, a one-time issue. After you do this there shouldn't be issues again but we will see as we go.
While postgresql is on, type psql in your command line to start psql shell.
DROP DATABASE steganography;
CREATE DATABASE steganography;
ALTER ROLE team SET client_encoding TO 'utf8';
ALTER ROLE team SET default_transaction_isolation TO 'read committed';
ALTER ROLE team SET timezone TO 'UTC';
ALTER USER team CREATEDB;
GRANT ALL PRIVILEGES ON DATABASE steganography TO team;
\q
Then in the site directory type python manage.py makemigrations main
Then python manage.py migrate
If you got no errors, try running the site again with python manage.py runserver and going to the encrypt page.
If everything works you should now see an upload form for encrypting.
Let Gene, Duncan or Deborah know if you run into any issues with this or still cannot fix it.
