<?xml version="1.0" encoding="utf-8"?>
<table>
	<name>entity</name>
	<collation>utf8_general_ci</collation>
	<description></description>
	<columns>
		<column name="id">
			<type>int</type>
			<length>11</length>
			<signed>UNSIGNED</signed>
			<null>NOT NULL</null>
			<extra>auto_increment</extra>
			<description></description>
		</column>
		<column name="primary_contact_id">
            <type>int</type>
            <length>11</length>
            <signed>UNSIGNED</signed>
            <null>NOT NULL</null>
            <default>0</default>
            <description></description>
        </column>
        <column name="add_name_to_invoice">
            <type>tinyint</type>
            <length>4</length>
            <null>NOT NULL</null>
            <default>0</default>
            <description></description>
        </column>
        <column name="is_client">
            <type>tinyint</type>
            <length>4</length>
            <null>NOT NULL</null>
            <default>0</default>
            <description></description>
        </column>
        <column name="is_supplier">
            <type>tinyint</type>
            <length>4</length>
            <null>NOT NULL</null>
            <default>0</default>
            <description></description>
        </column>
		<column name="reference">
			<type>varchar</type>
			<length>50</length>
			<null>NOT NULL</null>
			<default></default>
			<allow_html>false</allow_html>
			<encode_html>false</encode_html>
			<description></description>
		</column>
		<column name="company_name">
			<type>varchar</type>
			<length>100</length>
			<null>NOT NULL</null>
			<default></default>
			<allow_html>false</allow_html>
			<encode_html>false</encode_html>
			<description></description>
		</column>
		<column name="address_1">
            <type>varchar</type>
            <length>100</length>
            <null>NOT NULL</null>
            <default></default>
            <allow_html>false</allow_html>
            <encode_html>false</encode_html>
            <description></description>
        </column>
        <column name="address_2">
            <type>varchar</type>
            <length>100</length>
            <null>NOT NULL</null>
            <default></default>
            <allow_html>false</allow_html>
            <encode_html>false</encode_html>
            <description></description>
        </column>
        <column name="address_3">
            <type>varchar</type>
            <length>100</length>
            <null>NOT NULL</null>
            <default></default>
            <allow_html>false</allow_html>
            <encode_html>false</encode_html>
            <description></description>
        </column>
        <column name="town">
            <type>varchar</type>
            <length>50</length>
            <null>NOT NULL</null>
            <default></default>
            <allow_html>false</allow_html>
            <encode_html>false</encode_html>
            <description></description>
        </column>
        <column name="state">
            <type>varchar</type>
            <length>50</length>
            <null>NOT NULL</null>
            <default></default>
            <allow_html>false</allow_html>
            <encode_html>false</encode_html>
            <description></description>
        </column>
        <column name="country">
            <type>char</type>
            <length>2</length>
            <null>NOT NULL</null>
            <default></default>
            <allow_html>false</allow_html>
            <encode_html>false</encode_html>
            <description></description>
        </column>
        <column name="postcode">
            <type>varchar</type>
            <length>20</length>
            <null>NOT NULL</null>
            <default></default>
            <allow_html>false</allow_html>
            <encode_html>false</encode_html>
            <description></description>
        </column>
        <column name="shipping_address_id">
            <type>int</type>
            <length>11</length>
            <null>NOT NULL</null>
            <default>0</default>
            <description></description>
        </column>
        <column name="default_language">
            <type>varchar</type>
            <length>10</length>
            <null>NOT NULL</null>
            <default></default>
            <allow_html>false</allow_html>
            <encode_html>false</encode_html>
            <description></description>
        </column>
        <column name="website_url">
			<type>varchar</type>
			<length>255</length>
			<null>NOT NULL</null>
			<default></default>
			<allow_html>false</allow_html>
			<encode_html>false</encode_html>
			<description></description>
		</column>
        <column name="default_currency">
			<type>char</type>
			<length>3</length>
			<null>NOT NULL</null>
			<default></default>
			<allow_html>false</allow_html>
			<encode_html>false</encode_html>
			<description></description>
		</column>
		<column name="tax_zone">
			<type>varchar</type>
			<length>5</length>
			<null>NOT NULL</null>
			<default></default>
			<allow_html>false</allow_html>
			<encode_html>false</encode_html>
			<description></description>
		</column>
		<column name="tax_exemption_code">
			<type>varchar</type>
			<length>50</length>
			<null>NOT NULL</null>
			<default></default>
			<allow_html>false</allow_html>
			<encode_html>false</encode_html>
			<description></description>
		</column>
		<column name="notes">
            <type>text</type>
            <length></length>
            <null>NULL</null>
            <default></default>
            <allow_html>false</allow_html>
            <encode_html>false</encode_html>
            <description></description>
        </column>
        <column name="custom_fields">
            <type>text</type>
            <length></length>
            <null>NULL</null>
            <default></default>
            <allow_html>true</allow_html>
            <encode_html>false</encode_html>
            <description></description>
        </column>
        <column name="last_updated">
            <type>int</type>
            <length>11</length>
            <signed>UNSIGNED</signed>
            <null>NOT NULL</null>
            <default>0</default>
            <description></description>
        </column>
	</columns>
	<primary>
		<columns>
			<column>
				<name>id</name>
			</column>
		</columns>
	</primary>
	<index>
	    <type>multiple</type>
	    <columns>
		    <column>
			    <name>country</name>
		    </column>
		    <column>
			    <name>tax_zone</name>
		    </column>
	    </columns>
	    <description></description>
	</index>
    <index>
        <type>multiple</type>
        <columns>
            <column>
                <name>primary_contact_id</name>
            </column>
        </columns>
        <description></description>
    </index>
</table>