Table of Contents

Introduction

Managing database schemas, performing migrations, and running bulk data operations typically requires writing bespoke code—code that has to be compiled, deployed, and maintained alongside your application. Foundry changes this.

Foundry is a standalone .NET global tool for managing databases entirely from the command line. Build and update schemas, import and export data, generate DDL, and script multi-step deployments—all as simple foundry commands you can run from a terminal, a CI/CD pipeline, or a batch script, no application code required.

Under the hood, Foundry is built on the YndigoBlue Velocity Framework, a mature database engine used across YndigoBlue's products. You don't need to know Velocity, or use it directly, to get full value from Foundry—it's there to give you a reliable, well-tested foundation, not something you need to interact with.

What Foundry Does

Foundry organizes its commands around the natural lifecycle of a database:

Schema Management. Build schemas from declarative definition files, load live database structures back to files, apply incremental updates, and validate that a live database matches its definition. Foundry supports the full schema lifecycle including build, update, load, and definition operations.

Data Operations. Import CSV files into any table and export table data or entire schema definitions back to CSV or structured files. Foundry handles batch operations with configurable delimiters, date formats, and import configuration files.

Database Maintenance. Drop schemas, tables, views, indexes, full-text indexes, and spatial indexes. Truncate tables or entire schemas. All destructive operations require explicit identification of the target so nothing is dropped by accident.

SQL Generation. Generate platform-correct CREATE DDL scripts from definition files without touching a live database. Useful for audit trails, release management, and database provisioning workflows where executing DDL directly is not appropriate.

Batch Execution. Define a sequence of operations in a JSON project file and execute them as a single foundry run command. Script-level connection and logging defaults can be overridden per step, enabling complex multi-step workflows with minimal repetition.

Project Scaffolding. Bootstrap a new Foundry project directory complete with schema files, log configuration, a starter project.json, and an optional database connection file using foundry create.

Quick Example

# Create a new project targeting SQL Server
foundry create my-database SQLServer

# cd into the project, edit connection.json, then build the schema
cd my-database
foundry build schema --datasource connection.json --file schemas/customers.xml

# Import seed data
foundry import --datasource connection.json --schema dbo --table customers --file seed/customers.csv

# Run a full deployment sequence
foundry run deploy.json

Supported Databases

Foundry supports the following databases out of the box:

Database Vendor
IBM DB2 LUW IBM
MySQL Oracle
Oracle Database Oracle
PostgreSQL PostgreSQL Global Development Group
SQLite SQLite Consortium
Microsoft SQL Server Microsoft
Teradata Vantage Teradata
Note

DB2 and SQLite require platform-specific Foundry packages. The cross-platform package supports the remaining five databases. See Platform Selection for details.

Platform Support

Foundry is built on .NET 10 and is distributed as a .NET global tool:

  • Windows (x64) — Full database support including DB2 and SQLite
  • Linux (x64) — Full database support including DB2 and SQLite
  • macOS (Arm64) — Full database support including DB2 and SQLite
  • Raspberry Pi (Arm64) — All databases except DB2, includes SQLite

Getting Started

Head over to Getting Started to install Foundry and run your first commands. For an overview of how commands are structured and what connection options are available globally, see Foundry Syntax.