You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a developer, I should set up the necessary database items so that the database is viewable through Heroku
Relevant Information:
The database provided by Django is only accessible within Gitpod and is not suitable for a production environment. Your deployed project on Heroku will not be able to access it. So, you need to create a new database that can be accessed by Heroku.
The code that has been commented out connects your Django application to the created db.sqlite3 database within your repo. However, as we know, that database is not suitable for production. This line of code separates the database URL stored by your env.py file into the relevant name and password
Acceptance Criteria:
After creating the database, data will be viewable by clicking on the STATS tab on the left-hand side of the screen.
The database statistics will show the number of rows in a table.
User Story:
As a developer, I should set up the necessary database items so that the database is viewable through Heroku
Relevant Information:
The database provided by Django is only accessible within Gitpod and is not suitable for a production environment. Your deployed project on Heroku will not be able to access it. So, you need to create a new database that can be accessed by Heroku.
The code that has been commented out connects your Django application to the created db.sqlite3 database within your repo. However, as we know, that database is not suitable for production. This line of code separates the database URL stored by your env.py file into the relevant name and password
Acceptance Criteria:
Related User Stories:
Tasks:
Log in to ElephantSQL.com to access your dashboard
Click 'Create New Instance'
Set up your plan
Select 'Select Region'
Select a data center near you and click 'Review'
Create an instance
Return to the ElephantSQL dashboard and click on the database instance name for this project
In the URL section, click the copy icon to copy the database URL
Comment out the original
DATABASES
variable and addDATABASES = { 'default': dj_database_url.parse(os.environ.get("DATABASE_URL")) }
Migrate your database structure to the newly-connected ElephantSQL database
python manage.py migrate
The text was updated successfully, but these errors were encountered: