Skip to content

Commit 13c0f0e

Browse files
authored
Merge pull request #50 from maximehuran/feature/column-names
2 parents 72570ce + 3001715 commit 13c0f0e

File tree

2 files changed

+44
-4
lines changed

2 files changed

+44
-4
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
/*
4+
* This file is part of Monsieur Biz' Homepage plugin for Sylius.
5+
*
6+
* (c) Monsieur Biz <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE.txt
9+
* file that was distributed with this source code.
10+
*/
11+
12+
declare(strict_types=1);
13+
14+
namespace MonsieurBiz\SyliusHomepagePlugin\Migrations;
15+
16+
use Doctrine\DBAL\Schema\Schema;
17+
use Doctrine\Migrations\AbstractMigration;
18+
19+
/**
20+
* Auto-generated Migration: Please modify to your needs!
21+
*/
22+
final class Version20250818193511 extends AbstractMigration
23+
{
24+
public function getDescription(): string
25+
{
26+
return '';
27+
}
28+
29+
public function up(Schema $schema): void
30+
{
31+
// this up() migration is auto-generated, please modify it to your needs
32+
$this->addSql('ALTER TABLE monsieurbiz_homepage_homepage_translation CHANGE metaTitle meta_title VARCHAR(255) DEFAULT NULL, CHANGE metaKeywords meta_keywords VARCHAR(255) DEFAULT NULL, CHANGE metaImage meta_image VARCHAR(255) DEFAULT NULL, CHANGE metaDescription meta_description LONGTEXT DEFAULT NULL');
33+
}
34+
35+
public function down(Schema $schema): void
36+
{
37+
// this down() migration is auto-generated, please modify it to your needs
38+
$this->addSql('ALTER TABLE monsieurbiz_homepage_homepage_translation CHANGE meta_title metaTitle VARCHAR(255) DEFAULT NULL, CHANGE meta_keywords metaKeywords VARCHAR(255) DEFAULT NULL, CHANGE meta_image metaImage VARCHAR(255) DEFAULT NULL, CHANGE meta_description metaDescription LONGTEXT DEFAULT NULL');
39+
}
40+
}

src/Resources/config/doctrine/HomepageTranslation.orm.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212

1313
<field name="name" length="255" nullable="true" />
1414
<field name="content" type="text" nullable="true" />
15-
<field name="metaTitle" length="255" nullable="true" />
16-
<field name="metaKeywords" length="255" nullable="true" />
17-
<field name="metaImage" nullable="true" />
18-
<field name="metaDescription" type="text" nullable="true" />
15+
<field name="metaTitle" column="meta_title" length="255" nullable="true" />
16+
<field name="metaKeywords" column="meta_keywords" length="255" nullable="true" />
17+
<field name="metaImage" column="meta_image" nullable="true" />
18+
<field name="metaDescription" column="meta_description" type="text" nullable="true" />
1919
<field name="locale" length="10" nullable="true" />
2020
</mapped-superclass>
2121
</doctrine-mapping>

0 commit comments

Comments
 (0)