primalbase/laravel-migrate-build

migrate:build from Google spreadsheet.

0.0.9.5 2016-03-18 02:28 UTC

This package is auto-updated.

Last update: 2024-11-06 23:57:36 UTC


README

supported only laravel 4.*

0.0.9 support only *.json

*.p12 use 0.0.8.0 branch

composer

composer require primalbase/laravel-migrate-build

app.php

  'providers' => array(
    'Primalbase\Migrate\MigrateServiceProvider',
  );

publish config file

$ php artisan config:publish primalbase/laravel-migrate-build

config/packages/primalbase/laravel-migrate-build/config.php

    'client_key_path' => GoogleClientKeyPath(*.json)

    'spread_sheet_name' => GoogleSpreadsheet SheetName,

    // Sheet availability check
    // Default A1 = 'テーブル定義書'
    'available_sheet_check' => [
      'col' => 1,
      'row' => 1,
      'value' => 'テーブル定義書',
    ],

How to use

php artisan migrate:build # show all available tables
php artisan migrate:build --all # build all migration files
php artisan migrate:build users roles # build migration files

generated todatabase/migrations