-
Notifications
You must be signed in to change notification settings - Fork 653
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/4.3' into feature/google_analy…
…tics
- Loading branch information
Showing
62 changed files
with
664 additions
and
348 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace DoctrineMigrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
/** | ||
* Auto-generated Migration: Please modify to your needs! | ||
*/ | ||
final class Version20240312170000 extends AbstractMigration | ||
{ | ||
const NAME = 'dtb_block'; | ||
|
||
public function up(Schema $schema): void | ||
{ | ||
// テーブルが存在しない場合終了 | ||
if (!$schema->hasTable(self::NAME)) { | ||
return; | ||
} | ||
|
||
$blockExists = $this->connection->fetchOne("SELECT COUNT(*) FROM dtb_block WHERE file_name = 'auto_new_item'"); | ||
if ($blockExists == 0) { | ||
$this->addSql("INSERT INTO dtb_block (device_type_id, block_name, file_name, create_date, update_date, use_controller, deletable, discriminator_type) VALUES (10, '新着商品(自動取得)', 'auto_new_item', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, '1', '0', 'block')"); | ||
} | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
$this->addSql("DELETE FROM dtb_block WHERE file_name = 'auto_new_item'"); | ||
} | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.