clive0417 / d-b-diagram-regular-parse
A d b diagram regular parse
v1.0.5
2022-11-06 14:41 UTC
Requires
- php: >=7.2
- illuminate/support: ^6.0|^7.0|^8.0
- mpociot/human-regex: dev-master
Requires (Dev)
- orchestra/testbench: ^4.0|^5.0|^6.0
- phpunit/phpunit: ^8.4|^9.0
This package is auto-updated.
Last update: 2024-11-06 18:47:31 UTC
README
Package description: CHANGE ME
Installation
Install via composer
composer require clive0417/d-b-diagram-regular-parse
Publish package assets
php artisan vendor:publish --provider="Clive0417\DBDiagramRegularParse\ServiceProvider"
Usage
使用方法請參考影片
step1 安裝套件
composer require clive0417/d-b-diagram-regular-parse
step2 複製 DB Diagram 並存檔
//商家
table merchants [headercolor: #16a085]
{
id bigint(20) [pk, increment, note: '流水號']
uuid char(36) [unique, note: 'uuid']
name varchar(250) [null, note:'名稱']
company_tax_id_number varchar(10) [note:'統編']
status smallint(5) [default: 201, note: '狀態']
deleted_at timestamp
created_at timestamp
updated_at timestamp
indexes{
uuid [unique, note: 'uuid索引']
company_tax_id_number [note: '統編索引']
(status, deleted_at) [note: '狀態索引']
}
}
....
step3 執行 解析 DB Diagram 產生 migration 檔指令
php artisan clive0417:migration_generate --db_diagram_path="{{DB Diagram 檔案路徑}}"
step4 執行 laravel migrate 指令,建立DB table
php artisan migrate
step5 執行讀取DB 產生 model 檔指令
php artisan clive0417:model_generate
Security
If you discover any security related issues, please email instead of using the issue tracker.
Credits
This package is bootstrapped with the help of melihovv/laravel-package-generator.