     "date" timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
     message text COLLATE pg_catalog."C",
     type event_type,
-    meta JSON,
+    meta JSONB,
     CONSTRAINT event_pkey PRIMARY KEY (id)
 );
 

-- --------------------------------------------
CREATE INDEX sample_idx
  ON public.sample
  USING btree
  (id);


CREATE INDEX attribute_idx
  ON public.attribute
  USING btree
  (analysis_id, sample_id, name COLLATE pg_catalog."default");

CREATE INDEX analysis_idx
  ON public.analysis
  USING btree
  (id);


CREATE INDEX filter_idx
  ON public.filter
  USING btree
  (id);
    

CREATE INDEX annotation_database_idx
  ON public.annotation_database
  USING btree
  (reference_id, name, version);
CREATE INDEX annotation_database_idx2
  ON public.annotation_database
  USING btree (uid);

  
CREATE INDEX subject_indicator_idx
  ON public.subject_indicator_value
  USING btree (subject_id, indicator_id);
CREATE INDEX analysis_indicator_idx
  ON public.analysis_indicator_value
  USING btree (analysis_id, indicator_id);
CREATE INDEX job_indicator_idx
  ON public.job_indicator_value
  USING btree (job_id, indicator_id);


CREATE INDEX panel_entry_idx
  ON public.panel_entry
  USING btree (panel_id, version);
  
  

CREATE INDEX event_meta_idx 
    ON event 
    USING GIN (meta jsonb_path_ops);



