Author and manage database schemas with versioning, migrations, and runtime metadata access
Key Features • Installation • Quick Start • Documentation • Ecosystem • Contributing • License
Wyseman is a PostgreSQL schema manager that allows you to author, version, and maintain database schemas while providing runtime access to schema metadata. It uses TCL-based syntax to define database objects with dependencies, making it easy to manage complex database structures.
- Schema Authoring: Define database objects using a clean, macro-enabled syntax
- Dependency Tracking: Automatically handle object dependencies during rebuilds
- Versioning System: Track schema versions and manage migrations between versions
- Data Preservation: Safely upgrade schemas without losing data
- Runtime API: Access schema metadata from JavaScript, Ruby, or TCL applications
- Multilingual Support: Define text descriptions in multiple languages
- Display Properties: Define UI presentation hints for tables and columns
# Using npm
npm install -g wyseman
# From source
git clone https://github.com/gotchoices/wyseman.git
cd wyseman
npm install
npm link# schema.wms - Schema definition
schema myapp {}
table myapp.users {myapp} {
id serial primary key,
username text not null unique,
email text,
active boolean default true
}
# text.wmt - Language data
tabtext myapp.users {Users} {System users} {
{id {ID} {Unique identifier}}
{username {Username} {Login name}}
{email {Email} {Contact email address}}
{active {Active} {Whether user account is active}}
} -language en# Create database objects, language data, and display properties
wyseman --all schema/*.wm*const Wyseman = require('wyseman');
const wm = new Wyseman({database: 'myapp'});
// Get table metadata
wm.meta.table('myapp.users')
.then(meta => console.log(meta));
// Get language data
wm.lang.table('myapp.users', 'en')
.then(text => console.log(text));Comprehensive documentation is available in the doc/ directory:
- Introduction and Concepts
- Schema Authoring Guide
- Schema File Reference
- Command Reference
- Version Control System
- Full Documentation Index
Wyseman is part of the WyattERP application framework:
- Wyseman: Schema management
- Wylib: UI components
- Wyselib: Reusable schema objects
- Wyclif: Client interface framework
These components are used together in the MyCHIPs project, a digital value exchange system.
Contributions are welcome! See Contributing Guidelines for details on how to get involved.
This project is licensed under the MIT License - see the LICENSE file for details.
Wyseman offers a unique approach to schema management with its TCL-based definition syntax and tight integration with the WyattERP ecosystem. For different needs or preferences, you might also consider:
- Flyway: Version-controlled database migrations
- Liquibase: Open-source database schema change management
- Sqitch: Database change management with Git-like workflow
- Alembic: Database migration tool for SQLAlchemy (Python)
- Knex.js: JavaScript SQL query builder with migrations
- Prisma Migrate: Modern database migration tool for Node.js
Wyseman is distinguished by its dependency tracking, table data preservation during migrations, and integrated metadata system for application use.