<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
    <table name="catalog_eav_attribute" resource="default" engine="innodb" comment="Catalog EAV Attribute Table">
        <column xsi:type="boolean" name="is_pagebuilder_enabled" nullable="false" default="false"
                comment="Is PageBuilder Enabled"/>
    </table>
    <table name="pagebuilder_template" resource="default" comment="Page Builder Templates">
        <column xsi:type="int" name="template_id" identity="true" comment="Template ID Auto Increment" />
        <column xsi:type="varchar" name="name" length="1024" nullable="false" comment="Template Name" />
        <column xsi:type="varchar" name="preview_image" nullable="true" length="1024" comment="Template Preview Image"/>
        <column xsi:type="longtext" name="template" nullable="false" comment="Master Format HTML"/>
        <column xsi:type="varchar" name="created_for" length="255" nullable="true" comment="Created For" />
        <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
                comment="Creation Time"/>
        <column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP"
                comment="Update Time"/>
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="template_id" />
        </constraint>
        <index referenceId="TEMPLATE_NAME_FULLTEXT" indexType="fulltext">
            <column name="name"/>
        </index>
    </table>
</schema>
