Laravel MiGator - Migrations Generator

Related tags

Laravel MiGator
Overview

Laravel Migator

Latest Version GitHub Workflow Status Total Downloads

Laravel Migator personified as Arnold Schwarzenegger in Terminator

A package that will allow developers to interactively generate schema migrations for a laravel application. It takes into account the existing entity/fields based on the available data in the database.

This package will ask the developer interactively for the following:

  • model
  • table (default: derived from laravel model naming convention)
  • fields (repeatedly)
    • name
    • type
      • id
      • uuid
      • type
      • boolean
      • text
      • date
      • datetime
      • json
      • id
      • integer
    • [-] default value ((#11)[#11])
    • [-] index ((#12)[#12])
    • [-] foreign keys ((#13)[])
  • [-] relations to other entities ((#9)[])

It will then ask for writing this into a migration file. It creates and writes a new migration file to the default laravel migration path.

Installation

This package can be installed using composer:

composer require wearesynetic/laravel-migator --dev

Usage

php artisan make:migator

This will start the migator process.

Roadmap

  • Derive table name default from the given model
  • Implement validation of preexisting columns / definitions
  • Implement CLI usage for 'model'-specific use case ((#5)[#5])
  • [-] Implement CLI usage for 'other' use case ((#6)[#6])
  • [-] Implement relation mapping / autocomplete ((#9)[#9])
  • [-] Optionally specify the stub to be used for the migration ((#10)[#10])
Comments
  • Feature/field type parameters

    Feature/field type parameters

    FieldType parameters als collectie. In het commando kunnen we dan door de parameters heen lussen en eventuele invoer erin opslaan. Deze mr zorgt ervoor dat de collecties beschikbaar zijn en dat de values goed worden weggeschreven in de migratie bestanden.

    opened by mishavantol 0
  • Feature/refactor writer

    Feature/refactor writer

    Cleanup of the services: The migration service creates a migration and uses a formatter service which formats the model collection, and a writer service which writes the contents to the correct file.

    • don't use File facade since it could be mapped to another root directory in the Laravel app.
    • use constructor injection for dependencies instead of new x in classes.
    • created migration files are now psr-12 formatted.
    opened by mishavantol 0
  • Feature/fieldtype refactor

    Feature/fieldtype refactor

    Refactor fieldType handling. Do not auto discover field types since this requires reading the directory or initializing all types first. Imho it's better to hard code the list. Which now can be done easily by adding a new xType() to the array.

    Use the same naming in the table and the field type list (was 'DateTimeType'):

    image

    Phpstan level can go to 8 now 🎉

    opened by mishavantol 0
  • Implement relation mapping / autocomplete

    Implement relation mapping / autocomplete

    When adding a column to a (exsting) model it would be great if we could add a relation to another model.

    This would also be nice to have as an autocomplete function

    opened by fruitl00p 0
  • Specify custom stub for the migration generation

    Specify custom stub for the migration generation

    This would allow developers (or organisations) to specify a stub file to be used for the generation of the migration. (according to https://laravel.com/docs/9.x/artisan#stub-customization)

    opened by fruitl00p 1
  • Generic migator use case

    Generic migator use case

    By not passing any arguments to the CLI interface the developer should be able to generate a generic migration of various types:

    • pivot tables
    • updating actual DATA using a custom callback scaffold type generated file
    opened by fruitl00p 0
Releases(0.1.0)
  • 0.1.0(Oct 12, 2022)

    This is the first release of MiGator: the laravel migration generator.

    Get to the choppa, credits to the original owners

    This package guides the developer using an interactive CLI interface to generate a (currently) basic migration.

    Source code(tar.gz)
    Source code(zip)
Owner
Synetic
Synetic
Laravel Design Pattern Generator (api generator)

Laravel Design Pattern Generator (api generator) you can create your restful api easily by using this library and you can filter, sort and include elo

HusseinAlaa 2 Sep 25, 2022
Automatic Laravel model migrations.

Laravel Automatic Migrations Automatic Laravel model migrations. Instead of having to create and manage migration files, this package allows you to sp

null 38 Nov 11, 2022
Declare database migrations and factory definitions inside Laravel models.

Lucid This package allows you to declare database migrations and factory definitions inside of your Laravel models. Running the lucid:migrate command

null 23 Jul 9, 2022
Easily add all the 58 Algerian Wilayas and its Dairas to your cool Laravel project (Migrations, Seeders and Models).

Laravel-Algereography Laravel-Algereography allows you to add Migrations, Seeders and Models of Algerian Wilayas and Dairas to your existing or new co

Hocine Saad 48 Nov 25, 2022
Validate PHP database migration files for compliance with best practices. Ensure db migrations are irreversible.

PHP DB Migration Validator Introduction In modern PHP frameworks such as Symfony and Laravel, migrations usually have up and down methods. In up metho

Anton Komarev 17 Dec 14, 2022
This package extends Illuminate to provide partitioned table creation in migrations.

Laravel Partitions for Migrations This package extends Illuminate to provide partitioned table creation in migrations for PostgreSQL. Support for othe

ORPTech 9 Oct 24, 2022
Html menu generator for Laravel

Html Menu Generator for Laravel This is the Laravel version of our menu package adds some extras like convenience methods for generating URLs and macr

Spatie 813 Jan 4, 2023
A Laravel and Lumen Badges Generator

Laravel and Lumen Badge Generator That package is a easy wrapper to Badges/Poser. #Installing composer require vluzrmos/laravel-badge-poser Laravel co

Vagner Luz do Carmo 6 Jun 10, 2020
A package for Laravel One Time Password (OTP) generator and validation without Eloquent Model, since it done by Cache.

Laravel OTP Introduction A package for Laravel One Time Password (OTP) generator and validation without Eloquent Model, since it done by Cache. The ca

Lim Teck Wei 52 Sep 6, 2022
Laravel Livewire (TALL-stack) form generator with realtime validation, file uploads, array fields, blade form input components and more.

TALL-stack form generator Laravel Livewire, Tailwind forms with auto-generated views. Support Contributions Features This is not an admin panel genera

TinaH 622 Jan 2, 2023
Promotional Codes Generator for Laravel >5

laravel-promocodes Promocodes generator for Laravel 5.*. Trying to make the best package in this category. You are welcome to join the party, give me

Zura Gabievi 425 Dec 26, 2022
A Laravel Code Generator based on your Models using Blade Template Engine

Laravel Code Generator is a PHP Laravel Package that uses Blade template engine to generate code for you. The difference between other code generators

Victor Yoalli 59 Dec 5, 2022
Laravel 5 Model Factory Generator

Laravel 5 Model Factory Generator This package offers a lazy way to create a new model factory files, since Laravel (< 5.5) have no Artisan command to

Roni Yusuf Manalu 16 Feb 15, 2020
API generator for Laravel 5

Apify API generator for Laravel 5 Table Of Contents Installation Configuration Usage Installation To install apify use composer Download composer requ

Erik C. Forés 26 Dec 14, 2022
Scaffold generator for Laravel 5.x

Laravel 5.x Scaffold Generator Usage Step 1: Install Through Composer composer require 'laralib/l5scaffold' --dev Step 2: Add the Service Provider Op

null 315 Dec 8, 2022
Laravel 5 Barcode Generator

This is a barcode generation package inspired by https://github.com/tecnickcom/TCPDF. Actually, I use that package's underline classes for generating

Nuruzzaman Milon 1.1k Jan 6, 2023
Secret Phrase Generator for Laravel.

Secret Phrase Generator for Laravel It generates secret pass phrase for Laravel Auth System. Require "require": { "php": "^7.3|^8.0",

null 2 Feb 21, 2022
Simple project to send bulk comma-separated emails using laravel and messenger module from quick admin panel generator.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Novath Thomas 1 Dec 1, 2021
Laravel generator with GUI. Generate crud / scaffold.

Laravel generator with GUI. Generate crud / scaffold.

George 420 Dec 5, 2022