@kwaeri/mysql-migration-generator
v0.5.0
Published
The @kwaeri/mysql-migration-generator component module of the @kwaeri/node-kit platform.
Downloads
11
Maintainers
Readme
kwaeri-cli-providers-mysql-migration-generator
A Massively Modified Open Source Project by kirvedx
The @kwaeri/mysql-migration-generator component for the @kwaeri/node-kit application platform
TOC
The Implementation
The mysql-migration-generator provides the method(s) for fulfilling the content creation requests of end users of kwaeri/cli [kue].
kwaeri/mysql-migration-generator was originally included in the entry point to the platform under the directory [from root] node-kit/core/
. In an attempt to standardize implementation - by separating concerns - as well as to ease maintainence of each component of the platform, the mysql-migration-generator was migrated to its own component module.
Getting Started
NOTE
kwaeri/mysql-migration-generator is not ready for production. We've published this module for testing and development purposes. You're free to try out anything that may already be available, but please be aware that there is likely to be many aspects of the platform which are not working and/or are completely broken. As we near completion of the new platform, we'll update documentation and provide complete examples and tutorials for getting started.
Installation
kwaeri/node-kit wraps the various node-kit components under the kwaeri scope, and provides a single entry point to the node-kit framework for easing the process of building a kwaeri application.
kwaeri/cli wraps the various CLI components under the @kwaeri scope, and provides a single entry point to the user executable framework.
However, if you wish to use @kwaeri/mysql-migration-generator - perform the following steps:
Install @kwaeri/user-executable, @kwaeri/mysql-migrator and @kwaeri/mysql-migration-generator:
npm install @kwaeri/mysql-migration-generator @kwaeri/mysql-migrator
Configuration
The mysql-migration-generator component is leveraged by the CLI, through the Steward, explicitly in its handling of commands passed to it by the end user requesting content to be generated - which is pretty much the core purpose of the CLI.
To leverage the mysql-migration-generator component, you'll first need to include it in your list of kue providers:
In ./path/to/project/conf/cli.default.json
:
{
"providers": [
"@kwaeri/mysql-migrator",
"@kwaeri/mysql-migration-generator"
]
}
Usage
After, you can generate a new migration:
kue new migration AddTableToDatabase
Once the migration is generated you can open and edit the migration. The migration is located in the data/migrations
directory from the root of your project (current working directory when the command was run). If the current year is 2022 and the current month is October, the migration - as named in the example above - would be located at data/migrations/2022/10/<timestamp>_AddTableToDatabase.js
.
After editing the migration to manipulate the database as you'd require (the intelligent boilerplate puts you needing only to provide the real business logic; i.e. Write the query to "add table x to database y"),
It's then time to run the migration:
kue migrations
More Information
- The user-executable, and all providers, can be installed globally.
- The
cli.default.json
configuration can live at the system, user, or project level. - The entire process can be scripted in a container as part of a pipeline process for managing migrations. See kwaeri-composition for template containers, configuration, helper scripts, and more.
To be continued...
NOTE
As mentioned earlier, the plan is to continue development of the myriad components of the node-kit platform - the mysql-migration-generator component included - and ultimately ease the process of development, maintainence, and usage of each individual component as they are decoupled from one another.
How to Contribute Code
Our Open Source projects are always open to contribution. If you'd like to cocntribute, all we ask is that you follow the guidelines for contributions, which can be found at the Massively Modified Wiki
There you'll find topics such as the guidelines for contributions; step-by-step walk-throughs for getting set up, Coding Standards, CSS Naming Conventions, and more.
The project also leverages Keybase for communication and alerts - outside of standard email. To join our keybase chat, run the following from terminal (assuming you have keybase installed and running):
keybase team request-access kwaeri
Alternatively, you could search for the team in the GUI application and request access from there.
Other Ways to Contribute
There are other ways to contribute to the project other than with code. Consider testing the software, or in case you've found an Bug - please report it. You can also support the project monetarly through donations via PayPal.
Regardless of how you'd like to contribute, you can also find in-depth information for how to do so at the Massively Modified Wiki
Bug Reports
To submit bug reports, request enhancements, and/or new features - please make use of the issues system baked-in to our source control project space at Gitlab
You may optionally start an issue, track, and manage it via email by sending an email to our project's Service Desk.
For more in-depth documentation on the process of submitting bug reports, please visit the Massively Modified Wiki on Bug Reports
Vulnerability Reports
Our Vulnerability Reporting process is very similar to Gitlab's. In fact, you could say its a fork.
To submit vulnerability reports, please email our Security Group. We will try to acknowledge receipt of said vulnerability by the next business day, and to also provide regular updates about our progress. If you are curious about the status of your report feel free to email us again. If you wish to encrypt your disclosure email, like with gitlab - please email us to ask for our GPG Key.
Please refrain from requesting compensation for reporting vulnerabilities. We will publicly acknowledge your responsible disclosure, if you request us to do so. We will also try to make the confidential issue public after the vulnerability is announced.
You are not allowed, and will not be able, to search for vulnerabilities on Gitlab.com. As our software is open source, you may download a copy of the source and test against that.
Confidential Issues
When a vulnerability is discovered, we create a [confidential issue] to track it internally. Security patches will be pushed to private branches and eventually merged into a security
branch. Security issues that are not vulnerabilites can be seen on our public issue tracker.
For more in-depth information regarding vulnerability reports, confidentiality, and our practices; Please visit the Massively Modified Wiki on Vulnerability
Donations
If you cannot contribute time or energy to neither the code base, documentation, nor community support; please consider making a monetary contribution which is extremely useful for maintaining the Massively Modified network and all the goodies offered free to the public.