How ToPreviewFor developerFor agencyFor operator

Connect managed databases

Provision project data, use named bindings in preview and production, and keep provider credentials behind BlinkHost.

Last updated 2026-08-27

What you'll achieve

  • Keep a reviewable database schema beside application source
  • Apply ordered migrations without committing credentials or data
  • Move a complete project between BlinkHost and GitHub

Check availability

Managed databases are plan-governed. Open the current pricing catalog and the project's Databases area before designing a dependency on database branches, snapshots, tokens, realtime subscriptions or retention.

Provision and bind

Create each database the project needs and assign a unique binding name. Backend modules query a database by that binding name. A project can declare zero, one or several bindings; every active binding is resolved independently, not only a default database.

Provider credentials remain behind BlinkHost and are not returned through the customer API, browser or module source. Inside a Rust module, query the binding rather than a provider URL:

let rows = blinkhost_sdk::query("primary", "SELECT id, name FROM users LIMIT 20", "[]")?;

Use a database in LiveStack Preview

Create a database environment intended for development or preview, then choose Use in preview for its named binding. LiveStack accepts only development and preview bindings. It does not use a production binding or provider URL as a fallback.

A module that does not query a database needs no binding. If it queries several databases, connect every required binding and use each exact name in code. Missing names fail explicitly.

Deploy and verify

Review schema and migration changes, confirm the target environment and deploy. The immutable deployment records the exact production binding and schema snapshot. If a binding is missing, correct the project declaration and redeploy instead of embedding a provider URL or token in source.

Keep the schema with the project

When a binding is created, BlinkHost adds a source workspace for it without replacing existing files:

database/
  README.md
  PRIMARY_DB/
    schema.sql
    migrations/
      README.md
      001_create_users.sql

Use schema.sql as the readable current schema and add forward-only, numbered SQL files under migrations/. Review both with the application change that needs them. The binding name in blinkhost.yaml connects these files to the selected BlinkHost resource; the files do not contain a provider URL, token, customer record or production snapshot.

Database source is included in project ZIP downloads and GitHub sharing. Provisioning a database creates the source scaffold, while editing a declaration alone never provisions, deletes or changes a live database.

Help improve this page

Sign in to send page-specific feedback. For account-specific help, email support@blinkhost.me.

Connect managed databases | BlinkHost