From 57215589bffd87926d4c341f7d3cfbdcfbeec817 Mon Sep 17 00:00:00 2001 From: "thibaut.chieux" Date: Wed, 23 Feb 2022 11:04:20 +0100 Subject: [PATCH] Switch to xml mapping for doctrine --- src/Resources/config/doctrine/Block.orm.xml | 62 +++++++++++++++ src/Resources/config/doctrine/Block.orm.yml | 70 ----------------- .../config/doctrine/BlockTranslation.orm.xml | 19 +++++ .../config/doctrine/BlockTranslation.orm.yml | 22 ------ .../doctrine/FrequentlyAskedQuestion.orm.xml | 31 ++++++++ .../doctrine/FrequentlyAskedQuestion.orm.yml | 35 --------- ...FrequentlyAskedQuestionTranslation.orm.xml | 18 +++++ ...FrequentlyAskedQuestionTranslation.orm.yml | 18 ----- src/Resources/config/doctrine/Media.orm.xml | 61 +++++++++++++++ src/Resources/config/doctrine/Media.orm.yml | 78 ------------------- .../config/doctrine/MediaTranslation.orm.xml | 22 ++++++ .../config/doctrine/MediaTranslation.orm.yml | 26 ------- src/Resources/config/doctrine/Page.orm.xml | 62 +++++++++++++++ src/Resources/config/doctrine/Page.orm.yml | 74 ------------------ .../config/doctrine/PageTranslation.orm.xml | 38 +++++++++ .../config/doctrine/PageTranslation.orm.yml | 53 ------------- src/Resources/config/doctrine/Section.orm.xml | 17 ++++ src/Resources/config/doctrine/Section.orm.yml | 15 ---- .../doctrine/SectionTranslation.orm.xml | 16 ++++ .../doctrine/SectionTranslation.orm.yml | 14 ---- 20 files changed, 346 insertions(+), 405 deletions(-) create mode 100644 src/Resources/config/doctrine/Block.orm.xml delete mode 100755 src/Resources/config/doctrine/Block.orm.yml create mode 100644 src/Resources/config/doctrine/BlockTranslation.orm.xml delete mode 100755 src/Resources/config/doctrine/BlockTranslation.orm.yml create mode 100644 src/Resources/config/doctrine/FrequentlyAskedQuestion.orm.xml delete mode 100755 src/Resources/config/doctrine/FrequentlyAskedQuestion.orm.yml create mode 100644 src/Resources/config/doctrine/FrequentlyAskedQuestionTranslation.orm.xml delete mode 100755 src/Resources/config/doctrine/FrequentlyAskedQuestionTranslation.orm.yml create mode 100644 src/Resources/config/doctrine/Media.orm.xml delete mode 100644 src/Resources/config/doctrine/Media.orm.yml create mode 100644 src/Resources/config/doctrine/MediaTranslation.orm.xml delete mode 100755 src/Resources/config/doctrine/MediaTranslation.orm.yml create mode 100644 src/Resources/config/doctrine/Page.orm.xml delete mode 100755 src/Resources/config/doctrine/Page.orm.yml create mode 100644 src/Resources/config/doctrine/PageTranslation.orm.xml delete mode 100755 src/Resources/config/doctrine/PageTranslation.orm.yml create mode 100644 src/Resources/config/doctrine/Section.orm.xml delete mode 100755 src/Resources/config/doctrine/Section.orm.yml create mode 100644 src/Resources/config/doctrine/SectionTranslation.orm.xml delete mode 100755 src/Resources/config/doctrine/SectionTranslation.orm.yml diff --git a/src/Resources/config/doctrine/Block.orm.xml b/src/Resources/config/doctrine/Block.orm.xml new file mode 100644 index 000000000..9cebf77ef --- /dev/null +++ b/src/Resources/config/doctrine/Block.orm.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Resources/config/doctrine/Block.orm.yml b/src/Resources/config/doctrine/Block.orm.yml deleted file mode 100755 index aa2af92f9..000000000 --- a/src/Resources/config/doctrine/Block.orm.yml +++ /dev/null @@ -1,70 +0,0 @@ -BitBag\SyliusCmsPlugin\Entity\Block: - type: mappedSuperclass - table: bitbag_cms_block - id: - id: - type: integer - id: true - generator: - strategy: AUTO - fields: - code: - column: code - type: string - length: 64 - unique: true - enabled: - column: enabled - type: boolean - manyToMany: - sections: - targetEntity: BitBag\SyliusCmsPlugin\Entity\SectionInterface - joinTable: - name: bitbag_cms_block_sections - joinColumns: - block_id: - referencedColumnName: id - onDelete: CASCADE - inverseJoinColumns: - section_id: - referencedColumnName: id - onDelete: CASCADE - products: - targetEntity: Sylius\Component\Product\Model\ProductInterface - joinTable: - name: bitbag_cms_block_products - joinColumns: - block_id: - referencedColumnName: id - onDelete: CASCADE - inverseJoinColumns: - product_id: - referencedColumnName: id - onDelete: CASCADE - - - taxonomies: - targetEntity: Sylius\Component\Taxonomy\Model\TaxonInterface - joinTable: - name: bitbag_cms_block_taxonomies - joinColumns: - block_id: - referencedColumnName: id - onDelete: CASCADE - inverseJoinColumns: - taxon_id: - referencedColumnName: id - onDelete: CASCADE - - channels: - targetEntity: Sylius\Component\Channel\Model\ChannelInterface - joinTable: - name: bitbag_cms_block_channels - joinColumns: - block_id: - referencedColumnName: id - onDelete: CASCADE - inverseJoinColumns: - channel_id: - referencedColumnName: id - onDelete: CASCADE diff --git a/src/Resources/config/doctrine/BlockTranslation.orm.xml b/src/Resources/config/doctrine/BlockTranslation.orm.xml new file mode 100644 index 000000000..b3ebfa897 --- /dev/null +++ b/src/Resources/config/doctrine/BlockTranslation.orm.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Resources/config/doctrine/BlockTranslation.orm.yml b/src/Resources/config/doctrine/BlockTranslation.orm.yml deleted file mode 100755 index f42f6d7a6..000000000 --- a/src/Resources/config/doctrine/BlockTranslation.orm.yml +++ /dev/null @@ -1,22 +0,0 @@ -BitBag\SyliusCmsPlugin\Entity\BlockTranslation: - type: mappedSuperclass - table: bitbag_cms_block_translation - id: - id: - type: integer - id: true - generator: - strategy: AUTO - fields: - name: - column: name - type: string - nullable: true - content: - column: content - type: text - nullable: true - link: - column: link - type: text - nullable: true diff --git a/src/Resources/config/doctrine/FrequentlyAskedQuestion.orm.xml b/src/Resources/config/doctrine/FrequentlyAskedQuestion.orm.xml new file mode 100644 index 000000000..77bdfb725 --- /dev/null +++ b/src/Resources/config/doctrine/FrequentlyAskedQuestion.orm.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Resources/config/doctrine/FrequentlyAskedQuestion.orm.yml b/src/Resources/config/doctrine/FrequentlyAskedQuestion.orm.yml deleted file mode 100755 index 2855432fd..000000000 --- a/src/Resources/config/doctrine/FrequentlyAskedQuestion.orm.yml +++ /dev/null @@ -1,35 +0,0 @@ -BitBag\SyliusCmsPlugin\Entity\FrequentlyAskedQuestion: - type: mappedSuperclass - table: bitbag_cms_faq - id: - id: - type: integer - id: true - generator: - strategy: AUTO - fields: - code: - column: code - type: string - nullable: false - position: - column: position - type: integer - nullable: false - enabled: - column: enabled - type: boolean - nullable: false - manyToMany: - channels: - targetEntity: Sylius\Component\Channel\Model\ChannelInterface - joinTable: - name: bitbag_cms_faq_channels - joinColumns: - faq_id: - referencedColumnName: id - onDelete: CASCADE - inverseJoinColumns: - channel_id: - referencedColumnName: id - onDelete: CASCADE diff --git a/src/Resources/config/doctrine/FrequentlyAskedQuestionTranslation.orm.xml b/src/Resources/config/doctrine/FrequentlyAskedQuestionTranslation.orm.xml new file mode 100644 index 000000000..6502ef579 --- /dev/null +++ b/src/Resources/config/doctrine/FrequentlyAskedQuestionTranslation.orm.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Resources/config/doctrine/FrequentlyAskedQuestionTranslation.orm.yml b/src/Resources/config/doctrine/FrequentlyAskedQuestionTranslation.orm.yml deleted file mode 100755 index 19efffae6..000000000 --- a/src/Resources/config/doctrine/FrequentlyAskedQuestionTranslation.orm.yml +++ /dev/null @@ -1,18 +0,0 @@ -BitBag\SyliusCmsPlugin\Entity\FrequentlyAskedQuestionTranslation: - type: mappedSuperclass - table: bitbag_cms_faq_translation - id: - id: - type: integer - id: true - generator: - strategy: AUTO - fields: - question: - column: question - type: text - nullable: false - answer: - column: answer - type: text - nullable: false diff --git a/src/Resources/config/doctrine/Media.orm.xml b/src/Resources/config/doctrine/Media.orm.xml new file mode 100644 index 000000000..562b1a164 --- /dev/null +++ b/src/Resources/config/doctrine/Media.orm.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Resources/config/doctrine/Media.orm.yml b/src/Resources/config/doctrine/Media.orm.yml deleted file mode 100644 index ce5c45541..000000000 --- a/src/Resources/config/doctrine/Media.orm.yml +++ /dev/null @@ -1,78 +0,0 @@ -BitBag\SyliusCmsPlugin\Entity\Media: - type: mappedSuperclass - table: bitbag_cms_media - id: - id: - type: integer - id: true - generator: - strategy: AUTO - fields: - code: - column: code - type: string - length: 250 - unique: true - type: - column: type - type: string - length: 250 - path: - column: path - type: string - length: 250 - unique: true - mimeType: - column: mime_type - type: string - length: 250 - nullable: true - enabled: - column: enabled - type: boolean - width: - column: width - type: integer - nullable: true - height: - column: height - type: integer - nullable: true - - manyToMany: - sections: - targetEntity: BitBag\SyliusCmsPlugin\Entity\SectionInterface - joinTable: - name: bitbag_cms_media_sections - joinColumns: - media_id: - referencedColumnName: id - onDelete: CASCADE - inverseJoinColumns: - section_id: - referencedColumnName: id - onDelete: CASCADE - products: - targetEntity: Sylius\Component\Product\Model\ProductInterface - joinTable: - name: bitbag_cms_media_products - joinColumns: - media_id: - referencedColumnName: id - onDelete: CASCADE - inverseJoinColumns: - product_id: - referencedColumnName: id - onDelete: CASCADE - channels: - targetEntity: Sylius\Component\Channel\Model\ChannelInterface - joinTable: - name: bitbag_cms_media_channels - joinColumns: - block_id: - referencedColumnName: id - onDelete: CASCADE - inverseJoinColumns: - channel_id: - referencedColumnName: id - onDelete: CASCADE diff --git a/src/Resources/config/doctrine/MediaTranslation.orm.xml b/src/Resources/config/doctrine/MediaTranslation.orm.xml new file mode 100644 index 000000000..8c6b48578 --- /dev/null +++ b/src/Resources/config/doctrine/MediaTranslation.orm.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/Resources/config/doctrine/MediaTranslation.orm.yml b/src/Resources/config/doctrine/MediaTranslation.orm.yml deleted file mode 100755 index 369898cb6..000000000 --- a/src/Resources/config/doctrine/MediaTranslation.orm.yml +++ /dev/null @@ -1,26 +0,0 @@ -BitBag\SyliusCmsPlugin\Entity\MediaTranslation: - type: mappedSuperclass - table: bitbag_cms_media_translation - id: - id: - type: integer - id: true - generator: - strategy: AUTO - fields: - name: - column: name - type: string - nullable: true - content: - column: content - type: text - nullable: true - alt: - column: alt - type: text - nullable: true - link: - column: link - type: text - nullable: true \ No newline at end of file diff --git a/src/Resources/config/doctrine/Page.orm.xml b/src/Resources/config/doctrine/Page.orm.xml new file mode 100644 index 000000000..44e28cb8c --- /dev/null +++ b/src/Resources/config/doctrine/Page.orm.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Resources/config/doctrine/Page.orm.yml b/src/Resources/config/doctrine/Page.orm.yml deleted file mode 100755 index dee11b1d0..000000000 --- a/src/Resources/config/doctrine/Page.orm.yml +++ /dev/null @@ -1,74 +0,0 @@ -BitBag\SyliusCmsPlugin\Entity\Page: - type: mappedSuperclass - table: bitbag_cms_page - id: - id: - type: integer - id: true - generator: - strategy: AUTO - fields: - code: - column: code - type: string - length: 250 - unique: true - enabled: - column: enabled - type: boolean - createdAt: - column: created_at - type: datetime - nullable: true - gedmo: - timestampable: - on: create - updatedAt: - column: updated_at - type: datetime - nullable: true - gedmo: - timestampable: - on: update - publishAt: - column: publish_at - type: datetime_immutable - nullable: true - - manyToMany: - products: - targetEntity: Sylius\Component\Product\Model\ProductInterface - joinTable: - name: bitbag_cms_page_products - joinColumns: - page_id: - referencedColumnName: id - onDelete: CASCADE - inverseJoinColumns: - product_id: - referencedColumnName: id - onDelete: CASCADE - sections: - targetEntity: BitBag\SyliusCmsPlugin\Entity\SectionInterface - joinTable: - name: bitbag_cms_page_sections - joinColumns: - block_id: - referencedColumnName: id - onDelete: CASCADE - inverseJoinColumns: - section_id: - referencedColumnName: id - onDelete: CASCADE - channels: - targetEntity: Sylius\Component\Channel\Model\ChannelInterface - joinTable: - name: bitbag_cms_page_channels - joinColumns: - page_id: - referencedColumnName: id - onDelete: CASCADE - inverseJoinColumns: - channel_id: - referencedColumnName: id - onDelete: CASCADE diff --git a/src/Resources/config/doctrine/PageTranslation.orm.xml b/src/Resources/config/doctrine/PageTranslation.orm.xml new file mode 100644 index 000000000..aae0fe5a7 --- /dev/null +++ b/src/Resources/config/doctrine/PageTranslation.orm.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Resources/config/doctrine/PageTranslation.orm.yml b/src/Resources/config/doctrine/PageTranslation.orm.yml deleted file mode 100755 index 05f6e3475..000000000 --- a/src/Resources/config/doctrine/PageTranslation.orm.yml +++ /dev/null @@ -1,53 +0,0 @@ -BitBag\SyliusCmsPlugin\Entity\PageTranslation: - type: mappedSuperclass - table: bitbag_cms_page_translation - id: - id: - type: integer - id: true - generator: - strategy: AUTO - fields: - slug: - column: slug - type: string - nullable: true - name: - column: name - type: string - nullable: true - breadcrumb: - column: breadcrumb - type: string - nullable: true - nameWhenLinked: - column: name_when_linked - type: string - nullable: true - descriptionWhenLinked: - column: description_when_linked - type: string - nullable: true - length: 1000 - metaKeywords: - column: meta_keywords - type: string - nullable: true - length: 1000 - metaDescription: - column: meta_description - type: string - nullable: true - length: 5000 - content: - column: content - type: text - nullable: true - title: - column: title - type: string - nullable: true - manyToOne: - image: - targetEntity: BitBag\SyliusCmsPlugin\Entity\MediaInterface - cascade: [PERSIST] diff --git a/src/Resources/config/doctrine/Section.orm.xml b/src/Resources/config/doctrine/Section.orm.xml new file mode 100644 index 000000000..29f59fff5 --- /dev/null +++ b/src/Resources/config/doctrine/Section.orm.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + diff --git a/src/Resources/config/doctrine/Section.orm.yml b/src/Resources/config/doctrine/Section.orm.yml deleted file mode 100755 index 18eecc36f..000000000 --- a/src/Resources/config/doctrine/Section.orm.yml +++ /dev/null @@ -1,15 +0,0 @@ -BitBag\SyliusCmsPlugin\Entity\Section: - type: mappedSuperclass - table: bitbag_cms_section - id: - id: - type: integer - id: true - generator: - strategy: AUTO - fields: - code: - column: code - type: string - length: 250 - unique: true diff --git a/src/Resources/config/doctrine/SectionTranslation.orm.xml b/src/Resources/config/doctrine/SectionTranslation.orm.xml new file mode 100644 index 000000000..0dd78094a --- /dev/null +++ b/src/Resources/config/doctrine/SectionTranslation.orm.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + diff --git a/src/Resources/config/doctrine/SectionTranslation.orm.yml b/src/Resources/config/doctrine/SectionTranslation.orm.yml deleted file mode 100755 index 49da01591..000000000 --- a/src/Resources/config/doctrine/SectionTranslation.orm.yml +++ /dev/null @@ -1,14 +0,0 @@ -BitBag\SyliusCmsPlugin\Entity\SectionTranslation: - type: mappedSuperclass - table: bitbag_cms_section_translation - id: - id: - type: integer - id: true - generator: - strategy: AUTO - fields: - name: - column: name - type: string - nullable: true