sachoo / phalcon-console-migration

基于 sachoo/phalcon-console,此组件处理数据库迁移(上,下,差异,状态,运行)

2.0.1 2020-09-10 15:30 UTC

This package is not auto-updated.

Last update: 2024-09-20 10:25:08 UTC


README

基于 sachoo/phalcon-console,此组件根据您的模型元数据处理数据库迁移(上,下,差异,状态,运行)。

要求

  • PHP >= 5.6
  • Phalcon >= 3.0.0

安装

按照以下安装说明进行操作 sachoo/phalcon-console

使用方法

迁移命令生成带有时间戳版本的脚本。在您的配置文件中,您必须定义一个 config->application->migrationDir 值。然后您必须使用 sachoo/phalcon-model-annotations 管理您的模型元数据

要了解更多关于迁移功能的信息,请执行

 ./console mig

此命令应显示类似以下内容

Help:
  Migration Commands

Usage: Generate a Migration
  mig gen

Usage: Run all available Migrations
  mig run

Usage: Run just one migration up
  mig up

Usage: Run just one migration down
  mig down

Usage: Generate migration file with Diff beetween Models and your Databases
  mig diff

Usage: Show migration status
  mig status