v1.0.1 Released

Zero-Dependency Database Migrations

AST-based schema management for

PostgreSQL MySQL SQLite
terminal
$ npm install schemact
Live Demo

See It In Action

One schema definition, perfectly optimized SQL for each database

schema.sigl
INPUT
# Define your schema once
model User {
  id        Serial        @pk
  email     VarChar(255) @unique @notnull
  name      Text
  role      Enum('admin', 'user') @default('user')
  createdAt Timestamp     @default(CURRENT_TIMESTAMP)
}

model Post {
  id       Serial @pk
  title    Text   @notnull
  content  Text
  authorId Int    @ref(User.id) @onDelete(CASCADE)
}
OUTPUT
CREATE TABLE "User" (
  "id" SERIAL PRIMARY KEY,
  "email" VARCHAR(255) UNIQUE NOT NULL,
  "name" TEXT,
  "role" VARCHAR(50) DEFAULT 'user'
    CHECK ("role" IN ('admin', 'user')),
  "createdAt" TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE `User` (
  `id` INT AUTO_INCREMENT PRIMARY KEY,
  `email` VARCHAR(255) UNIQUE NOT NULL,
  `name` TEXT,
  `role` ENUM('admin', 'user') DEFAULT 'user',
  `createdAt` TIMESTAMP DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB CHARSET=utf8mb4;
CREATE TABLE "User" (
  "id" INTEGER PRIMARY KEY AUTOINCREMENT,
  "email" TEXT UNIQUE NOT NULL,
  "name" TEXT,
  "role" TEXT DEFAULT 'user'
    CHECK ("role" IN ('admin', 'user')),
  "createdAt" TEXT DEFAULT CURRENT_TIMESTAMP
);
Features

Why Developers Choose Schemact

Built for performance, security, and developer happiness

Zero Dependencies

Only Node.js built-ins. No external packages means no supply chain attacks, faster installs, and smaller bundles.

Security Hardened

SQL injection protection, path traversal prevention, file size limits, and SHA-256 integrity verification.

Type-Safe

Written in strict TypeScript. Catch errors at compile-time, not runtime. Full IntelliSense support.

Multi-Database

PostgreSQL, MySQL, and SQLite support. Same DSL generates optimized SQL for each database.

AST-Based

Real compiler pipeline: Lexer, Parser, AST, Generator. No regex hacks. Proper error messages with line numbers.

100% Tested

304 comprehensive tests with 100% pass rate. Battle-tested and production ready.

By The Numbers

Production Ready

Built for reliability and performance

0
Tests Passing
0%
Test Coverage
0
Dependencies
0
Databases
SQL Injection Protected Race Condition Safe Path Traversal Protected SHA-256 Integrity
Comparison

How Schemact Compares

See why developers are switching

Feature Schemact Prisma Knex TypeORM
Dependencies 0 ~50 ~20 ~100
Custom DSL
AST-Based Compiler
Database Introspection
Integrity Checking
Multi-Database
FAQ

Frequently Asked Questions

Everything you need to know

Schemact is a zero-dependency, pure migration tool. Unlike ORMs, it focuses solely on schema management without runtime overhead. It has no external dependencies, uses a clean custom DSL, and includes SHA-256 integrity checking for migration files.
Yes! Schemact has 304 comprehensive tests with 100% pass rate. It includes security hardening against SQL injection, path traversal, and other attacks. Transaction-based migrations ensure data integrity, and batch management allows safe rollbacks.
Schemact supports PostgreSQL, MySQL/MariaDB, and SQLite. Each database has a dedicated generator that produces optimized SQL using database-specific features like SERIAL for PostgreSQL, AUTO_INCREMENT for MySQL, and AUTOINCREMENT for SQLite.
Absolutely! Use the schemact pull command to introspect your existing database and generate a .sact schema file. This reverse-engineering feature supports all three databases.
Schemact uses a proper AST-based compiler pipeline. Your .sact files go through a Lexer (tokenization), Parser (AST generation), and Generator (SQL output). This means proper error messages with line numbers, not cryptic regex failures.

Ready to Simplify Your Migrations?

Join developers who have switched to Schemact for a cleaner, faster, and more secure migration experience.