anroots/minion-importer 问题修复 & 功能扩展

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

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

anroots/minion-importer

最新稳定版本:1.0.1

Composer 安装命令:

composer require anroots/minion-importer

包简介

CLI data import module for Kohana

README 文档

README

Extends the Minion module to provide a framework for importing/populating data.

Example terminal session

Two main use cases:

  • Importing legacy data from external databases
  • Generating dummy sample data

Real world use case

You are tasked with creating a new version of your in-house issue tracker, from scratch. You design your new database model and now you need to import existing data from the old system. The schema has changed so the columns do not match one-to-one and maybe you want to filter out deleted issues and what-knot.

Use this module to help you do that. Simply define a Minion_Import_* model for your entity to do data fetching, mapping and filtering. See example implementation for companies.

Usage

  • Create class: Minion_Import_Company
  • Implement Minion_Import_Importable
  • Modify APPPATH.'config/minion/import.php' (copy sample from the module dir), add your new model to the truncate_order and models arrays
  • Run ./minion import from the CLI

Faker

Use fzaninotto/Faker to generate dummy sample/test data with minion-importer.

Requires

  • Kohana Framework 3.3
  • PHP 5.4
  • Minion, Database, ORM modules

Installation

Place the files in your modules directory

As a Git submodule:

git clone git://github.com/anroots/kohana-minion-importer.git modules/minion-importer

As a Composer dependency

{
	"require": {
		"anroots/minion-importer":"1.*"
	}
}

Activate the module in bootstrap.php.

<?php
Kohana::modules(array(
	...
	'minion-importer' => MODPATH.'minion-importer',
));

Licence

MIT, do whatever. Pull requests and feedback appreciated.

统计信息

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

GitHub 信息

  • Stars: 7
  • Watchers: 7
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-02-23