ScaffoldHub - v2
  • Introduction
  • Modeling
    • Two-way Relationships
  • Setup
    • Backend
    • Frontend
    • File Storage
    • Emails with SendGrid
    • Payments with Stripe
  • Debugging
  • Deployment
    • Database
      • SQL
      • MongoDB
    • Backend
      • Google Cloud - App Engine
      • Google Cloud - Run
      • Under construction...
    • Frontend
      • Firebase Hosting
      • Heroku w/ Subdomains
      • Under construction...
  • Features
    • Projects
    • Preview
    • Tenants
      • Single-Tenant
      • Multi-Tenant
      • Multi-Tenant (w/ subdomains)
    • Payments
    • Security
    • Authentication
      • Sign-in and Sign-up
      • Invitation
      • Password Reset
      • Password Change
      • Email Verification
    • Audit Logs
    • Settings
    • Internationalization (I18n)
    • Entity
      • Form
      • Filter and List
      • Export
      • Import
    • API Documentation
  • Architecture
    • Security
    • File Storage
    • Internationalization (I18n)
    • Payments
    • Typescript Support
    • Rate limiting
    • Technologies Versions
    • Under construction...
  • Recipes
    • Testing the API with Postman
    • Enterprise sign-in with WorkOS
    • Under construction...
  • Support
  • Changelog
    • Documentation
    • Scaffolds
  • Custom Development
  • Legacy Scaffolds
  • Go to ScaffoldHub
Powered by GitBook
On this page
  • Providers
  • Setup
  • Troubleshooting
  • Allowed IP addresses

Was this helpful?

  1. Deployment
  2. Database

SQL

PreviousDatabaseNextMongoDB

Last updated 4 years ago

Was this helpful?

Providers

You can use any provider you want, those are just recommendations.

Setup

First, manually create a database. You can usually create it via the console. This is an example for the Google Cloud SQL provider:

Temporarily change the backend/.env database credentials to point to this database.

On the backend, run:

npm run db:create

Done!

Now revert the database credentials to the localhost ones.

Troubleshooting

Allowed IP addresses

Cloud database providers usually start the database blocking all external connections. You must whitelist the IPs you will use.

In case you want to allow all IPs, the pattern is usually 0.0.0.0/0.

Cloud SQL: for PostgreSQL, MySQL & SQL Server  |  Cloud SQL: Relational Database Service  |  Google CloudGoogle Cloud
Amazon RDS | Cloud Relational Database | Amazon Web ServicesAmazon Web Services, Inc.
Logo
Logo