CREATE TABLE tx_nlonlinecatalog_domain_model_product (
	product_id varchar(255) NOT NULL DEFAULT '',
	article_no varchar(255) NOT NULL DEFAULT '',
	name varchar(255) NOT NULL DEFAULT '',
	color varchar(255) NOT NULL DEFAULT '',
	ean varchar(255) NOT NULL DEFAULT '',
	next_life_cycle_phase varchar(255) NOT NULL DEFAULT '',
	nex_lif_cyc_pha_dat varchar(255) NOT NULL DEFAULT '',
	cou_mar_ava_typ varchar(255) NOT NULL DEFAULT '',
	cou_mar_ava	 varchar(255) NOT NULL DEFAULT '',
	life_cycle_phase varchar(255) NOT NULL DEFAULT '',
	desto_egr varchar(255) NOT NULL DEFAULT '',
	desto_ehg varchar(255) NOT NULL DEFAULT '',
	customs_tariff_number varchar(255) NOT NULL DEFAULT '',
	long_description text NOT NULL DEFAULT '',
	division_units varchar(255) NOT NULL DEFAULT '',
	product_image_url varchar(255) NOT NULL DEFAULT '',
	product_thumbnail_url varchar(255) NOT NULL DEFAULT '',
	price varchar(255) NOT NULL DEFAULT '',
	price_unit varchar(255) NOT NULL DEFAULT '',
	price_group varchar(255) NOT NULL DEFAULT '',
	seo_priority varchar(255) NOT NULL DEFAULT '0.1',
	suitable_for int(11) unsigned NOT NULL DEFAULT '0',
	documents int(11) unsigned NOT NULL DEFAULT '0',
	archive smallint(1) unsigned NOT NULL DEFAULT '0',
	documents_synced int(11) unsigned NOT NULL DEFAULT '0',

    KEY product_id (product_id (127))
);

CREATE TABLE tx_nlonlinecatalog_domain_model_document (
	document_number varchar(255) NOT NULL DEFAULT '',
	language_code varchar(255) NOT NULL DEFAULT '',
	title varchar(255) NOT NULL DEFAULT '',
	file_name varchar(255) NOT NULL DEFAULT '',
	file_size varchar(255) NOT NULL DEFAULT '',
	file_extension varchar(255) NOT NULL DEFAULT '',
	file_url varchar(1024) NOT NULL DEFAULT '',
	published_date int(11) NOT NULL DEFAULT '0',
	document_type varchar(255) NOT NULL DEFAULT '',

    KEY document_number (document_number (127))
);

CREATE TABLE tx_nlonlinecatalog_domain_model_content (
    cid varchar(255) NOT NULL DEFAULT '',
    position varchar(255) NOT NULL DEFAULT '',
    text text NOT NULL DEFAULT '',
    link varchar(255) NOT NULL DEFAULT '',

    KEY cid (cid (127))
);

CREATE TABLE tx_nlonlinecatalog_product_document_mm (
    uid_local int(11) unsigned NOT NULL DEFAULT '0',
    uid_foreign int(11) unsigned NOT NULL DEFAULT '0',
    mm_type smallint(1) unsigned NOT NULL DEFAULT '0',

    PRIMARY KEY (uid_local, uid_foreign),
    KEY mm_type (mm_type)
);

CREATE TABLE tx_nlonlinecatalog_product_product_mm (
    uid_local int(11) unsigned NOT NULL DEFAULT '0',
    uid_foreign int(11) unsigned NOT NULL DEFAULT '0',

    PRIMARY KEY (uid_local, uid_foreign)
);

CREATE TABLE tx_nlonlinecatalog_document_category_mm (
    uid_local int(11) unsigned NOT NULL DEFAULT '0',
    category_id varchar(255) NOT NULL DEFAULT '',

    PRIMARY KEY (category_id, uid_local)
);
