https://github.com/israeleriston/migration-tools
A tool migration tooling has regenerated database
https://github.com/israeleriston/migration-tools
migration normalization-database postgresql recreate-fk recreate-pk
Last synced: 7 months ago
JSON representation
A tool migration tooling has regenerated database
- Host: GitHub
- URL: https://github.com/israeleriston/migration-tools
- Owner: israeleriston
- License: mit
- Created: 2018-03-21T18:12:20.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-11T02:01:35.000Z (almost 8 years ago)
- Last Synced: 2025-07-03T04:17:57.116Z (7 months ago)
- Topics: migration, normalization-database, postgresql, recreate-fk, recreate-pk
- Language: JavaScript
- Size: 71.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# migration-tools
> The simple command-line tools (CLI), to recreate the primary keys and foreign key of your database, recommended for use in denormalized databases
## Introduction
migration-tools is a CLI, to recreating Primary Key's and Foreing Key's the databases desnormalized.
It is designed to be simple in both usage.
## Warning
only a database postgresql is supported, for a while :/
## How to install
` npm install -g migration-tools `
## How to use
The tool will look for all the tables that use this id, passed as parameter,
and will create Primary key (if it does not exist, for the table passed as parameter),
and will create the foreing keys linking the table and the pk passed as parameter,
so in the end you will get a base structure with its respective constraints.
required only the params
* db - url of connection with database
* table - using as reference
* pk - primary key using as based of searching
It's simple example the usage
```
migration --db=postgresql://postgres:password@localhost:5432/migration --table=users --pk=id_users
```
## disclaimer
any error can be reported, as issue and I am accepting PR's :)