Open
Description
Entities
/**
* @Cycle\Entity()
*/
class Post
{
/**
* @Cycle\Column(type="primary")
*/
public int $id;
/**
* @Cycle\Relation\Embedded(target="Seo")
*/
public Seo $seo;
/**
* @Cycle\Column(type="primary")
*/
public DateTimeImmutable $createdAt;
}
/**
* @Embeddable(columnPrefix="seo_")
*/
class Seo
{
/**
* @Cycle\Column(type="string", name="title", nullable=true)
*/
public ?string $title;
/**
* @Cycle\Column(type="string", name="description", nullable=true)
*/
public ?string $description;
/**
* @Cycle\Column(type="string", name="keywords", nullable=true)
*/
public ?string $keywords;
}
Generated migration
$this->table('posts')
->addColumn('id', 'primary', [
'nullable' => false,
'default' => null
])
->addColumn('created_at', 'primary', [
'nullable' => false,
'default' => null
])
->addColumn('seo_title', 'string', [
'nullable' => true,
'default' => null,
'size' => 255
])
->addColumn('seo_description', 'string', [
'nullable' => true,
'default' => null,
'size' => 255
])
->addColumn('seo_keywords', 'string', [
'nullable' => true,
'default' => null,
'size' => 255
])
->setPrimaryKeys(["id", "created_at"])
->create();
What i want is that created_at
should be generated after Seo
columns, i.e. in this case after seo_keywords
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Backlog