         $BODY$
         BEGIN
         INSERT INTO appshare_realtime_log
-        (record_timestamp,  record_table_name,  record_id, record_id_type,  record_operation)
+        (record_timestamp,  record_table_schema, record_table_name,  record_id, record_id_type,  record_operation)
         VALUES
-        ( now(),   TG_TABLE_NAME ,  OLD.id,
+        ( now(),   TG_TABLE_SCHEMA, TG_TABLE_NAME ,  OLD.id,
         (select data_type from information_schema.columns where column_name='id' and table_name = TG_TABLE_NAME),
         'DELETE');
         RETURN NULL;

        $BODY$
        BEGIN
        INSERT INTO appshare_realtime_log
        (record_timestamp,  record_table_name,  record_id, record_id_type, record_operation)
        VALUES
        ( now(),   TG_TABLE_NAME ,  NEW.id,
        (select data_type from information_schema.columns where column_name='id' and table_name = TG_TABLE_NAME),
        'INSERT');
        RETURN NULL;

          (
          id                  serial NOT NULL,
          record_timestamp    timestamp(3),
          record_table_schema character varying,
          record_table_name   character varying,
          record_id           character varying,
          record_id_type      character varying,
