delirehberi/importbundle

此包已被弃用,不再维护。未建议替代包。

用于在不同数据库间传输数据的工具

安装: 104

依赖者: 0

建议者: 0

安全: 0

星标: 8

关注者: 2

分支: 1

开放问题: 0

类型:symfony-bundle

1.5.4 2016-01-08 14:18 UTC

This package is not auto-updated.

Last update: 2020-01-24 16:03:43 UTC


README

Join the chat at https://gitter.im/delirehberi/importbundle

安装

步骤 1: 下载包

打开命令行,进入您的项目目录,并执行以下命令以下载此包的最新稳定版本

$ composer require delirehberi/import ">=1"

此命令要求您全局安装了Composer,如Composer文档中的安装章节中所述。

步骤 2: 启用包

然后,将包添加到项目app/AppKernel.php文件中注册的包列表中,以启用它

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...

            new Delirehberi\ImportBundle\DelirehberiImportBundle(),
        );

        // ...
    }

    // ...
}

步骤 3: 配置您的映射

打开您的配置文件(app/config/config.yml)并按如下方式编辑

parameters:
  delirehberi_import:
    connection_key:
      database:
        driver: pdo_mysql
        user: root
        password: null
        dbname: old_database_name
        host: localhost
        port: ~
        charset: 'utf8'
      maps:
        news:
          entity: Acme\ContentBundle\Entity\Content
          old_data:
            service_id: my_project.data_service
            method: getOldData
          fields:
            old_id:
              type: integer
              name: ID
          ...

提示:如果您不想更新现有项目,可以将此配置添加到您的config.yml文件中

delirehberi_import:
    update: false

文档

查看概要