Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0.x -> 3.nへのデータ移行 #2455

Closed
chihiro-adachi opened this issue Aug 8, 2017 · 2 comments
Closed

3.0.x -> 3.nへのデータ移行 #2455

chihiro-adachi opened this issue Aug 8, 2017 · 2 comments

Comments

@chihiro-adachi
Copy link
Contributor

chihiro-adachi commented Aug 8, 2017

概要

3.0.x - > 3.nへのデータ移行の素案です。

3.0.xのデータを抽出し、DataFixture(#2199)で読み込み可能なCSVへ変換する。
以下の操作を想定しています。

cd /path/to/eccube30
php app/console convert:3n /path/to/eccube3n/src/Resouce/doctrine/import_csv

cd /path/to/eccube3n
eccube_install.php sqliite

対象テーブル

  • 一定の変換処理が必要なてテーブル
    • 会員
    • 商品
    • 受注
  • その他テーブル
    • その他のテーブル以下の共通処理のみで変換できるように対応する
  • プラグインで追加したテーブル
    • 定義ファイルの追加などの方法で追加できるようにする

共通

  • 時刻カラムはUTC時刻へ変換する
  • 金額を扱うテーブルにはcurrencyカラムを付与する
  • discriminator_typeカラムを追加する

会員

  • dtb_customer
  • dtb_customer_address
  • dtb_customer_favorite_product

固有の変更点はなし。共通項目を対応する

商品

  • dtb_product
  • dtb_product_class
  • dtb_category
    • dtb_category.level -> dtb_category.hierarchy
  • dtb_product_category
  • dtb_class
  • dtb_class_name
  • dtb_product_image
  • dtb_product_stock
  • dtb_product_tag

固有の変更点はなし。共通項目を対応する

受注

データレイアウトの変更が発生する

  • dtb_order -> dtb_order
  • dtb_order_detail   -> 廃止
  • dtb_shipping -> dtb_shipping
    • order_id -> 廃止
  • dtb_shipment_item -> dtb_shipment_item
    • tax_type_id(mtb_tax_type)
      • 1:課税
      • 2:不課税
      • 3:非課税
    • tax_display_type_id(mtb_tax_display_type)
      • 1:税抜
      • 2:税込
    • order_item_type_id(mtb_order_item_type)
      • 1:商品
      • 2:配送料
      • 3:手数料
      • 4:値引き
      • 5:税
    • currency_code
      • JPY固定
    • dtb_orderのサマリを参照し、shimpment_itemへレコードを追加する

その他受注に関連するテーブル

  • 商品関連テーブル
  • 会員関連テーブル
  • 配送
    • dtb_delivery
    • dtb_delivery_date
    • dtb_delivery_fee
    • dtb_delivery_time
  • 支払
    • dtb_payment
      • method_class
        • Eccube\Service\Payment\PaymentMethodの実装クラス名を指定
      • service_class
        • Eccube\Service\PaymentServiceの実装クラス名を指定
    • dtb_payment_option

その他留意事項

@chihiro-adachi chihiro-adachi added this to the 3.1.0 milestone Aug 8, 2017
@Yangsin
Copy link

Yangsin commented Aug 9, 2017

eccube_install.php sqliite

のように完全インストールしなおすように見えるものよりは、データ移行だけのコマンドを用意したいです。

@chihiro-adachi
Copy link
Contributor Author

2系・3系から4系へのデータ移行については以下プラグインで対応しています。
https://github.com/EC-CUBE/data-migration-plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants