Git Product home page Git Product logo

laghu's Introduction

Project Intro

Laghu(Small in Kannada) Migration Tool!


Intro

Laghu is small migration tool. The flow is simple. First we will create a migration file. Add SQL to the created file. Run the migration!. When we run the migration, the tool check weather the file is all-ready migrated or not. If it is being migrated it won't run the SQL.
The tool will create Migration directory, migration table(laghu_migrations) when you run the script. DO NOT CHANGE DIRECTORY NAME and TABLE NAME unlsess you change the laghu.php script as well.
In small projects I found it is easier to have a migration based on raw SQL scripts than using a framework for it.

Config

Update config.php with database credentials

Commands

  1. Create Migration:
    php laghu.php create [file_suffix]
    php laghu.php create ct-user_detail -> this will create the file [timestamp]ct-user_detail in migration directory.
    Naming conventions (optional. Suggested for readiblity):
    ct -> create table
    mt -> modify table
    dt -> SQL contains Data
  2. Run migration
    php laghu.php migrate
    The command will run the migration outputs no. of files migrated successfully.

laghu's People

Contributors

manojmbharadwaj avatar manojtm 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.