Deep-dive on the Next Gen Platform. Join the Webinar!

Skip Navigation
Show nav
Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
    • .NET
  • Documentation
  • Changelog
  • More
    Additional Resources
    • Home
    • Elements
    • Products
    • Pricing
    • Careers
    • Help
    • Status
    • Events
    • Podcasts
    • Compliance Center
    Heroku Blog

    Visit the Heroku Blog

    Find news and updates from Heroku in the blog.

    Visit Blog
  • Log inorSign up
Hide categories

Categories

  • Heroku Architecture
    • Compute (Dynos)
      • Dyno Management
      • Dyno Concepts
      • Dyno Behavior
      • Dyno Reference
      • Dyno Troubleshooting
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
  • Developer Tools
    • Command Line
    • Heroku VS Code Extension
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery & Integration (Heroku Flow)
    • Continuous Integration
  • Language Support
    • Node.js
      • Working with Node.js
      • Troubleshooting Node.js Apps
      • Node.js Behavior in Heroku
    • Ruby
      • Rails Support
      • Working with Bundler
      • Working with Ruby
      • Ruby Behavior in Heroku
      • Troubleshooting Ruby Apps
    • Python
      • Working with Python
      • Background Jobs in Python
      • Python Behavior in Heroku
      • Working with Django
    • Java
      • Java Behavior in Heroku
      • Working with Java
      • Working with Maven
      • Working with Spring Boot
      • Troubleshooting Java Apps
    • PHP
      • PHP Behavior in Heroku
      • Working with PHP
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
    • .NET
      • Working with .NET
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
      • Migrating to Heroku Postgres
    • Heroku Key-Value Store
    • Apache Kafka on Heroku
    • Other Data Stores
  • AI
    • Working with AI
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
      • Single Sign-on (SSO)
    • Private Spaces
      • Infrastructure Networking
    • Compliance
  • Heroku Enterprise
    • Enterprise Accounts
    • Enterprise Teams
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
  • Patterns & Best Practices
  • Extending Heroku
    • Platform API
    • App Webhooks
    • Heroku Labs
    • Building Add-ons
      • Add-on Development Tasks
      • Add-on APIs
      • Add-on Guidelines & Requirements
    • Building CLI Plugins
    • Developing Buildpacks
    • Dev Center
  • Accounts & Billing
  • Troubleshooting & Support
  • Integrating with Salesforce
  • Add-ons
  • All Add-ons
  • Schema To Go - PostgreSQL
Schema To Go - PostgreSQL

This add-on is operated by Sidebored.io,Inc.

Simplifying Heroku's PostgreSQL Integration

Schema To Go - PostgreSQL

Last updated December 02, 2024

Table of Contents

  • Features
  • Provisioning the Add-On
  • Local Setup
  • Configuring Your Application
  • Migrating Between Plans
  • Removing the Add-On
  • Support
  • Additional Resources

Schema To Go is a robust PostgreSQL database service tailored for Heroku applications. It offers reliable, secure, and scalable database solutions to enhance the data handling capabilities of your applications.

Features

  • High Performance: Powered by PostgreSQL, Schema To Go ensures efficient data management.
  • Easy Integration: Easily integrates with Heroku apps.
  • Automated Backups: Regular backups for data safety.
  • Data Security: High priority on data encryption and security.
  • Monitoring and Analytics: Detailed insights into database performance and usage.

Provisioning the Add-On

Add Schema To Go to your application via the CLI:

Reference the Schema To Go Elements Page for a list of available plans and regions.

heroku addons:create schematogo --app example-app

Local Setup

Environment Setup

After provisioning the add-on, replicate its config vars locally for development environments that need the service.

Use the local Heroku CLI command to configure, run, and manage process types specified in your app’s Procfile. Heroku Local reads configuration variables from a .env file. Use heroku config to view an app’s configuration variables in a terminal. Use the following command to add a configuration variable to a local .env file:

