CREATE TABLE tx_courses_domain_model_course (
	title varchar(255) NOT NULL DEFAULT '',
	course_id int(11) NOT NULL DEFAULT '0',
	short_title varchar(255) NOT NULL DEFAULT '',
	contents text,
	requirements text,
	language text,
	image_uri varchar(255) NOT NULL DEFAULT '',
	price varchar(255) NOT NULL DEFAULT '',
	course_type text,
	goals text,
	perspectives text,
	duration int(11) NOT NULL DEFAULT '0',
	agency_supported smallint(1) unsigned NOT NULL DEFAULT '0',
	ihk_certified smallint(1) unsigned NOT NULL DEFAULT '0',
	individual_appointments smallint(1) unsigned NOT NULL DEFAULT '0',
	target_group text,
	highlight smallint(1) unsigned NOT NULL DEFAULT '0',
	seo_title text,
	seo_description text,
	seo_image int(11) unsigned NOT NULL DEFAULT '0',
    path_segment varchar(255) NOT NULL DEFAULT '',
	subject int(11) unsigned NOT NULL DEFAULT '0',
	workshop int(11) unsigned NOT NULL DEFAULT '0',
	profession int(11) unsigned NOT NULL DEFAULT '0'
);

CREATE TABLE tx_courses_domain_model_subject (
	title varchar(255) NOT NULL DEFAULT '',
	subject_id int(11) NOT NULL DEFAULT '0',
	icon int(11) unsigned NOT NULL DEFAULT '0',
	image int(11) unsigned NOT NULL DEFAULT '0'
);

CREATE TABLE tx_courses_domain_model_workshop (
	course int(11) unsigned DEFAULT '0' NOT NULL,
	workshop_id int(11) NOT NULL DEFAULT '0',
	highlight smallint(1) unsigned NOT NULL DEFAULT '0',
	location text,
	zip varchar(255) NOT NULL DEFAULT '',
	street varchar(255) NOT NULL DEFAULT '',
	country varchar(255) NOT NULL DEFAULT '',
	location_description text,
	room text,
	start_time int(11) NOT NULL DEFAULT '0',
	end_time int(11) NOT NULL DEFAULT '0'
);

CREATE TABLE tx_courses_domain_model_profession (
	profession_id int(11) NOT NULL DEFAULT '0',
	title varchar(255) NOT NULL DEFAULT '',
	profession_year varchar(255) NOT NULL DEFAULT ''
);

CREATE TABLE tx_courses_course_subject_mm (
	uid_local int(11) unsigned DEFAULT '0' NOT NULL,
	uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
	sorting int(11) unsigned DEFAULT '0' NOT NULL,
	sorting_foreign int(11) unsigned DEFAULT '0' NOT NULL,

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

CREATE TABLE tx_courses_course_profession_mm (
	uid_local int(11) unsigned DEFAULT '0' NOT NULL,
	uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
	sorting int(11) unsigned DEFAULT '0' NOT NULL,
	sorting_foreign int(11) unsigned DEFAULT '0' NOT NULL,

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