Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions src/Migrations/Version20250818200725.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

/*
* This file is part of Monsieur Biz' Blog plugin for Sylius.
*
* (c) Monsieur Biz <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace MonsieurBiz\SyliusBlogPlugin\Migrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20250818200725 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('ALTER TABLE monsieurbiz_blog_article CHANGE thumbnailImage thumbnail_image VARCHAR(255) DEFAULT NULL, CHANGE publishedAt published_at DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE monsieurbiz_blog_article_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');
}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE monsieurbiz_blog_article CHANGE published_at publishedAt DATETIME DEFAULT NULL, CHANGE thumbnail_image thumbnailImage VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE monsieurbiz_blog_article_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');
}
}
4 changes: 2 additions & 2 deletions src/Resources/config/doctrine/Article.orm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@

<field name="video" nullable="true" />

<field name="thumbnailImage" nullable="true" />
<field name="thumbnailImage" column="thumbnail_image" nullable="true" />

<field name="type" />

<field name="state" />

<field name="publishedAt" type="datetime" nullable="true" />
<field name="publishedAt" column="published_at" type="datetime" nullable="true" />

<field name="createdAt" column="created_at" type="datetime_immutable">
<gedmo:timestampable on="create"/>
Expand Down
8 changes: 4 additions & 4 deletions src/Resources/config/doctrine/ArticleTranslation.orm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<field name="description" type="text" />
<field name="content" type="text"/>

<field name="metaTitle" nullable="true"/>
<field name="metaDescription" type="text" nullable="true"/>
<field name="metaKeywords" nullable="true"/>
<field name="metaImage" nullable="true" />
<field name="metaTitle" column="meta_title" nullable="true"/>
<field name="metaDescription" column="meta_description" type="text" nullable="true"/>
<field name="metaKeywords" column="meta_keywords" nullable="true"/>
<field name="metaImage" column="meta_image" nullable="true" />

<field name="createdAt" column="created_at" type="datetime_immutable">
<gedmo:timestampable on="create"/>
Expand Down
Loading