docs: add neon heroku-specific migration guide

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6302
GitOrigin-RevId: 5dfc0c6a194f42c48a5226902e02b80806cf35b3
This commit is contained in:
Rob Dominguez 2022-10-12 10:08:47 -05:00 committed by hasura-bot
parent 9242aea138
commit ac3c054b27
2 changed files with 27 additions and 44 deletions

View File

@ -26,8 +26,8 @@ This guide explains how to connect a new or existing Postgres database hosted on
In August of 2022, Heroku announced the
[deprecation of their free resources](https://devcenter.heroku.com/changelog-items/2461). Starting November 28th, 2022,
if you have a Hasura project connected to a free tier Heroku database, you'll need to either upgrade your Heroku
account or migrate your database to a new database provider.
if you have a Hasura project connected to a free tier Heroku database, you'll need to either upgrade your Heroku account
or migrate your database to a new database provider.
:::
@ -48,6 +48,7 @@ to help you:
### Heroku-specific migration guides
- [Crunchy Postgres](https://www.crunchydata.com/migrate-from-heroku)
- [Neon Postgres](https://neon.tech/docs/how-to-guides/hasura-heroku-migration/)
- [Railway Postgres](https://railway.app/heroku)
- [Render Postgres](https://render.com/docs/migrate-from-heroku)
- [Supabase Postgres](https://supabase.com/docs/guides/migrations/heroku)
@ -68,14 +69,13 @@ to help you:
<details>
<summary>What should I do if I have a free Heroku Postgres database connected to my Hasura project?</summary>
Following Herokus announcement of deprecation of free resources, you will have to either upgrade your Heroku
database plan or move to a different database provider.
Following Herokus announcement of deprecation of free resources, you will have to either upgrade your Heroku database
plan or move to a different database provider.
</details>
<details>
<summary>What should I do if I have a paid Heroku Postgres database connected to my Hasura project?</summary>
No other action is required from your end. Your Heroku database will continue to function as before with your Hasura
project.
No other action is required from your end. Your Heroku database will continue to function as before with your Hasura project.
</details>
<details>
@ -84,7 +84,7 @@ project.
</details>
<details>
<summary>Will upgrading my Heroku database cause downtime?</summary>
<summary>Will upgrading my Heroku database cause downtime?</summary>
These <a href={'https://devcenter.heroku.com/articles/updating-heroku-postgres-databases'}>docs on the Heroku site</a>
&nbsp;list the ways a user can upgrade their free Heroku database. As per Herokus documentation, it does seem to
involve some application downtime for successful upgrade and migration.
@ -93,7 +93,6 @@ project.
<details>
<summary>What plan should I upgrade to?</summary>
Heroku Postgres plans and their specifications can be found&nbsp;
<a href={'https://devcenter.heroku.com/articles/heroku-postgres-plans'}>here</a>. Please choose a plan
that would work
<a href={'https://devcenter.heroku.com/articles/heroku-postgres-plans'}>here</a>. Please choose a plan that would work
best for your application.
</details>
</details>

View File

@ -1,6 +1,6 @@
---
description: Using Hasura with a Neon Postgres database
title: "Cloud: Using Hasura Cloud with a Neon Serverless Postgres"
title: 'Cloud: Using Hasura Cloud with a Neon Serverless Postgres'
keywords:
- hasura
- docs
@ -13,7 +13,7 @@ sidebar_label: Neon Postgres
sidebar_position: 12
---
import Thumbnail from "@site/src/components/Thumbnail";
import Thumbnail from '@site/src/components/Thumbnail';
# Using Hasura Cloud with a Neon Serverless Postgres Database
@ -33,10 +33,7 @@ and sign up or log in.
On the Hasura Cloud dashboard, create a new project:
<Thumbnail
src="/img/cloud-dbs/create-hasura-cloud-project.png"
alt="Create Hasura Cloud project"
/>
<Thumbnail src='/img/cloud-dbs/create-hasura-cloud-project.png' alt='Create Hasura Cloud project' />
After the project is initialized successfully, click on `Launch Console` to open the Hasura Console in your browser.
@ -44,20 +41,12 @@ On the Hasura Console, navigate to `Data -> Manage -> Connect Database -> Create
Click on `Connect Neon Database` to create and connect a new Postgres database to your Hasura project.
<Thumbnail
src="/img/cloud-dbs/neon/connect_neon_database.png"
alt="Connect Neon database"
widht="700px"
/>
<Thumbnail src='/img/cloud-dbs/neon/connect_neon_database.png' alt='Connect Neon database' widht='700px' />
On the next step, you'll be prompted to Login/Sign up for Neon. We recommend `Continue with Hasura` for a seamless
experience.
<Thumbnail
src="/img/cloud-dbs/neon/neon_authentication.png"
alt="Neon Authentication"
widht="700px"
/>
<Thumbnail src='/img/cloud-dbs/neon/neon_authentication.png' alt='Neon Authentication' widht='700px' />
After successful authorization, a new Neon Postgres database will be created and connected to your Hasura project with
the connection string associated with the environment variable `PG_DATABASE_URL`.
@ -69,27 +58,19 @@ the template gallery instantly.
For example: to get started, you could try the `Welcome to Hasura` template:
<Thumbnail
src="/img/cloud-dbs/neon/hasura_hello_world_template.png"
alt="Hello World Template"
widht="700px"
/>
<Thumbnail src='/img/cloud-dbs/neon/hasura_hello_world_template.png' alt='Hello World Template' widht='700px' />
This installs a schema with data that you can now query using your Hasura GraphQL API from the `API` tab.
Voilà! You are ready to start developing.
<Thumbnail src="/img/cloud-dbs/hasura-console.png" alt="Hasura Console" />
<Thumbnail src='/img/cloud-dbs/hasura-console.png' alt='Hasura Console' />
:::info Note
You can visit the Neon console from the `Data` tab to manage your created database.
<Thumbnail
src="/img/cloud-dbs/neon/neon_console_link_page.png"
alt="Neon Console Link"
widht="700px"
/>
<Thumbnail src='/img/cloud-dbs/neon/neon_console_link_page.png' alt='Neon Console Link' widht='700px' />
:::
@ -105,6 +86,13 @@ pg_dump -h <host> -U <username> <dbname> | psql -h pg.neon.tech
For more info, follow
[Neon's detailed guide for importing a database](https://neon.tech/docs/how-to-guides/import-an-existing-database/).
:::info Note
If you're migrating from Heroku, check out Neon's platform-specific
[migration guide](https://neon.tech/docs/how-to-guides/hasura-heroku-migration/).
:::
## Neon Free Tier
With Neon's Free Tier, you can create up to three projects with the following limits:
@ -119,13 +107,9 @@ For more info, check out Neon's
:::info Note
If you've already reached the free-tier limit of three databases, please head to your
[Neon console](https://console.neon.tech/) and delete an unused database to be able to create and connect a new one
from the Hasura Console.
[Neon console](https://console.neon.tech/) and delete an unused database to be able to create and connect a new one from
the Hasura Console.
<Thumbnail
src="/img/cloud-dbs/neon/free_tier_exceeded_neon.png"
alt="Neon Free Tier Warning"
widht="700px"
/>
<Thumbnail src='/img/cloud-dbs/neon/free_tier_exceeded_neon.png' alt='Neon Free Tier Warning' widht='700px' />
:::