deployment-docs

Django (PP4) : Create a database

These steps will create a new PostgreSQL database instance for use with your project.


As your database is currently hosted on Heroku, you will need to move your data out of it. So first, we will create a new database with a free service at ElephantSQL

If you don't have an ElephantSQL.com account yet, the steps to create one are here.

Process

  1. Log in to ElephantSQL.com to access your dashboard

    elephant s q l dashboard

  2. Click “Create New Instance

    create new instance button

  3. Set up your plan

    • Give your plan a Name (this is commonly the name of the project)
    • Select the Tiny Turtle (Free) plan
    • You can leave the Tags field blank

      plan details input boxes

  4. Select “Select Region

    data center selection

  5. Select a data center near you

    data center selection

    If you receive a message saying "Error: No cluster available in your-chosen-data-center yet", choose another region. Note: You're free to use any of the available free data centers, be it AWS, Azure or any of the other providers.

  6. Then click “Review

    review button

  7. Check your details are correct and then click “Create instance

    details of a database instance with a create instance button

  8. Return to the ElephantSQL dashboard and click on the database instance name for this project

    dashboard populated with instances

Up Next

That’s the database created, but what about your existing content? Well our very own Matt Rudge has written a handy tool to help you out.