Hi Manish,
I have a new 10.5.2 Oracle EM install and I just forced creation of an APPMAP_STATES_* table with a new app.
Describing the new table APPMAP_STATES_20180305 shows the METRIC_ID in the definition i.e.
===
SQL> select object_name,object_type from user_objects where object_name like 'APPMAP_STATES%';
OBJECT_NAME
--------------------------------------------------------------------------------
OBJECT_TYPE
-----------------------
APPMAP_STATES_20180305
TABLE
APPMAP_STATES_201803051_IDX
INDEX
APPMAP_STATES_201803052_IDX
INDEX
SQL> desc APPMAP_STATES_20180305
Name Null? Type
----------------------------------------- -------- ----------------------------
VERTEX_ID NOT NULL NUMBER(19)
METRIC_ID NOT NULL NUMBER(19)
ALERT_ID NOT NULL NUMBER(19)
START_TIME NOT NULL TIMESTAMP(6)
END_TIME NOT NULL TIMESTAMP(6)
FORK NOT NULL NUMBER(19)
STATE NUMBER(19)
SQL> select ts_db_versions from ts_domains;
TS_DB_VERSIONS
--------------------------------------------------------------------------------
10.5.2.0
===
So some problem with the schema upgrade during the 10.1-10.5.2 upgrade step is definitely a possible root cause.
I also found a few occurrences of this being reported before, but it seems the true root cause could not be found.
Regards,
Lynn