$ heroku config:get SCHEMATOGO_URL -s >> .env

Don’t commit credentials and other sensitive configuration variables to source control. In Git exclude the .env file with: echo .env >> .gitignore.

For more information, see the Heroku Local article.

Configuring Your Application

After provisioning, Schema To Go sets the SCHEMATOGO_URL environment variable. Configure your application to use this variable:

Using PostgreSQL from Ruby

To configure your application with Ruby:

require 'pg'

if ENV['SCHEMATOGO_URL']
  conn = PG.connect(ENV['SCHEMATOGO_URL'])
  # Your code here
end

Using PostgreSQL from Java

To configure your application with Java:

import java.sql.Connection;
import java.sql.DriverManager;

public class PostgresExample {
    public static void main(String[] args) {
        String dbUrl = System.getenv("SCHEMATOGO_URL");

        try {
            Connection connection = DriverManager.getConnection(dbUrl);
            // Your code here
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

Using PostgreSQL from Python

To configure your application with Python:

import os
import psycopg2

database_url = os.getenv('SCHEMATOGO_URL')

conn = psycopg2.connect(database_url)
# Your code here

Using PostgreSQL from Node.js

To configure your application with Node.js:

const { Pool } = require('pg');
const pool = new Pool({
    connectionString: process.env.SCHEMATOGO_URL
});

// Your code here

Using PostgreSQL from PHP

To configure your application with PHP:

<?php
$dbUrl = getenv('SCHEMATOGO_URL');

if ($dbUrl) {
    $pdo = new PDO($dbUrl);
    // Your code here
}
?>

Using PostgreSQL from Go

To configure your application with Go:

package main

import (
    "database/sql"
    "os"

    _ "github.com/lib/pq"
)

func main() {
    databaseURL := os.Getenv("SCHEMATOGO_URL")

    db, err := sql.Open("postgres", databaseURL)
    if err != nil {
        panic(err)
    }
    defer db.Close()

    // Your code here
}

These snippets provide basic guidance for integrating Schema To Go with various applications. Include additional details specific to your add-on’s capabilities and configurations.

Migrating Between Plans

Application owners must carefully manage the migration timing to ensure proper application function during the migration process.

To migrate to a new plan, use the heroku addons:upgrade command:

heroku addons:upgrade schematogo:new-plan

Removing the Add-On

Before removing Schema To Go from your application, ensure to download a recent copy of your database to prevent any data loss. You can download the latest backup directly from the Backups section of the Schema To Go dashboard.

To download your data:

  1. Navigate to the Schema To Go dashboard.
  2. Scroll to the Backups section.
  3. Click the most recent backup in the list.
  4. Follow the prompts to download the backup file to your local machine.

If you encounter any issues or need assistance, contact our support team at support@schematogo.com.

After securing your data, you can remove Schema To Go from your application with the following command:

This action destroys all associated data and you can’t undo it!

heroku addons:destroy schematogo

Support

For any questions or issues, contact our support team at support@schematogo.com.

Additional Resources

PostgreSQL Official Documentation

Keep reading

  • All Add-ons

Feedback

Log in to submit feedback.

Zara 4 Scout APM

Information & Support

  • Getting Started
  • Documentation
  • Changelog
  • Compliance Center
  • Training & Education
  • Blog
  • Support Channels
  • Status

Language Reference

  • Node.js
  • Ruby
  • Java
  • PHP
  • Python
  • Go
  • Scala
  • Clojure
  • .NET

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing
  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Github
  • LinkedIn
  • © 2025 Salesforce, Inc. All rights reserved. Various trademarks held by their respective owners. Salesforce Tower, 415 Mission Street, 3rd Floor, San Francisco, CA 94105, United States
  • heroku.com
  • Legal
  • Terms of Service
  • Privacy Information
  • Responsible Disclosure
  • Trust
  • Contact
  • Cookie Preferences
  • Your Privacy Choices