Closed erasmus closed 8 years ago
@avorio I tried to take this online. Get 500 Error on the artboard view.
Could you please have a look?
You should turn Debug = True
to go beyond the Error 500. I'm doing that now.
Here's the error:
It looks like the database has not been populated. I'm guessing it's because Heroku is not copying the database upon deployment of review branches. I'll investigate now.
YES, my assumption was correct. The database for the review branch was empty.
Here's how I solved it (via Heroku CLI):
# 'python manage.py migrate' is the Django command to build the database
# Below is how you run that command directly in a Heroku instance
heroku run python manage.py migrate --app danandphil-pr-46
Here's the output:
Operations to perform:
Apply all migrations: contenttypes, auth, admin, artboard, sessions
Running migrations:
Rendering model states... DONE
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying admin.0001_initial... OK
Applying admin.0002_logentry_remove_auto_add... OK
Applying artboard.0001_initial... OK
Applying contenttypes.0002_remove_content_type_name... 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 sessions.0001_initial... OK
Now that URL is generating an error 404, which is expected as the database [structure] has been built but there are no artboards in it. See the troubleshooting image below.
Yay! Your review branch seems to be working just fine :)
Except for the cutout, which is not the one I chose in the previous screen. See:
I just added the script to populate the database to this branch. Let's get this deployed to master eventually so that the next review branches are built properly.
@avorio seems like the migrate script didn't execute?
You're right. It didn't. Damn it.
I just executed it manually now and the error 404 is back ON (as it should). All set.
Do I need to run manually after each deploy? Because I get
Do I need to run manually after each deploy?
No, unless you've made changes to the database schema.
But leave that to me anyway, please; I'm the guardian of the models :)
Also, your syntax is incorrect. It's:
heroku run [command] --app [name of the app, e.g. 'danandphil']
This may be why, the script didn't execute...
There was a runaway comma in there...
Did you fix it?
Yup
Ok, great!
Fix #30 Fix #41