<?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 Version20260128112000 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql(
'
CREATE TABLE cmr_protective_gloves_material (
id INT AUTO_INCREMENT NOT NULL COMMENT \'Internal ID\',
created INT NOT NULL COMMENT \'Entity creation date as UNIX timestamp\',
active SMALLINT DEFAULT 1 NOT NULL COMMENT \'Indicator if entity is active\',
last_active_date DATE DEFAULT NULL COMMENT \'Last active date\',
PRIMARY KEY(id)
) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB
'
);
$this->addSql(
'
CREATE TABLE cmr_protective_gloves_material_l10n (
parent_entity_id INT NOT NULL COMMENT \'Internal ID\',
language_id VARCHAR(2) NOT NULL COMMENT \'Language code in lower case (ISO 639-1)\',
name VARCHAR(225) DEFAULT NULL COMMENT \'Protective gloves material name in referenced language\',
INDEX IDX_24042444706E52B3 (parent_entity_id),
INDEX IDX_2404244482F1BAF4 (language_id),
PRIMARY KEY(parent_entity_id, language_id)
) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB
'
);
$this->addSql(
'
ALTER TABLE cmr_protective_gloves_material_l10n ADD CONSTRAINT FK_24042444706E52B3 FOREIGN KEY
(parent_entity_id) REFERENCES cmr_protective_gloves_material (id) ON DELETE CASCADE
'
);
$this->addSql(
'
ALTER TABLE cmr_protective_gloves_material_l10n ADD CONSTRAINT FK_2404244482F1BAF4 FOREIGN KEY
(language_id) REFERENCES language (id) ON DELETE CASCADE
'
);
// this up() migration is auto-generated, please modify it to your needs
$created = time();
$this->addSql(
'
INSERT INTO cmr_protective_gloves_material
(id, created, active)
VALUES
(1, :createdTimeStamp, 1),
(2, :createdTimeStamp, 1),
(3, :createdTimeStamp, 1),
(4, :createdTimeStamp, 1),
(5, :createdTimeStamp, 1),
(6, :createdTimeStamp, 1),
(7, :createdTimeStamp, 1),
(8, :createdTimeStamp, 1),
(9, :createdTimeStamp, 1),
(10, :createdTimeStamp, 1),
(11, :createdTimeStamp, 1),
(12, :createdTimeStamp, 1),
(13, :createdTimeStamp, 1),
(14, :createdTimeStamp, 1),
(15, :createdTimeStamp, 1),
(16, :createdTimeStamp, 1),
(17, :createdTimeStamp, 1),
(18, :createdTimeStamp, 1),
(19, :createdTimeStamp, 1),
(20, :createdTimeStamp, 1),
(21, :createdTimeStamp, 1),
(22, :createdTimeStamp, 1)
;
',
['createdTimeStamp' => $created]
);
$this->addSql(
'
INSERT INTO cmr_protective_gloves_material_l10n
(language_id, parent_entity_id, name)
VALUES
(\'de\', 1, \'NR (0,5 mm) – Naturlatex\'),
(\'de\', 2, \'CR (0,5 mm) – Polychloroprenlatex, Polychloropren, Chloroprene-Kautschuk, Neopren\'),
(\'de\', 3, \'NBR (0,35 mm) – Nitrillatex, Nitrilkautschuk, Acrylnitril-Butadien-Kautschuk, Nitril\'),
(\'de\', 4, \'Butyl (0,5 mm) – Butylkautschuk, IIR, IBR, Isobutyl-Isopren-Kautschuk\'),
(\'de\', 5, \'FKM (0,4 mm) – Fluorkautschuk, Viton\'),
(\'de\', 6, \'PVC (0,5 mm) – Polyvinylchlorid\'),
(\'de\', 7, \'PE (0,03 mm) – Polyethylen (Einweghandschuhe)\'),
(\'de\', 8, \'LLDPE – Low Level Density Polyethylen\'),
(\'de\', 9, \'Mehrschichtenhandschuh – PE/EVAL/PE\'),
(\'de\', 10, \'PE = Polyethylen\'),
(\'de\', 11, \'EVAL = Ethylen-Vinylalkohol-Copolymer\'),
(\'de\', 12, \'PVA (0,2 mm) – Polyvinylalkohol (nur bei trockenen Anwendungen)\'),
(\'de\', 13, \'Latex/Nitril-Mix (0,4 mm) – Kombinationsmaterial für bessere Chemikalienbeständigkeit\'),
(\'de\', 14, \'Neopren/Nitril-Mix (0,5 mm) – Hohe Beständigkeit gegen Lösungsmittel\'),
(\'de\', 15, \'Laminat-Handschuhe (Mehrschichtfolie) – z.B. für hochtoxische Stoffe\'),
(\'de\', 16, \'PU (0,2 mm) – Polyurethan\'),
(\'de\', 17, \'Silikonbeschichtete Handschuhe – Für spezielle Anwendungen\'),
(\'de\', 18, \'Textilbeschichtete Chemikalienschutzhandschuhe – z.B. mit PVC oder Nitril\'),
(\'de\', 19, \'Viton/Butyl-Mix (0,7 mm) – Für aggressive Chemikalien\'),
(\'de\', 20, \'Barrier-Handschuhe (z.B. 4H®) – Hochdichte Polymerfolien\'),
(\'de\', 21, \'Einweg-Nitrilhandschuhe (0,1–0,2 mm) – Für kurzfristige Anwendungen\'),
(\'de\', 22, \'Keine Handschuhe erforderlich / Nicht zutreffend\'),
(\'en\', 1, null),
(\'en\', 2, null),
(\'en\', 3, null),
(\'en\', 4, null),
(\'en\', 5, null),
(\'en\', 6, null),
(\'en\', 7, null),
(\'en\', 8, null),
(\'en\', 9, null),
(\'en\', 10, null),
(\'en\', 11, null),
(\'en\', 12, null),
(\'en\', 13, null),
(\'en\', 14, null),
(\'en\', 15, null),
(\'en\', 16, null),
(\'en\', 17, null),
(\'en\', 18, null),
(\'en\', 19, null),
(\'en\', 20, null),
(\'en\', 21, null),
(\'en\', 22, null)
;
'
);
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE cmr_protective_gloves_material_l10n DROP FOREIGN KEY FK_24042444706E52B3');
$this->addSql('ALTER TABLE cmr_protective_gloves_material_l10n DROP FOREIGN KEY FK_2404244482F1BAF4');
$this->addSql('DROP TABLE cmr_protective_gloves_material');
$this->addSql('DROP TABLE cmr_protective_gloves_material_l10n');
}
}