SSourceHarbor
AI coding workspace

Database migrations

Change the schema without losing sight of the rows. SourceHarbor connects migration planning, existing data assumptions and the checks needed before a database change.

● ● ●SourceHarbor●
A concrete starting point · Database migrations ×
-- Inspect existing values before enforcing a constraint.
SELECT COUNT(*) FROM records WHERE status IS NULL;
-- Prepare a backfill and a reversible migration.
-- Test on a disposable database copy first.
✳Plan a database column change around the existing rows.
✓ ChangesReview before applying ↗
Illustrative workspace
  1. Review before applying

    Compare actual behavior with the expected result. If a check fails, investigate it before applying more changes.

  2. Connection

    Base URL, credentials and a reachable server.

  3. Project

    Check null values, prepare a backfill and verify a rollback on a disposable copy before touching production data.

Workflows

Database migrations

Workflows ↗
A concrete starting point
-- Inspect existing values before enforcing a constraint.
SELECT COUNT(*) FROM records WHERE status IS NULL;
-- Prepare a backfill and a reversible migration.
-- Test on a disposable database copy first.
AI coding workspace

Discuss the data consequences before accepting a schema edit

SourceHarbor puts a project folder and an AI coding conversation together on Windows so database-related changes can be considered alongside the application that uses them. Describe the new behavior, the existing data shape and the consumers that must keep working. Ask the assistant to inspect migration files and relevant queries before it proposes a sequence of edits. Your review should cover data consequences as well as syntax.

For example, the migration.sql context asks what happens to existing records before a status constraint is introduced. Use a disposable database copy to investigate missing values and a proposed backfill. This is a project workflow you perform, not a migration engine supplied by SourceHarbor. Compare the plan with the application code that reads and writes status, including the behavior during a transition.

A clear migration discussion also says how you will verify the result and what recovery would require if assumptions fail. Keep that plan with the proposed SQL and run your own checks before using it on important data. Connect a supported OpenAI-compatible or Anthropic endpoint, providing credentials when required. An unrestricted model may be selected if offered there; its actual behavior, context capacity and tools depend on the model and server.

Schema work in the coding workspace

What should accompany a request to add a constraint?

Include the existing schema, the intended rule and representative data shapes without sensitive records. Identify application writes that might still produce old values, so the proposal can address compatibility as well as the database statement.

Will SourceHarbor migrate my production database?

The illustrated workflow is code inspection and migration planning. Review and run database changes through your own controlled process. Do not infer a production migration service or a recovery guarantee from the example on this page.

When should I ask about rollback?

Ask while reviewing the proposed migration, before running it. A reverse statement may not restore transformed or deleted values. Decide what evidence and backups your own database process requires to recover from a failed assumption.

What establishes that the application remains compatible?

Test reads and writes against the changed schema on a disposable copy, including records from before the change. Inspect the affected callers and compare their behavior with the intended transition; successful SQL execution alone is insufficient.

Get the Windows app ↗

SourceHarbor · Updated 2026-10-25