-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Limited short labels to 190 unicode characters maximum to simplify in…
…dexation.
- Loading branch information
Daniel Berthereau
authored and
Daniel Berthereau
committed
Feb 19, 2024
1 parent
d6ad71b
commit 3dcde0a
Showing
8 changed files
with
46 additions
and
12 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
34 changes: 34 additions & 0 deletions
34
application/data/migrations/20240219000002_LimitLabelsTo190Characters.php
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 Omeka\Db\Migrations; | ||
|
||
use Doctrine\DBAL\Connection; | ||
use Omeka\Db\Migration\MigrationInterface; | ||
|
||
class LimitLabelsTo190Characters implements MigrationInterface | ||
{ | ||
public function up(Connection $conn) | ||
{ | ||
$sql = <<<'SQL' | ||
ALTER TABLE `api_key` | ||
CHANGE `label` `label` varchar(190) COLLATE 'utf8mb4_unicode_ci' NOT NULL AFTER `owner_id`; | ||
ALTER TABLE `asset` | ||
CHANGE `name` `name` varchar(190) COLLATE 'utf8mb4_unicode_ci' NOT NULL AFTER `owner_id`; | ||
ALTER TABLE `property` | ||
CHANGE `label` `label` varchar(190) COLLATE 'utf8mb4_unicode_ci' NOT NULL AFTER `local_name`; | ||
ALTER TABLE `resource_class` | ||
CHANGE `label` `label` varchar(190) COLLATE 'utf8mb4_unicode_ci' NOT NULL AFTER `local_name`; | ||
ALTER TABLE `resource_template_property` | ||
CHANGE `alternate_label` `alternate_label` varchar(190) COLLATE 'utf8mb4_unicode_ci' NULL AFTER `property_id`; | ||
ALTER TABLE `vocabulary` | ||
CHANGE `label` `label` varchar(190) COLLATE 'utf8mb4_unicode_ci' NOT NULL AFTER `prefix`; | ||
|
||
SQL; | ||
$conn->executeStatement($sql); | ||
} | ||
} |
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
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
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
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
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
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