<?xml version="1.0" encoding="UTF-8"?>
<database>

    <global>
        <table name="bricks">
            <field type="INT(3) NOT NULL AUTO_INCREMENT PRIMARY KEY">id</field>
            <field type="VARCHAR(255)">project</field>
            <field type="VARCHAR(2)">lang</field>
            <field type="VARCHAR(255) NOT NULL">title</field>
            <field type="TIMESTAMP NULL DEFAULT NULL">c_date</field>
            <field type="TIMESTAMP NULL DEFAULT NULL">e_date</field>
            <field type="VARCHAR(50) NULL">c_user</field>
            <field type="VARCHAR(50) NULL">e_user</field>
            <field type="TINYINT(1) NOT NULL DEFAULT 1">active</field>
            <field type="VARCHAR(255) NULL">frontendTitle</field>
            <field type="TEXT NOT NULL">description</field>
            <field type="TEXT NULL">settings</field>
            <field type="TEXT NULL">customfields</field>
            <field type="VARCHAR(255) NULL">type</field>
            <field type="TEXT NULL">content</field>
            <field type="TEXT NULL">areas</field>
            <field type="TEXT NULL">width</field>
            <field type="TEXT NULL">height</field>
            <field type="TEXT NULL">classes</field>

            <primary>id</primary>
            <index>project</index>
            <index>lang</index>
        </table>

        <table name="bricksUID">
            <field type="VARCHAR(80) NOT NULL PRIMARY KEY">uid</field>
            <field type="INT(3)">brickId</field>
            <field type="VARCHAR(255)">project</field>
            <field type="VARCHAR(2)">lang</field>
            <field type="BIGINT(20)">siteId</field>
            <field type="LONGTEXT NULL">customfields</field>
            <field type="LONGTEXT NULL">attributes</field>

            <primary>uid</primary>
        </table>
    </global>

    <projects>
        <table name="bricksCache" no-auto-update="1" no-site-reference="1">
            <field type="BIGINT(20) NOT NULL">id</field>
            <field type="VARCHAR(255) NOT NULL">area</field>
            <field type="INT NULL">brick</field>

            <index>id</index>
            <index>area</index>
        </table>
    </projects>

</database>
