 comment on column users_tracking.action is 'Action done on table record: insert, update, delete';
 comment on column users_tracking.modification_date_time is 'Track date and time';
 
--- @TODO: to be modified or not :)
--- @TODO: Discussion about that needed... :)
 
 create table users_tracking_records
        (

	is_available boolean not null default false,
        icon_ref integer,
        title_perso varchar(32),
        constraint unq_my_preferences unique (user_ref, category, group_name),
        constraint fk_my_preferences_users foreign key (user_ref) references users(id) on delete cascade,
        constraint fk_my_preferences_multimedia foreign key (icon_ref) references multimedia(id)

comment on column collection_maintenance.description_ts is 'tsvector form of description field';
comment on column collection_maintenance.language_full_text is 'Language used by to_tsvector full text search function';
comment on column collection_maintenance.modification_date_time is 'Last update date/time';

create sequence my_saved_searches_id_seq;
create table my_saved_searches
       (
        id integer not null default nextval('my_saved_searches_id_seq'),
        user_ref integer not null,
        name varchar not null default 'default',
        search_criterias varchar not null,
        favorite boolean not null default false,
        modification_date_time update_date_time,
        visible_fields_in_result varchar not null,
        constraint pk_my_saved_searches primary key (id),
        constraint unq_my_saved_searches unique (user_ref, name),
        constraint fk_my_saved_searches_users foreign key (user_ref) references users(id) on delete cascade
       );
