Registry / database / cca-migration-generator

cca-migration-generator

JSON →
library0.1.1jsnpmunverified

A CLI tool for generating TypeORM migrations and table schemas for PostgreSQL with TypeScript support. Current stable version is 0.1.1. It automates migration file creation, schema management, and integrates with TypeORM. Key differentiators: TypeScript-first, automated timestamp handling, custom templates, and support for complex relationships. Release cadence is irregular as it's in early development.

npm install cca-migration-generator
INSTALL
IMPORT
SIG · CCA-MIGRATION-GENE
C
cca-migration-generator
databasejavascriptv0.1.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default (CLI)
npx cca-migration-generator CreateUserTable
Tool is used as a CLI, not imported as a module.

Installation, configuration, and basic migration generation using the CLI.

// 1. Install the package npm install cca-migration-generator --save-dev // 2. Create cca.config.json in project root { "type": "postgres", "host": "localhost", "port": 5432, "username": "your_username", "password": "your_password", "database": "your_database" } // 3. Generate a migration npx cca-migration-generator CreateUserTable
Debug
Known issues
breakingMigrating from version 0.1.0 to 0.1.1: The configuration file format changed. Old 'cca-migration-generator.json' must be renamed to 'cca.config.json'.
fix
Rename cca-migration-generator.json to cca.config.json and update the structure per the latest docs.
affects: >=0.1.0 <0.1.1
deprecatedPeer dependency typeorm version range changed from >=0.2.0 to >=0.3.0 in version 0.1.1.
fix
Update typeorm to version >=0.3.0 in your project.
affects: >=0.1.1
gotchaThe CLI command must be run from the project root; otherwise it fails to find cca.config.json.
fix
Run the CLI from the root of your project where cca.config.json is located.
affects: *
Errors
Common errors & fixes
Error: Config file not found at /path/to/project/cca.config.json
The CLI is executed from a directory that does not contain cca.config.json.
fix
Change to the project root directory where cca.config.json exists, or specify a custom path using --config option if available.
Error: Connection refused: connect ECONNREFUSED 127.0.0.1:5432
PostgreSQL is not running or the host/port configuration is incorrect.
fix
Ensure PostgreSQL is running and that cca.config.json has correct host and port (default 5432).
Error: Duplicate migration name: CreateUserTable
A migration file with the same name already exists in the migrations directory.
fix
Use a unique migration name, or delete the existing migration file before generating a new one.
Error: Cannot find module 'typeorm'
typeorm is not installed as a dependency.
fix
Run 'npm install typeorm' to install the peer dependency.
Upgrade
Version history
0.1.1latest on npm
Audit
Dependencies
typeormrequiredPeer dependency; core ORM used by generated migrations.
typescriptoptionalPeer dependency; required for TypeScript support.
Agent activity
17 hits · last 30 days
node
14
Amazon
1
OpenAI (training)
1
Resources
cca-migration-generator — npm install cca-migration-generator · libregistry