drop table if exists member_extended_properties cascade;

create table member_extended_properties(
	member_id integer not null references members( member_id ),
	language_id integer references languages( language_id ),
	extended_property_id integer references extended_properties( extended_property_id ),
	value text
);

comment on table member_extended_properties is 'storage of member extended properties';
comment on column member_extended_properties.member_id is 'reference id to members table';
comment on column member_extended_properties.member_id is 'reference id to language table (optional if null, then it is not multilingual)';
comment on column member_extended_properties.extended_property_id is 'reference id to extended_properties table';
comment on column member_extended_properties.value is 'value of the property';
