tung/export-migration

将数据库图导出为迁移文件的工具

v1.1.0 2022-08-28 11:50 UTC

This package is not auto-updated.

Last update: 2024-09-27 20:43:01 UTC


README

将 dbdiagram 的 txt 文件转换为迁移文件。用爱和热情在越南制作。

Minimum PHP Version

用法

  • 安装包
composer require tung/export-migration
  • 在项目最高目录中创建文件 export-migration.txt

  • 从 dbdiagram 复制文本格式并粘贴到 export-migration.txt

    image

  • 最后,运行 ./vendor/bin/phptung,文件将创建在 database/migrations

为开发设置 Docker

  • 构建镜像
docker build -f ./docker/Dockerfile -t convert_migration .
  • 运行容器
docker run -v $(pwd):/var/www/html -p 8000:8000 --name convert convert_migration