Coder Social home page Coder Social logo

cesar-mysql-migrator's Introduction

Cesar migrator SQL processor v 3.0.1 - build 100

Installing

Global install in Linux

Requirements

  • Composer
  • PHP

You can get Cesar Migrator in here Packagist

Install with Composer

sudo rm -rf ~/cesar_migrator_tmp
sudo rm -rf /opt/cesar_migrator
sudo rm -rf /usr/bin/cesar-migrator

mkdir ~/cesar_migrator_tmp
composer create-project cesar/cesar-migrator ~/cesar_migrator_tmp -s dev
sudo mkdir -p /opt/cesar_migrator
sudo mv ~/cesar_migrator_tmp/* /opt/cesar_migrator/
sudo ln -s /opt/cesar_migrator/cesar-migrator /usr/bin/

Using

Config file

return [
    [
        "databases" => [
            [
                "type" => "mysql",
                "host" => "localhost",
                "port" => 3306,
                "name" => "",
                "user" => "",
                "password" => ""
            ]
        ],
        "mainfolder" => "", // Pool of queries, in here are inserted new query files
        "mainfile" => "", // Constant queries, this query is executed every time
        "queuefoldername" => "" // Queries of environment, directory used by Cesar migrator, do not require user interaction.
    ]
];

Skeleton required by queuefoldername

queue/executed

Example:
/home/cesar/myproject-cesar-migrator-config/queue

/home/cesar/myproject-cesar-migrator-config/queue/executed
Create example
mkdir -p /home/cesar/myproject-cesar-migrator-config/queue/executed

Update

cesar@t-rex:~$cd /opt/cesar_migrator
cesar@t-rex:/opt/cesar_migrator$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files

Command

Help param -h
cesar@t-rex:~$ ./cesar-migrator -h

 SQL Processor v3.0 - by Edily Cesar Medule ([email protected])

-n Create file for new query
 - a Define the query author
 - d Define a query description
 - r Run the queries
 - f Config file
 - c Validate runs on all databases
 - h Help
 - m Manual / Documentation (Future)
 - k Clear all, database control table and directory contents

Example:
 ./cesar-migrator -a Cesar -d Query marotinha -r

cesar-mysql-migrator's People

Contributors

edilycesar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.