| @@ 13-24 (lines=12) @@ | ||
| 10 | /** |
|
| 11 | * @param Schema $schema |
|
| 12 | */ |
|
| 13 | public function up(Schema $schema) |
|
| 14 | { |
|
| 15 | // DeliveryDate のお届け日数を修正 |
|
| 16 | // see https://github.com/EC-CUBE/ec-cube/issues/1732 |
|
| 17 | $app = \Eccube\Application::getInstance(); |
|
| 18 | $em = $app["orm.em"]; |
|
| 19 | $DeliveryDate = $app['eccube.repository.delivery_date']->find(9); |
|
| 20 | if ($DeliveryDate->getValue() === 0) { |
|
| 21 | $DeliveryDate->setValue(-1); |
|
| 22 | $em->flush($DeliveryDate); |
|
| 23 | } |
|
| 24 | } |
|
| 25 | ||
| 26 | /** |
|
| 27 | * @param Schema $schema |
|
| @@ 29-38 (lines=10) @@ | ||
| 26 | /** |
|
| 27 | * @param Schema $schema |
|
| 28 | */ |
|
| 29 | public function down(Schema $schema) |
|
| 30 | { |
|
| 31 | $app = \Eccube\Application::getInstance(); |
|
| 32 | $em = $app["orm.em"]; |
|
| 33 | $DeliveryDate = $app['eccube.repository.delivery_date']->find(9); |
|
| 34 | if ($DeliveryDate->getValue() === -1) { |
|
| 35 | $DeliveryDate->setValue(0); |
|
| 36 | $em->flush($DeliveryDate); |
|
| 37 | } |
|
| 38 | } |
|
| 39 | } |
|
| 40 | ||