All Projects → ucan-lab → laravel-dacapo

ucan-lab / laravel-dacapo

Licence: MIT License
Laravel migration support tool, Always generate the latest migration files on schema.yml

Programming Languages

PHP
23972 projects - #3 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to laravel-dacapo

laravel-migrate-check
An artisan command to check for pending migrations with proper exit code
Stars: ✭ 53 (-39.77%)
Mutual labels:  laravel-package, laravel-migration
magento-laravel-api
A simple Magento 2 REST API Object Oriented wrapper for Laravel applications.
Stars: ✭ 45 (-48.86%)
Mutual labels:  laravel-package
Laravel-Unsplash-Wrapper
A Laravel wrapper for Unsplash API's.
Stars: ✭ 21 (-76.14%)
Mutual labels:  laravel-package
phpcsfixer-preset
Use the same php-cs-fixer configuration across all of your projects, with presets for common project layouts (Laravel, Composer packages, etc.).
Stars: ✭ 22 (-75%)
Mutual labels:  laravel-package
panichd
Ticketing system for Laravel 5.1 - 8.x. Allows to create new tickets via form only. Includes file attachments, ticket tags, filtering, scheduling and e-mail notifications.
Stars: ✭ 78 (-11.36%)
Mutual labels:  laravel-package
active-state
Laravel Active State Url Helper For Request
Stars: ✭ 45 (-48.86%)
Mutual labels:  laravel-package
track-who
Laravel Traits for tracking who's done what to your models
Stars: ✭ 29 (-67.05%)
Mutual labels:  laravel-package
laravel-crud-generator
Laravel CRUD Generator
Stars: ✭ 181 (+105.68%)
Mutual labels:  laravel-package
shield
A laravel middleware to protect against unverified webhooks from 3rd party services.
Stars: ✭ 96 (+9.09%)
Mutual labels:  laravel-package
smart-schema
A Laravel package to enable auto generation of forms
Stars: ✭ 18 (-79.55%)
Mutual labels:  laravel-package
dropzoner
Laravel package for image upload using DropzoneJS
Stars: ✭ 46 (-47.73%)
Mutual labels:  laravel-package
laravel-miniprogram-poster
Use Laravel to building a miniprogram poster.
Stars: ✭ 72 (-18.18%)
Mutual labels:  laravel-package
searchable
Pattern-matching search and reusable queries in laravel.
Stars: ✭ 28 (-68.18%)
Mutual labels:  laravel-package
artisan-cloudflare
Laravel artisan commands for CloudFlare
Stars: ✭ 67 (-23.86%)
Mutual labels:  laravel-package
Base62
PHP Base62 encoder and decoder for integers and big integers with Laravel 5 support.
Stars: ✭ 16 (-81.82%)
Mutual labels:  laravel-package
email-checker
Provides email verification on the go.
Stars: ✭ 116 (+31.82%)
Mutual labels:  laravel-package
devtube
Laravel YouTube and Online Video viewing and download interface.
Stars: ✭ 30 (-65.91%)
Mutual labels:  laravel-package
laravel-bitcoinrpc
Bitcoin JSON-RPC Service Provider for Laravel.
Stars: ✭ 83 (-5.68%)
Mutual labels:  laravel-package
larafeed
Laravel package for providing visual feedback via screenshots.
Stars: ✭ 42 (-52.27%)
Mutual labels:  laravel-package
artisan-beans
Easily manage your Beanstalkd job queues right from the Laravel artisan command
Stars: ✭ 41 (-53.41%)
Mutual labels:  laravel-package

Laravel-Dacapo

Build Status Latest Stable Version Total Downloads Daily Downloads License

Introduction

Dacapo is a Laravel migration file creation support library. Define the table structure in the schema yml file, Always generate the latest and tidy migration file.

This library is intended for use only in the coding phase. In the operation phase, uninstall and return to normal migration operation.

Installation

$ composer require --dev ucan-lab/laravel-dacapo

Usage

Generate default schema.yml

$ php artisan dacapo:init

database/schemas/default.yml By default, a schema file for Laravel8 is generated.

users:
  columns:
    id:
    name: string
    email:
      type: string
      unique:
    email_verified_at:
      type: timestamp
      nullable:
    password: string
    rememberToken:
    timestamps:

password_resets:
  columns:
    email:
      type: string
      index:
    token: string
    created_at:
      type: timestamp
      nullable:

failed_jobs:
  columns:
    id:
    uuid:
      type: string
      unique:
    connection: text
    queue: text
    payload: longText
    exception: longText
    failed_at:
      type: timestamp
      useCurrent:

Generate migration files

$ php artisan dacapo

3 files are generated and migrate fresh.

  • 1970_01_01_000001_create_failed_jobs_table.php
  • 1970_01_01_000001_create_password_resets_table.php
  • 1970_01_01_000001_create_users_table.php

Dacapo Option

# Execute migrate and seeding
$ php artisan dacapo --seed
# Do not execute migrate
$ php artisan dacapo --no-migrate

Schema file format

  • {} any value
  • database/schemas/*.yml
  • If it cannot be expressed in YAML, it can be used together with standard migration.
    • php artisan make:migration
# COMMENT
{TableName}:
  columns:
    {ColumnName}: {ColumnType}
    {ColumnName}:
      type: {ColumnType}
    {ColumnName}:
      unique: true
      nullable: true
      default: {DefaultValue}
      comment: {ColumnName}
      {ColumnModifier}: {ColumnModifierValue}
  indexes:
    - columns: {ColumnName}
      type: {IndexType}
    - columns: [{ColumnName}, {ColumnName}]
      type: {IndexType}
    - columns: {ColumnName}
      type: {IndexType}
      name: {IndexName}
  foreign_keys:
    - columns: {ColumnName}
      references: {ReferenceColumnName}
      table: {ReferenceTableName}
    - columns: {ColumnName}
      references: {ReferenceColumnName}
      table: {ReferenceTableName}
      onUpdateAction: {ConstraintProperty}
      onDeleteAction: {ConstraintProperty}
    - columns: [{ColumnName}, {ColumnName}]
      references: [{ReferenceColumnName}, {ReferenceColumnName}]
      table: {ReferenceTableName}

{TableName}:
  columns:
    {ColumnName}: {ColumnType}

Dacapo Clear Migrations

$ php artisan dacapo:clear
$ php artisan dacapo:clear --all
  • --all Delete including standard migration files.

Dacapo Stub publish

$ php artisan dacapo:stub:publish

Dacapo Uninstall

$ php artisan dacapo:uninstall
$ composer remove --dev ucan-lab/laravel-dacapo
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].