Management Commands

makemappings

class heroku_connect.management.commands.makemappings.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Return Heroku Connect mapping JSON for the entire project.

Example:

python manage.py makemappings -o hc_mappings.json
heroku connect:import hc_mappings.json

Note

For the example to work you will need the Heroku Connect CLI Plugin.

add_arguments(parser)[source]

Entry point for subclassed commands to add custom arguments.

handle(*args, **options)[source]

The actual logic of the command. Subclasses must implement this method.

import_mappings

class heroku_connect.management.commands.import_mappings.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Import Heroku Connect mappings to connection.

add_arguments(parser)[source]

Entry point for subclassed commands to add custom arguments.

handle(*args, **options)[source]

The actual logic of the command. Subclasses must implement this method.

wait_for_import(connection_id, wait_interval)[source]

Wait until connection state is no longer IMPORT_CONFIGURATION.

Parameters:
  • connection_id (str) – Heroku Connect connection to monitor.

  • wait_interval (int) – How frequently to poll in seconds.

Raises:

CommandError – If fetch connection information fails.

load_remote_schema

class heroku_connect.management.commands.load_remote_schema.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Load schema from remote Heroku PostgreSQL database.

This command can be useful to load the Heroku Connect database schema into a local development environment.

Example:

python manage.py load_remote_schema --app ninja | psql -a

Note

This command requires the Heroku CLI and PostgreSQL to be installed.

add_arguments(parser)[source]

Entry point for subclassed commands to add custom arguments.

handle(*args, **options)[source]

The actual logic of the command. Subclasses must implement this method.

create_development_schema

class heroku_connect.management.commands.create_development_schema.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Create Heroku Connect schema for local development.

add_arguments(parser)[source]

Entry point for subclassed commands to add custom arguments.

handle(*args, **options)[source]

The actual logic of the command. Subclasses must implement this method.