Skip to content

gotchoices/wyseman

Repository files navigation

Wyseman

WyattERP Schema Manager for PostgreSQL

Author and manage database schemas with versioning, migrations, and runtime metadata access

Key FeaturesInstallationQuick StartDocumentationEcosystemContributingLicense

Overview

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.

Key Features

  • 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

Installation

# Using npm
npm install -g wyseman

# From source
git clone https://github.com/gotchoices/wyseman.git
cd wyseman
npm install
npm link

Quick Start

1. Create your schema files

# 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

2. Build your schema

# Create database objects, language data, and display properties
wyseman --all schema/*.wm*

3. Access in your application

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));

Documentation

Comprehensive documentation is available in the doc/ directory:

Ecosystem

Wyseman is part of the WyattERP application framework:

These components are used together in the MyCHIPs project, a digital value exchange system.

Contributing

Contributions are welcome! See Contributing Guidelines for details on how to get involved.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Alternatives and Similar Tools

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.


Built with ❤︎ by GotChoices.

About

WyattERP schema authoring and management tool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors