drop table if exists newsletter_newsletter_users cascade;
create table newsletter_newsletter_users(
	newsletter_newsletter_id integer not null references newsletter_newsletters( newsletter_newsletter_id ),
	newsletter_user_id integer not null references newsletter_users( newsletter_user_id ),
	nnu_senttstamp timestamp without time zone
);

comment on table newsletter_newsletter_users is 'storage of newsletters <-> users';
comment on column newsletter_newsletter_users.newsletter_newsletter_id is 'reference id to newsletter_newsletters table';
comment on column newsletter_newsletter_users.newsletter_user_id is 'reference id to newsletter_users table';

create unique index newsletter_newsletter_users_nu_ind on newsletter_newsletter_users( newsletter_newsletter_id , newsletter_user_id );
comment on index newsletter_newsletter_users_nu_ind is 'unique constraint index on table';
