Skip to content

Commit

Permalink
fix: update path to queries to configure database tables. (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
SandPod authored Apr 11, 2024
1 parent c3eb153 commit 0c5d066
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/06-deployments/03-deploying-to-gcr-console.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ When the Postgres instance creation has finished, you must add a database and an

Now you can connect to your database with your favorite Postgres tool. Postico is a good option if you are on a Mac. Click on the _Overview_ tab of the database and take note of the _Public IP address_. Use it, together with the user `postgres`, the database `serverpod`, and the password from your `passwords.yaml` file to connect to the database.

Run the queries in `generated/tables-serverpod.pgsql` and `generated/tables.pgsql`.
Run the database definition query from the latest migration directory `migrations/<LATEST_MIGRATION>/definition.sql`.

## Create a service account
For Cloud Run to access your database, you will need to create a service account with the _Cloud SQL Client_ role.
Expand Down
2 changes: 1 addition & 1 deletion docs/06-deployments/04-deploying-to-aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ $ terraform apply
Terraform will now run some checks and make a plan for the deployment. If everything looks good, it will ask you if you are ready to go ahead with the changes. Type `yes` and hit the return key. Applying the changes can take up to five minutes as AWS creates the different resources needed for your Serverpod.

## Create database tables
For your Serverpod to function correctly, you will need to create its required database tables and any tables specific to your setup. The database queries needed to set up your tables can be found in `generated/tables-serverpod.pgsql` and `generated/tables.pgsql`. The `tables.pgsql` file may be empty if you haven’t added any tables to your project. Use your favorite tool to connect to the database ([Postico](https://eggerapps.at/postico/) is a good option if you are on a Mac). Connect to `database.examplepod.com` (replace `examplepod.com` with your domain); the user is `postgres`, the port is 5432, and the database is `serverpod`. Use the production password from the `config/password.yaml` file.
For your Serverpod to function correctly, you will need to create its required database tables and any tables specific to your setup. The database queries needed to set up your tables are found in the latest migration `migrations/<LATEST_MIGRATION>/definition.sql`. The `definition.sql` file configures all tables required by your project. Use your favorite tool to connect to the database ([Postico](https://eggerapps.at/postico/) is a good option if you are on a Mac). Connect to `database.examplepod.com` (replace `examplepod.com` with your domain); the user is `postgres`, the port is 5432, and the database is `serverpod`. Use the production password from the `config/password.yaml` file.

![Github secrets](/img/5-database-connect.jpg)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ When the Postgres instance creation has finished, you must add a database and an

Now you can connect to your database with your favorite Postgres tool. Postico is a good option if you are on a Mac. Click on the _Overview_ tab of the database and take note of the _Public IP address_. Use it, together with the user `postgres`, the database `serverpod`, and the password from your `passwords.yaml` file to connect to the database.

Run the queries in `generated/tables-serverpod.pgsql` and `generated/tables.pgsql`.
Run the database definition query from the latest migration directory `migrations/<LATEST_MIGRATION>/definition.sql`.

## Create a service account
For Cloud Run to access your database, you will need to create a service account with the _Cloud SQL Client_ role.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ $ terraform apply
Terraform will now run some checks and make a plan for the deployment. If everything looks good, it will ask you if you are ready to go ahead with the changes. Type `yes` and hit the return key. Applying the changes can take up to five minutes as AWS creates the different resources needed for your Serverpod.

## Create database tables
For your Serverpod to function correctly, you will need to create its required database tables and any tables specific to your setup. The database queries needed to set up your tables can be found in `generated/tables-serverpod.pgsql` and `generated/tables.pgsql`. The `tables.pgsql` file may be empty if you haven’t added any tables to your project. Use your favorite tool to connect to the database ([Postico](https://eggerapps.at/postico/) is a good option if you are on a Mac). Connect to `database.examplepod.com` (replace `examplepod.com` with your domain); the user is `postgres`, the port is 5432, and the database is `serverpod`. Use the production password from the `config/password.yaml` file.
For your Serverpod to function correctly, you will need to create its required database tables and any tables specific to your setup. The database queries needed to set up your tables are found in the latest migration `migrations/<LATEST_MIGRATION>/definition.sql`. The `definition.sql` file configures all tables required by your project. Use your favorite tool to connect to the database ([Postico](https://eggerapps.at/postico/) is a good option if you are on a Mac). Connect to `database.examplepod.com` (replace `examplepod.com` with your domain); the user is `postgres`, the port is 5432, and the database is `serverpod`. Use the production password from the `config/password.yaml` file.

![Github secrets](/img/5-database-connect.jpg)

Expand Down

0 comments on commit 0c5d066

Please sign in to comment.