vertabelo / vertabelo-propel
将 Vertabelo xml 文件转换为 Propel schema.xml 文件
v0.5.0
2014-11-27 14:00 UTC
Requires
This package is not auto-updated.
Last update: 2024-09-28 16:05:08 UTC
README
将 Vertabelo XML 文件转换为 Propel 的 schema.xml 文件。
安装
VertabeloPropel 使用 [Composer] (https://getcomposer.org.cn/) 来管理项目依赖。
-
创建一个
composer.json
文件{ "require": { "vertabelo/vertabelo-propel": "*@dev" } }
-
运行 Composer。
composer install
这将下载 VertabeloPropel 到你的项目目录中的 vendor
目录。
使用方法
- 使用 Vertabelo 创建数据库模型。
- 将模型下载为 XML 文件。
- 运行 vertabelo-propel.php 脚本。
-
如果你通过 Composer 安装了 VertabeloPropel,运行
```bash
vendor/bin/vertabelo-propel.php -i model.xml -o schema.xml --database-name my_db --default-id-method native
-
如果你克隆了 GitHub 仓库,运行
```bash
./bin/vertabelo-propel.php -i model.xml -o schema.xml --database-name my_db --default-id-method native
- 你的 Propel schema.xml 文件已生成。按照 Propel 的一般流程继续操作。
获取帮助
不添加任何参数运行脚本,以查看可用选项列表。
vendor/bin/vertabelo-propel.php