From 192f6da8551d83db65bdc32ad16a4e024f6b7cdc Mon Sep 17 00:00:00 2001 From: tmx-researchmap-team Date: Fri, 6 Feb 2026 14:38:57 +0900 Subject: [PATCH 1/2] =?UTF-8?q?add:=20=E3=83=91=E3=83=95=E3=82=A9=E3=83=BC?= =?UTF-8?q?=E3=83=9E=E3=83=B3=E3=82=B9=E6=94=B9=E5=96=84=E3=81=AB=E4=BC=B4?= =?UTF-8?q?=E3=81=86=E3=82=A4=E3=83=B3=E3=83=87=E3=83=83=E3=82=AF=E3=82=B9?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Config/Migration/1769652195_add_index.php | 63 +++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Config/Migration/1769652195_add_index.php diff --git a/Config/Migration/1769652195_add_index.php b/Config/Migration/1769652195_add_index.php new file mode 100644 index 0000000..a0fa47a --- /dev/null +++ b/Config/Migration/1769652195_add_index.php @@ -0,0 +1,63 @@ + array( + 'create_field' => array( + 'tags' => array( + 'indexes' => array( + 'idx1_p_tags' => array('column' => array('model', 'block_id'), 'unique' => 0), + ), + ), + 'tags_contents' => array( + 'indexes' => array( + 'idx1_p_tags_contents' => array('column' => array('tag_id'), 'unique' => 0), + ), + ), + ), + ), + 'down' => array( + 'drop_field' => array( + 'tags' => array('indexes' => array('idx1_p_tags')), + 'tags_contents' => array('indexes' => array('idx1_p_tags_contents')), + ), + ), + ); + +/** + * Before migration callback + * + * @param string $direction Direction of migration process (up or down) + * @return bool Should process continue + */ + public function before($direction) { + return true; + } + +/** + * After migration callback + * + * @param string $direction Direction of migration process (up or down) + * @return bool Should process continue + */ + public function after($direction) { + return true; + } +} From a8ecc20bd1055733c2fc2cf46f08bb7eaf28ba57 Mon Sep 17 00:00:00 2001 From: "TMX\\kazuno" Date: Mon, 16 Feb 2026 17:41:25 +0900 Subject: [PATCH 2/2] =?UTF-8?q?change:=20=E3=83=91=E3=83=95=E3=82=A9?= =?UTF-8?q?=E3=83=BC=E3=83=9E=E3=83=B3=E3=82=B9=E6=94=B9=E5=96=84=E3=81=AB?= =?UTF-8?q?=E4=BC=B4=E3=81=86=E3=82=A4=E3=83=B3=E3=83=87=E3=83=83=E3=82=AF?= =?UTF-8?q?=E3=82=B9=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Config/Schema/schema.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Config/Schema/schema.php b/Config/Schema/schema.php index 0818b20..12702b9 100644 --- a/Config/Schema/schema.php +++ b/Config/Schema/schema.php @@ -52,7 +52,8 @@ public function after($event = array()) { 'modified_user' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'comment' => '更新者'), 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null, 'comment' => '更新日時'), 'indexes' => array( - 'PRIMARY' => array('column' => 'id', 'unique' => 1) + 'PRIMARY' => array('column' => 'id', 'unique' => 1), + 'idx1_p_tags' => array('column' => array('model', 'block_id'), 'unique' => 0) ), 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB') ); @@ -71,7 +72,8 @@ public function after($event = array()) { 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null, 'comment' => '更新日時'), 'indexes' => array( 'PRIMARY' => array('column' => 'id', 'unique' => 1), - 'model' => array('column' => array('model', 'content_id'), 'unique' => 0) + 'model' => array('column' => array('model', 'content_id'), 'unique' => 0), + 'idx1_p_tags_contents' => array('column' => array('tag_id'), 'unique' => 0) ), 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB') );