-
Notifications
You must be signed in to change notification settings - Fork 15
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系から4系への移行を実装 #39
Merged
Merged
3系から4系への移行を実装 #39
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- まだ移行した受注を開けない
- dtb_tax_rule が異常?
以下のデータバックアッププラグインで出力したバックアップファイルを取り込むと、SQLエラーが発生します(PostgreSQL 9.6.17) EC-CUBE/data-backup-plugin-v3#1
delive_feeが空文字のためエラーになっているようです。 投入したバックアップファイルはこちらです。 |
postgresの型を考えてどうにか出来ればもっと手っ取り早い気はする
以下のパッチで、 PostgreSQL9.6 で動作しました diff --git a/Controller/Admin/ConfigController.php b/Controller/Admin/ConfigController.php
index 1ae1fb7..59e2504 100644
--- a/Controller/Admin/ConfigController.php
+++ b/Controller/Admin/ConfigController.php
@@ -582,6 +582,10 @@ class ConfigController extends AbstractController
$value[$column] = ($data['del_flg']) ? 0 : 1;
} elseif ($column == 'id' && $tableName == 'dtb_class_name') {
$value[$column] = $data['class_id'];
+ } elseif ($column == 'id' && $tableName == 'dtb_product_stock') {
+ $value[$column] = $data['product_stock_id'];
+ } elseif ($column == 'id' && $tableName == 'dtb_product_image') {
+ $value[$column] = $data['product_image_id'];
// 共通処理
} elseif ($column == 'discriminator_type') {
@@ -1207,7 +1211,14 @@ class ConfigController extends AbstractController
} elseif ($column == 'delivery_id') {
$value[$column] = isset($data['deliv_id']) ? $data['deliv_id'] : null;
} elseif ($column == 'delivery_time') {
- $value[$column] = isset($data['deliv_time']) ? $data['deliv_time'] : null;
+ if (isset($data['deliv_time'])) {
+ $value[$column] = $data['deliv_time'];
+ } elseif (isset($data['delivery_time'])) {
+ $value[$column] = $data['delivery_time'];
+ } else {
+ $value[$column] = null;
+ }
+
} elseif ($column == 'fee') {
$value[$column] = !empty($data['fee']) ? $data['fee'] : 0;
// --> payment PHP7.4対応(see: EC-CUBE/ec-cube@6931f30) diff --git a/Form/Type/Admin/ConfigType.php b/Form/Type/Admin/ConfigType.php
index 6f90410..a9df001 100644
--- a/Form/Type/Admin/ConfigType.php
+++ b/Form/Type/Admin/ConfigType.php
@@ -24,7 +24,7 @@ class ConfigType extends AbstractType
'constraints' => [
new NotBlank(['message' => 'ファイルを選択してください。']),
new File([
- 'mimeTypes' => ['application/zip', 'application/x-tar', 'application/x-gzip'],
+ 'mimeTypes' => ['application/zip', 'application/x-tar', 'application/x-gzip', 'application/gzip'],
'mimeTypesMessage' => 'zipファイル、tarファイル、tar.gzファイルのいずれかをアップロードしてください。',
]),
],
|
会員と受注データのみ移行する にチェックを入れると、以下のシステムエラーが発生する場合があります。
dtb_shipping の前に dtb_delivery_time を設定しておく必要がありそうです diff --git a/Controller/Admin/ConfigController.php b/Controller/Admin/ConfigController.php
index 1ae1fb7..f726c0c 100644
--- a/Controller/Admin/ConfigController.php
+++ b/Controller/Admin/ConfigController.php
@@ -156,6 +156,7 @@ class ConfigController extends AbstractController
if ($this->flag_3) {
$this->saveToC($em, $csvDir, 'dtb_customer_address');
+ $this->saveToO($em, $csvDir, 'dtb_delivery_time');
} else {
$this->saveToC($em, $csvDir, 'dtb_other_deliv', 'dtb_customer_address', false, 1/*$index*/);
} |
ありがとうございます。マージしました。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
3系から4系への移行