sonrac/symfony-seed-command 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sonrac/symfony-seed-command

最新稳定版本:1.7.3

Composer 安装命令:

composer require sonrac/symfony-seed-command

包简介

Symfony simple seed command

README 文档

README

Build Status StyleCI

Scrutinizer Build Scrutinizer Scrutinizer Code Coverage codecov Packagist Latest Unstable Version License Total Downloads Monthly Downloads Daily Downloads composer.lock

Install

composer require sonrac/symfony-seed-command

Introduction

The package is designed to fill the database with data bypassing migrations.

Usages for silex or symfony

Add to console application command sonrac\SeedCommand, as example, for silex:

$app->add(new sonrac\SimpleSeed\SeedCommand(null, $app->get('db')));

Create seed:

Seed class must be implement sonrac\SimpleSeed\SeedInterface

Predefined seed classes

  • sonrac\SimpleSeed\SimpleSeed

Simple seed for data insert. Define getTable for table name and getData for get data.

Insert would be run automatically

  • sonrac\SimpleSeed\SimpleSeedWithCheckExists

Seed with check exists inserted data before insert. Define getTable for table name and getData for get data. Also, define getWhereForRow which is where filter for select data before insert

Insert would be run automatically

统计信息

  • 总下载量: 13.21k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 2
  • 依赖项目数: 1
  • 推荐数: 1

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-02-06