SHARE
TWEET

2-createCoreSchema (2/2)

a guest Nov 18th, 2013 233 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. ALTER TABLE RIDW.F_TASK_METRICS ADD CONSTRAINT F_TSKMET_FK8 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION (ITERATION_ID)
  3. GO
  4.  
  5. ALTER TABLE RIDW.F_TASK_METRICS ADD CONSTRAINT F_TSKMET_FK9 FOREIGN KEY (TASK_TYPE_ID) REFERENCES RIDW.D_TASK_TYPE (TASK_TYPE_ID)
  6. GO
  7.  
  8. ALTER TABLE RIDW.H_TASK_METRICS ADD CONSTRAINT H_TSKMET_FK1 FOREIGN KEY (TASK_METRICS_ID) REFERENCES RIDW.F_TASK_METRICS (TASK_METRICS_ID) ON DELETE CASCADE
  9. GO
  10.  
  11. ALTER TABLE RIDW.H_TASK_METRICS ADD CONSTRAINT H_TSKMET_FK2 FOREIGN KEY (TASK_ID) REFERENCES RIDW.D_TASK (TASK_ID) ON DELETE CASCADE
  12. GO
  13.  
  14. ALTER TABLE RIDW.F_TASK_CREATION_DT_METRICS ADD CONSTRAINT F_TSKCRDTMET_FK1 FOREIGN KEY (TASK_CLASS_ID) REFERENCES RIDW.D_TASK_CLASSIFICATION (TASK_CLASS_ID)
  15. GO
  16.  
  17. ALTER TABLE RIDW.F_TASK_CREATION_DT_METRICS ADD CONSTRAINT F_TSKCRDTMET_FK2 FOREIGN KEY (CREATION_DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  18. GO
  19.  
  20. ALTER TABLE RIDW.F_TASK_CREATION_DT_METRICS ADD CONSTRAINT F_TSKCRDTMET_FK3 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID)
  21. GO
  22.  
  23. ALTER TABLE RIDW.F_TASK_CREATION_DT_METRICS ADD CONSTRAINT F_TSKCRDTMET_FK4 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  24. GO
  25.  
  26. ALTER TABLE RIDW.F_TASK_CREATION_DT_METRICS ADD CONSTRAINT F_TSKCRDTMET_FK6 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_TASK_STATE (STATE_ID)
  27. GO
  28.  
  29. ALTER TABLE RIDW.F_TASK_CREATION_DT_METRICS ADD CONSTRAINT F_TSKCRDTMET_FK7 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_PRIORITY (PRIORITY_ID)
  30. GO
  31.  
  32. ALTER TABLE RIDW.F_TASK_CREATION_DT_METRICS ADD CONSTRAINT F_TSKCRDTMET_FK8 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION (ITERATION_ID)
  33. GO
  34.  
  35. ALTER TABLE RIDW.F_TASK_CREATION_DT_METRICS ADD CONSTRAINT F_TSKCRDTMET_FK9 FOREIGN KEY (TASK_TYPE_ID) REFERENCES RIDW.D_TASK_TYPE (TASK_TYPE_ID)
  36. GO
  37.  
  38. ALTER TABLE RIDW.H_TASK_CREATION_DT_METRICS ADD CONSTRAINT H_TSKCRDTMET_FK1 FOREIGN KEY (TASKCRD_METRICS_ID) REFERENCES RIDW.F_TASK_CREATION_DT_METRICS (TASKCRD_METRICS_ID) ON DELETE CASCADE
  39. GO
  40.  
  41. ALTER TABLE RIDW.H_TASK_CREATION_DT_METRICS ADD CONSTRAINT H_TSKCRDTMET_FK2 FOREIGN KEY (TASK_ID) REFERENCES RIDW.D_TASK (TASK_ID) ON DELETE CASCADE
  42. GO
  43.  
  44. ALTER TABLE RIDW.F_TASK_CLOSURE_DT_METRICS ADD CONSTRAINT F_TSKCLDTMET_FK1 FOREIGN KEY (TASK_CLASS_ID) REFERENCES RIDW.D_TASK_CLASSIFICATION (TASK_CLASS_ID)
  45. GO
  46.  
  47. ALTER TABLE RIDW.F_TASK_CLOSURE_DT_METRICS ADD CONSTRAINT F_TSKCLDTMET_FK2 FOREIGN KEY (CLOSURE_DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  48. GO
  49.  
  50. ALTER TABLE RIDW.F_TASK_CLOSURE_DT_METRICS ADD CONSTRAINT F_TSKCLDTMET_FK3 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID)
  51. GO
  52.  
  53. ALTER TABLE RIDW.F_TASK_CLOSURE_DT_METRICS ADD CONSTRAINT F_TSKCLDTMET_FK4 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  54. GO
  55.  
  56. ALTER TABLE RIDW.F_TASK_CLOSURE_DT_METRICS ADD CONSTRAINT F_TSKCLDTMET_FK6 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_TASK_STATE (STATE_ID)
  57. GO
  58.  
  59. ALTER TABLE RIDW.F_TASK_CLOSURE_DT_METRICS ADD CONSTRAINT F_TSKCLDTMET_FK7 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_PRIORITY (PRIORITY_ID)
  60. GO
  61.  
  62. ALTER TABLE RIDW.F_TASK_CLOSURE_DT_METRICS ADD CONSTRAINT F_TSKCLDTMET_FK8 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION (ITERATION_ID)
  63. GO
  64.  
  65. ALTER TABLE RIDW.F_TASK_CLOSURE_DT_METRICS ADD CONSTRAINT F_TSKCLDTMET_FK9 FOREIGN KEY (TASK_TYPE_ID) REFERENCES RIDW.D_TASK_TYPE (TASK_TYPE_ID)
  66. GO
  67.  
  68. ALTER TABLE RIDW.H_TASK_CLOSURE_DT_METRICS ADD CONSTRAINT H_TSKCLDTMET_FK1 FOREIGN KEY (TASKCLS_METRICS_ID) REFERENCES RIDW.F_TASK_CLOSURE_DT_METRICS (TASKCLS_METRICS_ID) ON DELETE CASCADE
  69. GO
  70.  
  71. ALTER TABLE RIDW.H_TASK_CLOSURE_DT_METRICS ADD CONSTRAINT H_TSKCLDTMET_FK2 FOREIGN KEY (TASK_ID) REFERENCES RIDW.D_TASK (TASK_ID) ON DELETE CASCADE
  72. GO
  73.  
  74. ALTER TABLE RIDW.H_BUILD_EXEC_DT_METRICS_TOT ADD CONSTRAINT H_BLDEXDTMET_FK1 FOREIGN KEY (BUILD_EXEC_METRIC_ID) REFERENCES RIDW.F_BUILD_EXECUTION_DT_METRICS (BUILD_EXEC_METRIC_ID) ON DELETE CASCADE
  75. GO
  76.  
  77. ALTER TABLE RIDW.H_BUILD_EXEC_DT_METRICS_TOT ADD CONSTRAINT H_BLDEXDTMET_FK2 FOREIGN KEY (BUILD_ID) REFERENCES RIDW.D_BUILD (BUILD_ID) ON DELETE CASCADE
  78. GO
  79.  
  80. ALTER TABLE RIDW.F_BUILD_EXECUTION_DT_METRICS ADD CONSTRAINT F_BLDEXDTMET_FK1 FOREIGN KEY (END_DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  81. GO
  82.  
  83. ALTER TABLE RIDW.F_BUILD_EXECUTION_DT_METRICS ADD CONSTRAINT F_BLDEXDTMET_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  84. GO
  85.  
  86. ALTER TABLE RIDW.F_BUILD_EXECUTION_DT_METRICS ADD CONSTRAINT F_BLDEXDTMET_FK7 FOREIGN KEY (BUILD_TYPE_ID) REFERENCES RIDW.D_BUILD_TYPE (BUILD_TYPE_ID)
  87. GO
  88.  
  89. ALTER TABLE RIDW.F_BUILD_EXECUTION_DT_METRICS ADD CONSTRAINT F_BLDEXDTMET_FK8 FOREIGN KEY (STATUS_ID) REFERENCES RIDW.D_STATUS (STATUS_ID)
  90. GO
  91.  
  92. ALTER TABLE RIDW.F_BUILD_EXECUTION_DT_METRICS ADD CONSTRAINT F_BLDEXDTMET_FK9 FOREIGN KEY (BUILD_CLASS_ID) REFERENCES RIDW.D_BUILD_CLASSIFICATION (BUILD_CLASS_ID)
  93. GO
  94.  
  95. ALTER TABLE RIDW.F_LAB_RESUTILIZATION_METRICS ADD CONSTRAINT F_LABRESUTL_FK1 FOREIGN KEY (RESOURCE_GROUP_ID) REFERENCES RIDW.D_RESOURCE_GROUP (RESOURCE_GROUP_ID)
  96. GO
  97.  
  98. ALTER TABLE RIDW.F_LAB_RESUTILIZATION_METRICS ADD CONSTRAINT F_LABRESUTL_FK2 FOREIGN KEY (OWNER_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID)
  99. GO
  100.  
  101. ALTER TABLE RIDW.F_LAB_RESUTILIZATION_METRICS ADD CONSTRAINT F_LABRESUTL_FK3 FOREIGN KEY (OS_TYPE_ID) REFERENCES RIDW.D_OS_TYPE (OS_TYPE_ID)
  102. GO
  103.  
  104. ALTER TABLE RIDW.F_LAB_RESUTILIZATION_METRICS ADD CONSTRAINT F_LABRESUTL_FK4 FOREIGN KEY (RESERVATION_DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  105. GO
  106.  
  107. ALTER TABLE RIDW.F_LAB_RESUTILIZATION_METRICS ADD CONSTRAINT F_LABRESUTL_FK5 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  108. GO
  109.  
  110. ALTER TABLE RIDW.H_LAB_RESUTILIZATION_METRICS ADD CONSTRAINT H_LABRESUTL_FK1 FOREIGN KEY (LAB_RESUTIL_ID) REFERENCES RIDW.F_LAB_RESUTILIZATION_METRICS (LAB_RESUTIL_ID) ON DELETE CASCADE
  111. GO
  112.  
  113. ALTER TABLE RIDW.H_LAB_RESUTILIZATION_METRICS ADD CONSTRAINT H_LABRESUTL_FK2 FOREIGN KEY (LAB_RESOURCE_ID) REFERENCES RIDW.D_LAB_RESOURCE (LAB_RESOURCE_ID) ON DELETE CASCADE
  114. GO
  115.  
  116. ALTER TABLE RIDW.F_TEXT_FILE_CHANGE_METRICS ADD CONSTRAINT FFTXTCHNGM_FK1 FOREIGN KEY (FILE_CLASS_ID) REFERENCES RIDW.D_FILE_CLASSIFICATION (FILE_CLASS_ID)
  117. GO
  118.  
  119. ALTER TABLE RIDW.F_TEXT_FILE_CHANGE_METRICS ADD CONSTRAINT FFTXTCHNGM_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  120. GO
  121.  
  122. ALTER TABLE RIDW.F_TEXT_FILE_CHANGE_METRICS ADD CONSTRAINT FFTXTCHNGM_FK3 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  123. GO
  124.  
  125. ALTER TABLE RIDW.F_TEXT_FILE_CHANGE_METRICS ADD CONSTRAINT FFTXTCHNGM_FK4 FOREIGN KEY (TEAM_ID) REFERENCES RIDW.D_TEAM (TEAM_ID)
  126. GO
  127.  
  128. ALTER TABLE RIDW.F_TEXT_FILE_CHANGE_METRICS ADD CONSTRAINT FFTXTCHNGM_FK5 FOREIGN KEY (FILE_STREAM_ID) REFERENCES RIDW.D_FILE_STREAM (FILE_STREAM_ID)
  129. GO
  130.  
  131. ALTER TABLE RIDW.F_TEXT_FILE_CHANGE_METRICS ADD CONSTRAINT FFTXTCHNGM_FK6 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT (COMPONENT_ID)
  132. GO
  133.  
  134. ALTER TABLE RIDW.H_TEXT_FILE_CHANGE_METRICS ADD CONSTRAINT HFTXTCHNGM_FK1 FOREIGN KEY (FTEXTCHNG_METRICS_ID) REFERENCES RIDW.F_TEXT_FILE_CHANGE_METRICS (FTEXTCHNG_METRICS_ID) ON DELETE CASCADE
  135. GO
  136.  
  137. ALTER TABLE RIDW.H_TEXT_FILE_CHANGE_METRICS ADD CONSTRAINT HFTXTCHNGM_FK2 FOREIGN KEY (FILE_ID) REFERENCES RIDW.D_FILE (FILE_ID) ON DELETE CASCADE
  138. GO
  139.  
  140. ALTER TABLE RIDW.F_FILE_STREAM_METRICS ADD CONSTRAINT FFILESTRMET_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  141. GO
  142.  
  143. ALTER TABLE RIDW.F_FILE_STREAM_METRICS ADD CONSTRAINT FFILESTRMET_FK2 FOREIGN KEY (FILE_STREAM_CLASS_ID) REFERENCES RIDW.D_FILE_STREAM_CLASSIFICATION (FILE_STREAM_CLASS_ID)
  144. GO
  145.  
  146. ALTER TABLE RIDW.F_FILE_STREAM_METRICS ADD CONSTRAINT FFILESTRMET_FK3 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  147. GO
  148.  
  149. ALTER TABLE RIDW.F_FILE_STREAM_METRICS ADD CONSTRAINT FFILESTRMET_FK4 FOREIGN KEY (TEAM_ID) REFERENCES RIDW.D_TEAM (TEAM_ID)
  150. GO
  151.  
  152. ALTER TABLE RIDW.F_FILE_STREAM_METRICS ADD CONSTRAINT FFILESTRMET_FK5 FOREIGN KEY (FILE_STREAM_ID) REFERENCES RIDW.D_FILE_STREAM (FILE_STREAM_ID)
  153. GO
  154.  
  155. ALTER TABLE RIDW.H_FILE_STREAM_METRICS ADD CONSTRAINT HFILESTRMET_FK1 FOREIGN KEY (FSTREAM_METRICS_ID) REFERENCES RIDW.F_FILE_STREAM_METRICS (FSTREAM_METRICS_ID) ON DELETE CASCADE
  156. GO
  157.  
  158. ALTER TABLE RIDW.H_FILE_STREAM_METRICS ADD CONSTRAINT HFILESTRMET_FK2 FOREIGN KEY (FILE_STREAM_ID) REFERENCES RIDW.D_FILE_STREAM (FILE_STREAM_ID) ON DELETE CASCADE
  159. GO
  160.  
  161. ALTER TABLE RIDW.F_JOB_EXECUTION_DT_METRICS ADD CONSTRAINT F_JOBEXECRES_FK1 FOREIGN KEY (OWNER_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  162. GO
  163.  
  164. ALTER TABLE RIDW.F_JOB_EXECUTION_DT_METRICS ADD CONSTRAINT F_JOBEXECRES_FK2 FOREIGN KEY (JOB_ID) REFERENCES RIDW.D_JOB (JOB_ID)
  165. GO
  166.  
  167. ALTER TABLE RIDW.F_JOB_EXECUTION_DT_METRICS ADD CONSTRAINT F_JOBEXECRES_FK3 FOREIGN KEY (LAB_RESOURCE_ID) REFERENCES RIDW.D_LAB_RESOURCE (LAB_RESOURCE_ID)
  168. GO
  169.  
  170. ALTER TABLE RIDW.F_JOB_EXECUTION_DT_METRICS ADD CONSTRAINT F_JOBEXECRES_FK4 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  171. GO
  172.  
  173. ALTER TABLE RIDW.F_JOB_EXECUTION_DT_METRICS ADD CONSTRAINT F_JOBEXECRES_FK5 FOREIGN KEY (VERDICT_ID) REFERENCES RIDW.D_VERDICT (VERDICT_ID)
  174. GO
  175.  
  176. ALTER TABLE RIDW.F_JOB_EXECUTION_DT_METRICS ADD CONSTRAINT F_JOBEXECRES_FK6 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_JOB_RESULT_STATE (STATE_ID)
  177. GO
  178.  
  179. ALTER TABLE RIDW.F_JOB_EXECUTION_DT_METRICS ADD CONSTRAINT F_JOBEXECRES_FK7 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  180. GO
  181.  
  182. ALTER TABLE RIDW.H_JOB_EXECUTION_DT_METRICS ADD CONSTRAINT H_JOBEXECRES_FK1 FOREIGN KEY (F_JOBRES_METRIC_ID) REFERENCES RIDW.F_JOB_EXECUTION_DT_METRICS (F_JOBRES_METRIC_ID) ON DELETE CASCADE
  183. GO
  184.  
  185. ALTER TABLE RIDW.H_JOB_EXECUTION_DT_METRICS ADD CONSTRAINT H_JOBEXECRES_FK2 FOREIGN KEY (JOB_RESULT_ID) REFERENCES RIDW.D_JOB_RESULT (JOB_RESULT_ID) ON DELETE CASCADE
  186. GO
  187.  
  188. ALTER TABLE RIDW.F_REQUEST_RESOLUTIO_DT_METRICS ADD CONSTRAINT F_REQRESDT_FK1 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE (RELEASE_ID)
  189. GO
  190.  
  191. ALTER TABLE RIDW.F_REQUEST_RESOLUTIO_DT_METRICS ADD CONSTRAINT F_REQRESDT_FK2 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT (COMPONENT_ID)
  192. GO
  193.  
  194. ALTER TABLE RIDW.F_REQUEST_RESOLUTIO_DT_METRICS ADD CONSTRAINT F_REQRESDT_FK3 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  195. GO
  196.  
  197. ALTER TABLE RIDW.F_REQUEST_RESOLUTIO_DT_METRICS ADD CONSTRAINT F_REQRESDT_FK5 FOREIGN KEY (REQUEST_CLASS_ID) REFERENCES RIDW.D_REQUEST_CLASSIFICATION (REQUEST_CLASS_ID)
  198. GO
  199.  
  200. ALTER TABLE RIDW.F_REQUEST_RESOLUTIO_DT_METRICS ADD CONSTRAINT F_REQRESDT_FK7 FOREIGN KEY (STATUS_ID) REFERENCES RIDW.D_REQUEST_STATUS (STATUS_ID)
  201. GO
  202.  
  203. ALTER TABLE RIDW.F_REQUEST_RESOLUTIO_DT_METRICS ADD CONSTRAINT F_REQRESDT_FK8 FOREIGN KEY (CUSTOMER_PRIORITY_ID) REFERENCES RIDW.D_CUSTOMER_PRIORITY (CUSTOMER_PRIORITY_ID)
  204. GO
  205.  
  206. ALTER TABLE RIDW.F_REQUEST_RESOLUTIO_DT_METRICS ADD CONSTRAINT F_REQRESDT_FK9 FOREIGN KEY (RESOLUTION_DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  207. GO
  208.  
  209. ALTER TABLE RIDW.F_REQUEST_RESOLUTIO_DT_METRICS ADD CONSTRAINT F_REQRESDT_FK10 FOREIGN KEY (SEVERITY_ID) REFERENCES RIDW.D_REQUEST_SEVERITY (SEVERITY_ID)
  210. GO
  211.  
  212. ALTER TABLE RIDW.F_REQUEST_RESOLUTIO_DT_METRICS ADD CONSTRAINT F_REQRESDT_FK11 FOREIGN KEY (REQUEST_TYPE_ID) REFERENCES RIDW.D_REQUEST_TYPE (REQUEST_TYPE_ID)
  213. GO
  214.  
  215. ALTER TABLE RIDW.F_REQUEST_RESOLUTIO_DT_METRICS ADD CONSTRAINT F_REQRESDT_FK12 FOREIGN KEY (TEAM_ID) REFERENCES RIDW.D_TEAM (TEAM_ID)
  216. GO
  217.  
  218. ALTER TABLE RIDW.F_REQUEST_RESOLUTIO_DT_METRICS ADD CONSTRAINT F_REQRESDT_FK13 FOREIGN KEY (REQUEST_CATEGORY_ID) REFERENCES RIDW.D_REQUEST_CATEGORY (REQUEST_CATEGORY_ID)
  219. GO
  220.  
  221. ALTER TABLE RIDW.F_REQUEST_RESOLUTIO_DT_METRICS ADD CONSTRAINT F_REQRESDT_FK14 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_REQUEST_STATE (STATE_ID)
  222. GO
  223.  
  224. ALTER TABLE RIDW.F_REQUEST_RESOLUTIO_DT_METRICS ADD CONSTRAINT F_REQRESDT_FK15 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_REQUEST_PRIORITY (PRIORITY_ID)
  225. GO
  226.  
  227. ALTER TABLE RIDW.F_REQUEST_RESOLUTIO_DT_METRICS ADD CONSTRAINT F_REQRESDT_FK16 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION (ITERATION_ID)
  228. GO
  229.  
  230. ALTER TABLE RIDW.F_REQUEST_RESOLUTIO_DT_METRICS ADD CONSTRAINT F_REQRESDT_FK17 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  231. GO
  232.  
  233. ALTER TABLE RIDW.H_REQUEST_RESOLUTIO_DT_METRICS ADD CONSTRAINT H_REQRESDT_FK1 FOREIGN KEY (REQDT_METRIC_ID) REFERENCES RIDW.F_REQUEST_RESOLUTIO_DT_METRICS (REQDT_METRIC_ID) ON DELETE CASCADE
  234. GO
  235.  
  236. ALTER TABLE RIDW.H_REQUEST_RESOLUTIO_DT_METRICS ADD CONSTRAINT H_REQRESDT_FK2 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST (REQUEST_ID) ON DELETE CASCADE
  237. GO
  238.  
  239. ALTER TABLE RIDW.F_RELEASE_REQUEST_METRICS ADD CONSTRAINT F_RELREQ_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  240. GO
  241.  
  242. ALTER TABLE RIDW.F_RELEASE_REQUEST_METRICS ADD CONSTRAINT F_RELREQ_FK2 FOREIGN KEY (REQUEST_CLASS_ID) REFERENCES RIDW.D_REQUEST_CLASSIFICATION (REQUEST_CLASS_ID)
  243. GO
  244.  
  245. ALTER TABLE RIDW.F_RELEASE_REQUEST_METRICS ADD CONSTRAINT F_RELREQ_FK3 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE (RELEASE_ID)
  246. GO
  247.  
  248. ALTER TABLE RIDW.F_RELEASE_REQUEST_METRICS ADD CONSTRAINT F_RELREQ_FK4 FOREIGN KEY (PRODUCT_ID) REFERENCES RIDW.D_PRODUCT (PRODUCT_ID)
  249. GO
  250.  
  251. ALTER TABLE RIDW.F_RELEASE_REQUEST_METRICS ADD CONSTRAINT F_RELREQ_FK5 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_REQUEST_STATE (STATE_ID)
  252. GO
  253.  
  254. ALTER TABLE RIDW.F_RELEASE_REQUEST_METRICS ADD CONSTRAINT F_RELREQ_FK6 FOREIGN KEY (SEVERITY_ID) REFERENCES RIDW.D_REQUEST_SEVERITY (SEVERITY_ID)
  255. GO
  256.  
  257. ALTER TABLE RIDW.F_RELEASE_REQUEST_METRICS ADD CONSTRAINT F_RELREQ_FK7 FOREIGN KEY (REQUEST_TYPE_ID) REFERENCES RIDW.D_REQUEST_TYPE (REQUEST_TYPE_ID)
  258. GO
  259.  
  260. ALTER TABLE RIDW.F_RELEASE_REQUEST_METRICS ADD CONSTRAINT F_RELREQ_FK8 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  261. GO
  262.  
  263. ALTER TABLE RIDW.H_RELEASE_REQUEST_METRICS ADD CONSTRAINT H_RELREQ_FK1 FOREIGN KEY (F_RELREQ_METRIC_ID) REFERENCES RIDW.F_RELEASE_REQUEST_METRICS (F_RELREQ_METRIC_ID) ON DELETE CASCADE
  264. GO
  265.  
  266. ALTER TABLE RIDW.H_RELEASE_REQUEST_METRICS ADD CONSTRAINT H_RELREQ_FK2 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST (REQUEST_ID) ON DELETE CASCADE
  267. GO
  268.  
  269. ALTER TABLE RIDW.F_REL_REQUEST_TURN_METRICS ADD CONSTRAINT F_RELREQTU_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  270. GO
  271.  
  272. ALTER TABLE RIDW.F_REL_REQUEST_TURN_METRICS ADD CONSTRAINT F_RELREQTU_FK2 FOREIGN KEY (REQUEST_CLASS_ID) REFERENCES RIDW.D_REQUEST_CLASSIFICATION (REQUEST_CLASS_ID)
  273. GO
  274.  
  275. ALTER TABLE RIDW.F_REL_REQUEST_TURN_METRICS ADD CONSTRAINT F_RELREQTU_FK3 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE (RELEASE_ID)
  276. GO
  277.  
  278. ALTER TABLE RIDW.F_REL_REQUEST_TURN_METRICS ADD CONSTRAINT F_RELREQTU_FK4 FOREIGN KEY (PRODUCT_ID) REFERENCES RIDW.D_PRODUCT (PRODUCT_ID)
  279. GO
  280.  
  281. ALTER TABLE RIDW.F_REL_REQUEST_TURN_METRICS ADD CONSTRAINT F_RELREQTU_FK5 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_REQUEST_STATE (STATE_ID)
  282. GO
  283.  
  284. ALTER TABLE RIDW.F_REL_REQUEST_TURN_METRICS ADD CONSTRAINT F_RELREQTU_FK6 FOREIGN KEY (SEVERITY_ID) REFERENCES RIDW.D_REQUEST_SEVERITY (SEVERITY_ID)
  285. GO
  286.  
  287. ALTER TABLE RIDW.F_REL_REQUEST_TURN_METRICS ADD CONSTRAINT F_RELREQTU_FK7 FOREIGN KEY (REQUEST_TYPE_ID) REFERENCES RIDW.D_REQUEST_TYPE (REQUEST_TYPE_ID)
  288. GO
  289.  
  290. ALTER TABLE RIDW.F_REL_REQUEST_TURN_METRICS ADD CONSTRAINT F_RELREQTU_FK8 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  291. GO
  292.  
  293. ALTER TABLE RIDW.H_REL_REQUEST_TURN_METRICS ADD CONSTRAINT H_RELREQTU_FK1 FOREIGN KEY (F_RELREQ_TURN_METRIC_ID) REFERENCES RIDW.F_REL_REQUEST_TURN_METRICS (F_RELREQ_TURN_METRIC_ID) ON DELETE CASCADE
  294. GO
  295.  
  296. ALTER TABLE RIDW.H_REL_REQUEST_TURN_METRICS ADD CONSTRAINT H_RELREQTU_FK2 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST (REQUEST_ID) ON DELETE CASCADE
  297. GO
  298.  
  299. ALTER TABLE RIDW.F_TIME_TO_MARKET_RELEA_METRICS ADD CONSTRAINT F_TTMKTREL_FK1 FOREIGN KEY (RELEASE_DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  300. GO
  301.  
  302. ALTER TABLE RIDW.F_TIME_TO_MARKET_RELEA_METRICS ADD CONSTRAINT F_TTMKTREL_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  303. GO
  304.  
  305. ALTER TABLE RIDW.F_TIME_TO_MARKET_RELEA_METRICS ADD CONSTRAINT F_TTMKTREL_FK3 FOREIGN KEY (PRODUCT_ID) REFERENCES RIDW.D_PRODUCT (PRODUCT_ID)
  306. GO
  307.  
  308. ALTER TABLE RIDW.H_TIME_TO_MARKET_REL_METRICS ADD CONSTRAINT H_TTMKTREL_FK1 FOREIGN KEY (F_TIME_TO_MRKT_METRIC_ID) REFERENCES RIDW.F_TIME_TO_MARKET_RELEA_METRICS (F_TIME_TO_MRKT_METRIC_ID) ON DELETE CASCADE
  309. GO
  310.  
  311. ALTER TABLE RIDW.H_TIME_TO_MARKET_REL_METRICS ADD CONSTRAINT H_TTMKTREL_FK2 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE (RELEASE_ID) ON DELETE CASCADE
  312. GO
  313.  
  314. ALTER TABLE RIDW.F_C_REQUEST_METRICS ADD CONSTRAINT F_C_REQUEST_FK1 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  315. GO
  316.  
  317. ALTER TABLE RIDW.F_C_REQUEST_METRICS ADD CONSTRAINT F_C_REQUEST_FK13 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE (RELEASE_ID)
  318. GO
  319.  
  320. ALTER TABLE RIDW.F_C_REQUEST_METRICS ADD CONSTRAINT F_C_REQUEST_FK14 FOREIGN KEY (FIXEDINRELEASE_ID) REFERENCES RIDW.D_RELEASE (RELEASE_ID)
  321. GO
  322.  
  323. ALTER TABLE RIDW.F_C_REQUEST_METRICS ADD CONSTRAINT F_C_REQUEST_FK15 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  324. GO
  325.  
  326. ALTER TABLE RIDW.F_C_REQUEST_METRICS ADD CONSTRAINT F_C_REQUEST_FK16 FOREIGN KEY (REQUEST_CLASS_ID) REFERENCES RIDW.D_REQUEST_CLASSIFICATION (REQUEST_CLASS_ID)
  327. GO
  328.  
  329. ALTER TABLE RIDW.F_C_REQUEST_METRICS ADD CONSTRAINT F_C_REQUEST_FK17 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID)
  330. GO
  331.  
  332. ALTER TABLE RIDW.F_C_REQUEST_METRICS ADD CONSTRAINT F_C_REQUEST_FK19 FOREIGN KEY (STATUS_ID) REFERENCES RIDW.D_REQUEST_STATUS (STATUS_ID)
  333. GO
  334.  
  335. ALTER TABLE RIDW.F_C_REQUEST_METRICS ADD CONSTRAINT F_C_REQUEST_FK2 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_REQUEST_STATE (STATE_ID)
  336. GO
  337.  
  338. ALTER TABLE RIDW.F_C_REQUEST_METRICS ADD CONSTRAINT F_C_REQUEST_FK21 FOREIGN KEY (REQUEST_CATEGORY_ID) REFERENCES RIDW.D_REQUEST_CATEGORY (REQUEST_CATEGORY_ID)
  339. GO
  340.  
  341. ALTER TABLE RIDW.F_C_REQUEST_METRICS ADD CONSTRAINT F_C_REQUEST_FK22 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  342. GO
  343.  
  344. ALTER TABLE RIDW.F_C_REQUEST_METRICS ADD CONSTRAINT F_C_REQUEST_FK3 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_REQUEST_PRIORITY (PRIORITY_ID)
  345. GO
  346.  
  347. ALTER TABLE RIDW.F_C_REQUEST_METRICS ADD CONSTRAINT F_C_REQUEST_FK4 FOREIGN KEY (SEVERITY_ID) REFERENCES RIDW.D_REQUEST_SEVERITY (SEVERITY_ID)
  348. GO
  349.  
  350. ALTER TABLE RIDW.F_C_REQUEST_METRICS ADD CONSTRAINT F_C_REQUEST_FK5 FOREIGN KEY (TEAM_ID) REFERENCES RIDW.D_TEAM (TEAM_ID)
  351. GO
  352.  
  353. ALTER TABLE RIDW.F_C_REQUEST_METRICS ADD CONSTRAINT F_C_REQUEST_FK6 FOREIGN KEY (PLATFORM_ID) REFERENCES RIDW.D_PLATFORM (PLATFORM_ID)
  354. GO
  355.  
  356. ALTER TABLE RIDW.F_C_REQUEST_METRICS ADD CONSTRAINT F_C_REQUEST_FK8 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION (ITERATION_ID)
  357. GO
  358.  
  359. ALTER TABLE RIDW.F_C_REQUEST_METRICS ADD CONSTRAINT F_C_REQUEST_FK9 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT (COMPONENT_ID)
  360. GO
  361.  
  362. ALTER TABLE RIDW.F_C_REQUEST_METRICS ADD CONSTRAINT F_C_REQUEST_FK10 FOREIGN KEY (REQUEST_TYPE_ID) REFERENCES RIDW.D_REQUEST_TYPE (REQUEST_TYPE_ID)
  363. GO
  364.  
  365. ALTER TABLE RIDW.F_C_REQUEST_AGING ADD CONSTRAINT F_C_REQ_AGD_FK1 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_REQUEST_STATE (STATE_ID)
  366. GO
  367.  
  368. ALTER TABLE RIDW.F_C_REQUEST_AGING ADD CONSTRAINT F_C_REQ_AGD_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  369. GO
  370.  
  371. ALTER TABLE RIDW.F_C_REQUEST_AGING ADD CONSTRAINT F_C_REQ_AGD_FK3 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  372. GO
  373.  
  374. ALTER TABLE RIDW.F_C_REQUEST_AGING ADD CONSTRAINT F_C_REQ_AGD_FK4 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT (COMPONENT_ID)
  375. GO
  376.  
  377. ALTER TABLE RIDW.F_C_REQUEST_AGING ADD CONSTRAINT F_C_REQ_AGD_FK5 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID)
  378. GO
  379.  
  380. ALTER TABLE RIDW.F_C_REQUEST_AGING ADD CONSTRAINT F_C_REQ_AGD_FK6 FOREIGN KEY (SEVERITY_ID) REFERENCES RIDW.D_REQUEST_SEVERITY (SEVERITY_ID)
  381. GO
  382.  
  383. ALTER TABLE RIDW.F_C_REQUEST_AGING ADD CONSTRAINT F_C_REQ_AGD_FK7 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_REQUEST_PRIORITY (PRIORITY_ID)
  384. GO
  385.  
  386. ALTER TABLE RIDW.F_C_REQUEST_AGING ADD CONSTRAINT F_C_REQ_AGD_FK8 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION (ITERATION_ID)
  387. GO
  388.  
  389. ALTER TABLE RIDW.F_C_REQUEST_AGING ADD CONSTRAINT F_C_REQ_AGD_FK9 FOREIGN KEY (REQUEST_CLASS_ID) REFERENCES RIDW.D_REQUEST_CLASSIFICATION (REQUEST_CLASS_ID)
  390. GO
  391.  
  392. ALTER TABLE RIDW.F_C_REQUEST_AGING ADD CONSTRAINT F_C_REQ_AGD_FK10 FOREIGN KEY (REQUEST_TYPE_ID) REFERENCES RIDW.D_REQUEST_TYPE (REQUEST_TYPE_ID)
  393. GO
  394.  
  395. ALTER TABLE RIDW.F_C_REQUEST_AGING ADD CONSTRAINT F_C_REQ_AGD_FK11 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  396. GO
  397.  
  398. ALTER TABLE RIDW.F_C_REQUEST_TURNAROUND ADD CONSTRAINT F_C_REQTURN_FK1 FOREIGN KEY (REQUEST_CLASS_ID) REFERENCES RIDW.D_REQUEST_CLASSIFICATION (REQUEST_CLASS_ID)
  399. GO
  400.  
  401. ALTER TABLE RIDW.F_C_REQUEST_TURNAROUND ADD CONSTRAINT F_C_REQTURN_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  402. GO
  403.  
  404. ALTER TABLE RIDW.F_C_REQUEST_TURNAROUND ADD CONSTRAINT F_C_REQTURN_FK4 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT (COMPONENT_ID)
  405. GO
  406.  
  407. ALTER TABLE RIDW.F_C_REQUEST_TURNAROUND ADD CONSTRAINT F_C_REQTURN_FK5 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  408. GO
  409.  
  410. ALTER TABLE RIDW.F_C_REQUEST_TURNAROUND ADD CONSTRAINT F_C_REQTURN_FK6 FOREIGN KEY (SEVERITY_ID) REFERENCES RIDW.D_REQUEST_SEVERITY (SEVERITY_ID)
  411. GO
  412.  
  413. ALTER TABLE RIDW.F_C_REQUEST_TURNAROUND ADD CONSTRAINT F_C_REQTURN_FK7 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_REQUEST_PRIORITY (PRIORITY_ID)
  414. GO
  415.  
  416. ALTER TABLE RIDW.F_C_REQUEST_TURNAROUND ADD CONSTRAINT F_C_REQTURN_FK8 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION (ITERATION_ID)
  417. GO
  418.  
  419. ALTER TABLE RIDW.F_C_REQUEST_TURNAROUND ADD CONSTRAINT F_C_REQTURN_FK9 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  420. GO
  421.  
  422. ALTER TABLE RIDW.F_C_REQUEST_TURNAROUND ADD CONSTRAINT F_C_REQTURN_FK10 FOREIGN KEY (REQUEST_TYPE_ID) REFERENCES RIDW.D_REQUEST_TYPE (REQUEST_TYPE_ID)
  423. GO
  424.  
  425. ALTER TABLE RIDW.F_C_REQUEST_TURNAROUND ADD CONSTRAINT F_C_REQTURN_FK11 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  426. GO
  427.  
  428. ALTER TABLE RIDW.F_C_EXECUTION_RESULT_METRICS ADD CONSTRAINT F_C_EXERES_FK1 FOREIGN KEY (ASSETREGISTRY_ID) REFERENCES RIDW.D_ASSETREGISTRY (ASSETREGISTRY_ID)
  429. GO
  430.  
  431. ALTER TABLE RIDW.F_C_EXECUTION_RESULT_METRICS ADD CONSTRAINT F_C_EXERES_FK2 FOREIGN KEY (TESTCASE_ID) REFERENCES RIDW.D_TESTCASE (TESTCASE_ID)
  432. GO
  433.  
  434. ALTER TABLE RIDW.F_C_EXECUTION_RESULT_METRICS ADD CONSTRAINT F_C_EXERES_FK3 FOREIGN KEY (VERDICT_ID) REFERENCES RIDW.D_VERDICT (VERDICT_ID)
  435. GO
  436.  
  437. ALTER TABLE RIDW.F_C_EXECUTION_RESULT_METRICS ADD CONSTRAINT F_C_EXERES_FK4 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  438. GO
  439.  
  440. ALTER TABLE RIDW.F_C_EXECUTION_RESULT_METRICS ADD CONSTRAINT F_C_EXERES_FK5 FOREIGN KEY (EXECRES_CLASS_ID) REFERENCES RIDW.D_EXECRESULT_CLASSIFICATION (EXECRES_CLASS_ID)
  441. GO
  442.  
  443. ALTER TABLE RIDW.F_C_EXECUTION_RESULT_METRICS ADD CONSTRAINT F_C_EXERES_FK6 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN (TESTPLAN_ID)
  444. GO
  445.  
  446. ALTER TABLE RIDW.F_C_EXECUTION_RESULT_METRICS ADD CONSTRAINT F_C_EXERES_FK7 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  447. GO
  448.  
  449. ALTER TABLE RIDW.F_C_REQUEST_FAILURE_METRICS ADD CONSTRAINT F_C_REQFL_FK1 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE (RELEASE_ID)
  450. GO
  451.  
  452. ALTER TABLE RIDW.F_C_REQUEST_FAILURE_METRICS ADD CONSTRAINT F_C_REQFL_FK2 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT (COMPONENT_ID)
  453. GO
  454.  
  455. ALTER TABLE RIDW.F_C_REQUEST_FAILURE_METRICS ADD CONSTRAINT F_C_REQFL_FK3 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  456. GO
  457.  
  458. ALTER TABLE RIDW.F_C_REQUEST_FAILURE_METRICS ADD CONSTRAINT F_C_REQFL_FK5 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION (ITERATION_ID)
  459. GO
  460.  
  461. ALTER TABLE RIDW.F_C_REQUEST_FAILURE_METRICS ADD CONSTRAINT F_C_REQFL_FK6 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  462. GO
  463.  
  464. ALTER TABLE RIDW.F_C_REQUEST_FAILURE_METRICS ADD CONSTRAINT F_C_REQFL_FK7 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  465. GO
  466.  
  467. ALTER TABLE RIDW.F_C_REQUIREMENT_METRICS ADD CONSTRAINT F_C_REQMET_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  468. GO
  469.  
  470. ALTER TABLE RIDW.F_C_REQUIREMENT_METRICS ADD CONSTRAINT F_C_REQMET_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  471. GO
  472.  
  473. ALTER TABLE RIDW.F_C_REQUIREMENT_METRICS ADD CONSTRAINT F_C_REQMET_FK3 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION (ITERATION_ID)
  474. GO
  475.  
  476. ALTER TABLE RIDW.F_C_REQUIREMENT_METRICS ADD CONSTRAINT F_C_REQMET_FK4 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_REQUIREMENT_STATE (STATE_ID)
  477. GO
  478.  
  479. ALTER TABLE RIDW.F_C_REQUIREMENT_METRICS ADD CONSTRAINT F_C_REQMET_FK5 FOREIGN KEY (REQUIREMENT_CLASS_ID) REFERENCES RIDW.D_REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID)
  480. GO
  481.  
  482. ALTER TABLE RIDW.F_C_REQUIREMENT_METRICS ADD CONSTRAINT F_C_REQMET_FK6 FOREIGN KEY (STATUS_ID) REFERENCES RIDW.D_STATUS (STATUS_ID)
  483. GO
  484.  
  485. ALTER TABLE RIDW.F_C_REQUIREMENT_METRICS ADD CONSTRAINT F_C_REQMET_FK7 FOREIGN KEY (STABILITY_ID) REFERENCES RIDW.D_STABILITY (STABILITY_ID)
  486. GO
  487.  
  488. ALTER TABLE RIDW.F_C_REQUIREMENT_METRICS ADD CONSTRAINT F_C_REQMET_FK8 FOREIGN KEY (DIFFICULTY_ID) REFERENCES RIDW.D_DIFFICULTY (DIFFICULTY_ID)
  489. GO
  490.  
  491. ALTER TABLE RIDW.F_C_REQUIREMENT_METRICS ADD CONSTRAINT F_C_REQMET_FK11 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT (COMPONENT_ID)
  492. GO
  493.  
  494. ALTER TABLE RIDW.F_C_REQUIREMENT_METRICS ADD CONSTRAINT F_C_REQMET_FK12 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID)
  495. GO
  496.  
  497. ALTER TABLE RIDW.F_C_REQUIREMENT_METRICS ADD CONSTRAINT F_C_REQMET_FK13 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_PRIORITY (PRIORITY_ID)
  498. GO
  499.  
  500. ALTER TABLE RIDW.F_C_REQUIREMENT_METRICS ADD CONSTRAINT F_C_REQMET_FK14 FOREIGN KEY (REQUIREMENT_TYPE_ID) REFERENCES RIDW.D_REQUIREMENT_TYPE (REQUIREMENT_TYPE_ID)
  501. GO
  502.  
  503. ALTER TABLE RIDW.F_C_EXECUTION_WORKITEM_METRICS ADD CONSTRAINT F_C_CFGTST_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  504. GO
  505.  
  506. ALTER TABLE RIDW.F_C_EXECUTION_WORKITEM_METRICS ADD CONSTRAINT F_C_CFGTST_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  507. GO
  508.  
  509. ALTER TABLE RIDW.F_C_EXECUTION_WORKITEM_METRICS ADD CONSTRAINT F_C_CFGTST_FK3 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN (TESTPLAN_ID)
  510. GO
  511.  
  512. ALTER TABLE RIDW.F_C_EXECUTION_WORKITEM_METRICS ADD CONSTRAINT F_C_CFGTST_FK4 FOREIGN KEY (VERDICT_ID) REFERENCES RIDW.D_VERDICT (VERDICT_ID)
  513. GO
  514.  
  515. ALTER TABLE RIDW.F_C_EXECUTION_WORKITEM_METRICS ADD CONSTRAINT F_C_CFGTST_FK5 FOREIGN KEY (EXECWORKIT_CLASS_ID) REFERENCES RIDW.D_EXECWORKITEM_CLASSIFICATION (EXECWORKIT_CLASS_ID)
  516. GO
  517.  
  518. ALTER TABLE RIDW.F_C_EXECUTION_WORKITEM_METRICS ADD CONSTRAINT F_C_CFGTST_FK6 FOREIGN KEY (CONFIGURATION_ID) REFERENCES RIDW.D_CONFIGURATION (CONFIGURATION_ID)
  519. GO
  520.  
  521. ALTER TABLE RIDW.F_C_TESTCASE_METRICS ADD CONSTRAINT F_C_TSTCASE_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  522. GO
  523.  
  524. ALTER TABLE RIDW.F_C_TESTCASE_METRICS ADD CONSTRAINT F_C_TSTCASE_FK5 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN (TESTPLAN_ID)
  525. GO
  526.  
  527. ALTER TABLE RIDW.F_C_TESTCASE_METRICS ADD CONSTRAINT F_C_TSTCASE_FK7 FOREIGN KEY (TESTCASE_CLASS_ID) REFERENCES RIDW.D_TESTCASE_CLASSIFICATION (TESTCASE_CLASS_ID)
  528. GO
  529.  
  530. ALTER TABLE RIDW.F_C_TESTCASE_METRICS ADD CONSTRAINT F_C_TSTCASE_FK8 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_TESTCASE_STATE (STATE_ID)
  531. GO
  532.  
  533. ALTER TABLE RIDW.F_C_TESTCASE_METRICS ADD CONSTRAINT F_C_TSTCASE_FK9 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  534. GO
  535.  
  536. ALTER TABLE RIDW.F_C_BUILD_METRICS ADD CONSTRAINT F_C_BUILD_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  537. GO
  538.  
  539. ALTER TABLE RIDW.F_C_BUILD_METRICS ADD CONSTRAINT F_C_BUILD_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  540. GO
  541.  
  542. ALTER TABLE RIDW.F_C_BUILD_METRICS ADD CONSTRAINT F_C_BUILD_FK5 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT (COMPONENT_ID)
  543. GO
  544.  
  545. ALTER TABLE RIDW.F_C_BUILD_METRICS ADD CONSTRAINT F_C_BUILD_FK7 FOREIGN KEY (BUILD_TYPE_ID) REFERENCES RIDW.D_BUILD_TYPE (BUILD_TYPE_ID)
  546. GO
  547.  
  548. ALTER TABLE RIDW.F_C_BUILD_METRICS ADD CONSTRAINT F_C_BUILD_FK8 FOREIGN KEY (BUILD_CLASS_ID) REFERENCES RIDW.D_BUILD_CLASSIFICATION (BUILD_CLASS_ID)
  549. GO
  550.  
  551. ALTER TABLE RIDW.F_C_PROJECT_PERFORM_METRICS ADD CONSTRAINT F_CPPM_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  552. GO
  553.  
  554. ALTER TABLE RIDW.F_C_PROJECT_PERFORM_METRICS ADD CONSTRAINT F_CPPM_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  555. GO
  556.  
  557. ALTER TABLE RIDW.F_C_CHILDREQUIREMENT_METRICS ADD CONSTRAINT F_C_CHREQM_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  558. GO
  559.  
  560. ALTER TABLE RIDW.F_C_CHILDREQUIREMENT_METRICS ADD CONSTRAINT F_C_CHREQM_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  561. GO
  562.  
  563. ALTER TABLE RIDW.F_C_CHILDREQUIREMENT_METRICS ADD CONSTRAINT F_C_CHREQM_FK3 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION (ITERATION_ID)
  564. GO
  565.  
  566. ALTER TABLE RIDW.F_C_CHILDREQUIREMENT_METRICS ADD CONSTRAINT F_C_CHREQM_FK4 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE (RELEASE_ID)
  567. GO
  568.  
  569. ALTER TABLE RIDW.F_C_CHILDREQUIREMENT_METRICS ADD CONSTRAINT F_C_CHREQM_FK5 FOREIGN KEY (PARENT_REQUIREMENT_ID) REFERENCES RIDW.D_REQUIREMENT (REQUIREMENT_ID)
  570. GO
  571.  
  572. ALTER TABLE RIDW.F_C_CHILDREQUIREMENT_METRICS ADD CONSTRAINT F_C_CHREQM_FK6 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT (COMPONENT_ID)
  573. GO
  574.  
  575. ALTER TABLE RIDW.F_C_CHILDREQUIREMENT_METRICS ADD CONSTRAINT F_C_CHREQM_FK7 FOREIGN KEY (REQUIREMENT_CLASS_ID) REFERENCES RIDW.D_REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID)
  576. GO
  577.  
  578. ALTER TABLE RIDW.F_C_CHILDREQUIREMENT_METRICS ADD CONSTRAINT F_C_CHREQM_FK8 FOREIGN KEY (REQUIREMENT_TYPE_ID) REFERENCES RIDW.D_REQUIREMENT_TYPE (REQUIREMENT_TYPE_ID)
  579. GO
  580.  
  581. ALTER TABLE RIDW.F_C_EXECRESPOINTS_METRICS ADD CONSTRAINT F_C_EXECPTS_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  582. GO
  583.  
  584. ALTER TABLE RIDW.F_C_EXECRESPOINTS_METRICS ADD CONSTRAINT F_C_EXECPTS_FK3 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN (TESTPLAN_ID)
  585. GO
  586.  
  587. ALTER TABLE RIDW.F_C_EXECRESPOINTS_METRICS ADD CONSTRAINT F_C_EXECPTS_FK4 FOREIGN KEY (TESTCASE_ID) REFERENCES RIDW.D_TESTCASE (TESTCASE_ID)
  588. GO
  589.  
  590. ALTER TABLE RIDW.F_C_EXECRESPOINTS_METRICS ADD CONSTRAINT F_C_EXECPTS_FK5 FOREIGN KEY (EXECRES_CLASS_ID) REFERENCES RIDW.D_EXECRESULT_CLASSIFICATION (EXECRES_CLASS_ID)
  591. GO
  592.  
  593. ALTER TABLE RIDW.F_C_EXECRESPOINTS_METRICS ADD CONSTRAINT F_C_EXECPTS_FK6 FOREIGN KEY (VERDICT_ID) REFERENCES RIDW.D_VERDICT (VERDICT_ID)
  594. GO
  595.  
  596. ALTER TABLE RIDW.F_C_EXECRESPOINTS_METRICS ADD CONSTRAINT F_C_EXECPTS_FK7 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  597. GO
  598.  
  599. ALTER TABLE RIDW.F_C_ACTIVITY_METRICS ADD CONSTRAINT F_C_ACTM_FK1 FOREIGN KEY (ACTIVITY_CLASS_ID) REFERENCES RIDW.D_ACTIVITY_CLASSIFICATION (ACTIVITY_CLASS_ID)
  600. GO
  601.  
  602. ALTER TABLE RIDW.F_C_ACTIVITY_METRICS ADD CONSTRAINT F_C_ACTM_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  603. GO
  604.  
  605. ALTER TABLE RIDW.F_C_ACTIVITY_METRICS ADD CONSTRAINT F_C_ACTM_FK4 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID)
  606. GO
  607.  
  608. ALTER TABLE RIDW.F_C_ACTIVITY_METRICS ADD CONSTRAINT F_C_ACTM_FK5 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  609. GO
  610.  
  611. ALTER TABLE RIDW.F_C_ACTIVITY_METRICS ADD CONSTRAINT F_C_ACTM_FK7 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_ACTIVITY_STATE (STATE_ID)
  612. GO
  613.  
  614. ALTER TABLE RIDW.F_C_ACTIVITY_METRICS ADD CONSTRAINT F_C_ACTM_FK8 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_PRIORITY (PRIORITY_ID)
  615. GO
  616.  
  617. ALTER TABLE RIDW.F_C_TASK_METRICS ADD CONSTRAINT F_C_TSKMET_FK1 FOREIGN KEY (TASK_CLASS_ID) REFERENCES RIDW.D_TASK_CLASSIFICATION (TASK_CLASS_ID)
  618. GO
  619.  
  620. ALTER TABLE RIDW.F_C_TASK_METRICS ADD CONSTRAINT F_C_TSKMET_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  621. GO
  622.  
  623. ALTER TABLE RIDW.F_C_TASK_METRICS ADD CONSTRAINT F_C_TSKMET_FK3 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID)
  624. GO
  625.  
  626. ALTER TABLE RIDW.F_C_TASK_METRICS ADD CONSTRAINT F_C_TSKMET_FK4 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  627. GO
  628.  
  629. ALTER TABLE RIDW.F_C_TASK_METRICS ADD CONSTRAINT F_C_TSKMET_FK6 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_TASK_STATE (STATE_ID)
  630. GO
  631.  
  632. ALTER TABLE RIDW.F_C_TASK_METRICS ADD CONSTRAINT F_C_TSKMET_FK7 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_PRIORITY (PRIORITY_ID)
  633. GO
  634.  
  635. ALTER TABLE RIDW.F_C_TASK_METRICS ADD CONSTRAINT F_C_TSKMET_FK8 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION (ITERATION_ID)
  636. GO
  637.  
  638. ALTER TABLE RIDW.F_C_TASK_METRICS ADD CONSTRAINT F_C_TSKMET_FK9 FOREIGN KEY (TASK_TYPE_ID) REFERENCES RIDW.D_TASK_TYPE (TASK_TYPE_ID)
  639. GO
  640.  
  641. ALTER TABLE RIDW.F_C_LAB_RESUTILIZATION_METRICS ADD CONSTRAINT F_C_LABRESUTL_FK1 FOREIGN KEY (RESOURCE_GROUP_ID) REFERENCES RIDW.D_RESOURCE_GROUP (RESOURCE_GROUP_ID)
  642. GO
  643.  
  644. ALTER TABLE RIDW.F_C_LAB_RESUTILIZATION_METRICS ADD CONSTRAINT F_C_LABRESUTL_FK2 FOREIGN KEY (OWNER_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID)
  645. GO
  646.  
  647. ALTER TABLE RIDW.F_C_LAB_RESUTILIZATION_METRICS ADD CONSTRAINT F_C_LABRESUTL_FK3 FOREIGN KEY (OS_TYPE_ID) REFERENCES RIDW.D_OS_TYPE (OS_TYPE_ID)
  648. GO
  649.  
  650. ALTER TABLE RIDW.F_C_LAB_RESUTILIZATION_METRICS ADD CONSTRAINT F_C_LABRESUTL_FK4 FOREIGN KEY (RESERVATION_DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  651. GO
  652.  
  653. ALTER TABLE RIDW.F_C_LAB_RESUTILIZATION_METRICS ADD CONSTRAINT F_C_LABRESUTL_FK5 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  654. GO
  655.  
  656. ALTER TABLE RIDW.F_C_TEXT_FILE_CHANGE_METRICS ADD CONSTRAINT FCFTXTCHNGM_FK1 FOREIGN KEY (FILE_CLASS_ID) REFERENCES RIDW.D_FILE_CLASSIFICATION (FILE_CLASS_ID)
  657. GO
  658.  
  659. ALTER TABLE RIDW.F_C_TEXT_FILE_CHANGE_METRICS ADD CONSTRAINT FCFTXTCHNGM_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  660. GO
  661.  
  662. ALTER TABLE RIDW.F_C_TEXT_FILE_CHANGE_METRICS ADD CONSTRAINT FCFTXTCHNGM_FK3 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  663. GO
  664.  
  665. ALTER TABLE RIDW.F_C_TEXT_FILE_CHANGE_METRICS ADD CONSTRAINT FCFTXTCHNGM_FK4 FOREIGN KEY (TEAM_ID) REFERENCES RIDW.D_TEAM (TEAM_ID)
  666. GO
  667.  
  668. ALTER TABLE RIDW.F_C_TEXT_FILE_CHANGE_METRICS ADD CONSTRAINT FCFTXTCHNGM_FK5 FOREIGN KEY (FILE_STREAM_ID) REFERENCES RIDW.D_FILE_STREAM (FILE_STREAM_ID)
  669. GO
  670.  
  671. ALTER TABLE RIDW.F_C_TEXT_FILE_CHANGE_METRICS ADD CONSTRAINT FCFTXTCHNGM_FK6 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT (COMPONENT_ID)
  672. GO
  673.  
  674. ALTER TABLE RIDW.F_C_FILE_STREAM_METRICS ADD CONSTRAINT FCFILESTRMET_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  675. GO
  676.  
  677. ALTER TABLE RIDW.F_C_FILE_STREAM_METRICS ADD CONSTRAINT FCFILESTRMET_FK2 FOREIGN KEY (FILE_STREAM_CLASS_ID) REFERENCES RIDW.D_FILE_STREAM_CLASSIFICATION (FILE_STREAM_CLASS_ID)
  678. GO
  679.  
  680. ALTER TABLE RIDW.F_C_FILE_STREAM_METRICS ADD CONSTRAINT FCFILESTRMET_FK3 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  681. GO
  682.  
  683. ALTER TABLE RIDW.F_C_FILE_STREAM_METRICS ADD CONSTRAINT FCFILESTRMET_FK4 FOREIGN KEY (TEAM_ID) REFERENCES RIDW.D_TEAM (TEAM_ID)
  684. GO
  685.  
  686. ALTER TABLE RIDW.F_C_FILE_STREAM_METRICS ADD CONSTRAINT FCFILESTRMET_FK5 FOREIGN KEY (FILE_STREAM_ID) REFERENCES RIDW.D_FILE_STREAM (FILE_STREAM_ID)
  687. GO
  688.  
  689. ALTER TABLE RIDW.F_C_RELEASE_REQUEST_METRICS ADD CONSTRAINT F_C_RELREQ_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  690. GO
  691.  
  692. ALTER TABLE RIDW.F_C_RELEASE_REQUEST_METRICS ADD CONSTRAINT F_C_RELREQ_FK2 FOREIGN KEY (REQUEST_CLASS_ID) REFERENCES RIDW.D_REQUEST_CLASSIFICATION (REQUEST_CLASS_ID)
  693. GO
  694.  
  695. ALTER TABLE RIDW.F_C_RELEASE_REQUEST_METRICS ADD CONSTRAINT F_C_RELREQ_FK3 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE (RELEASE_ID)
  696. GO
  697.  
  698. ALTER TABLE RIDW.F_C_RELEASE_REQUEST_METRICS ADD CONSTRAINT F_C_RELREQ_FK4 FOREIGN KEY (PRODUCT_ID) REFERENCES RIDW.D_PRODUCT (PRODUCT_ID)
  699. GO
  700.  
  701. ALTER TABLE RIDW.F_C_RELEASE_REQUEST_METRICS ADD CONSTRAINT F_C_RELREQ_FK5 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_REQUEST_STATE (STATE_ID)
  702. GO
  703.  
  704. ALTER TABLE RIDW.F_C_RELEASE_REQUEST_METRICS ADD CONSTRAINT F_C_RELREQ_FK6 FOREIGN KEY (SEVERITY_ID) REFERENCES RIDW.D_REQUEST_SEVERITY (SEVERITY_ID)
  705. GO
  706.  
  707. ALTER TABLE RIDW.F_C_RELEASE_REQUEST_METRICS ADD CONSTRAINT F_C_RELREQ_FK7 FOREIGN KEY (REQUEST_TYPE_ID) REFERENCES RIDW.D_REQUEST_TYPE (REQUEST_TYPE_ID)
  708. GO
  709.  
  710. ALTER TABLE RIDW.F_C_RELEASE_REQUEST_METRICS ADD CONSTRAINT F_C_RELREQ_FK8 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  711. GO
  712.  
  713. ALTER TABLE RIDW.F_C_REL_REQUEST_TURN_METRICS ADD CONSTRAINT F_C_RELREQTU_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  714. GO
  715.  
  716. ALTER TABLE RIDW.F_C_REL_REQUEST_TURN_METRICS ADD CONSTRAINT F_C_RELREQTU_FK2 FOREIGN KEY (REQUEST_CLASS_ID) REFERENCES RIDW.D_REQUEST_CLASSIFICATION (REQUEST_CLASS_ID)
  717. GO
  718.  
  719. ALTER TABLE RIDW.F_C_REL_REQUEST_TURN_METRICS ADD CONSTRAINT F_C_RELREQTU_FK3 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE (RELEASE_ID)
  720. GO
  721.  
  722. ALTER TABLE RIDW.F_C_REL_REQUEST_TURN_METRICS ADD CONSTRAINT F_C_RELREQTU_FK4 FOREIGN KEY (PRODUCT_ID) REFERENCES RIDW.D_PRODUCT (PRODUCT_ID)
  723. GO
  724.  
  725. ALTER TABLE RIDW.F_C_REL_REQUEST_TURN_METRICS ADD CONSTRAINT F_C_RELREQTU_FK5 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_REQUEST_STATE (STATE_ID)
  726. GO
  727.  
  728. ALTER TABLE RIDW.F_C_REL_REQUEST_TURN_METRICS ADD CONSTRAINT F_C_RELREQTU_FK6 FOREIGN KEY (SEVERITY_ID) REFERENCES RIDW.D_REQUEST_SEVERITY (SEVERITY_ID)
  729. GO
  730.  
  731. ALTER TABLE RIDW.F_C_REL_REQUEST_TURN_METRICS ADD CONSTRAINT F_C_RELREQTU_FK7 FOREIGN KEY (REQUEST_TYPE_ID) REFERENCES RIDW.D_REQUEST_TYPE (REQUEST_TYPE_ID)
  732. GO
  733.  
  734. ALTER TABLE RIDW.F_C_REL_REQUEST_TURN_METRICS ADD CONSTRAINT F_C_RELREQTU_FK8 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  735. GO
  736.  
  737. ALTER TABLE RIDW.D_PROJECT ADD CONSTRAINT PROJECT_FK1 FOREIGN KEY (PROGRAM_ID) REFERENCES RIDW.D_PROGRAM (PROGRAM_ID)
  738. GO
  739.  
  740. ALTER TABLE RIDW.D_COMPONENT ADD CONSTRAINT D_COMPONENT_FK1 FOREIGN KEY (PRODUCT_ID) REFERENCES RIDW.D_PRODUCT(PRODUCT_ID)
  741. GO
  742.  
  743. ALTER TABLE RIDW.F_ACTIVITY_ITER_METRICS ADD CONSTRAINT F_ACTITER_MET_FK1 FOREIGN KEY (ACTIVITY_CLASS_ID) REFERENCES RIDW.D_ACTIVITY_CLASSIFICATION(ACTIVITY_CLASS_ID)
  744. GO
  745.  
  746. ALTER TABLE RIDW.F_ACTIVITY_ITER_METRICS ADD CONSTRAINT F_ACTITER_MET_FK4 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  747. GO
  748.  
  749. ALTER TABLE RIDW.F_ACTIVITY_ITER_METRICS ADD CONSTRAINT F_ACTITER_MET_FK5 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  750. GO
  751.  
  752. ALTER TABLE RIDW.F_ACTIVITY_ITER_METRICS ADD CONSTRAINT F_ACTITER_MET_FK6 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_PRIORITY(PRIORITY_ID)
  753. GO
  754.  
  755. ALTER TABLE RIDW.F_ACTIVITY_ITER_METRICS ADD CONSTRAINT F_ACTITER_MET_FK7 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  756. GO
  757.  
  758. ALTER TABLE RIDW.F_ACTIVITY_ITER_METRICS ADD CONSTRAINT F_ACTITER_MET_FK8 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  759. GO
  760.  
  761. ALTER TABLE RIDW.F_ACTIVITY_ITER_METRICS ADD CONSTRAINT F_ACTITER_MET_FK9 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_ACTIVITY_STATE(STATE_ID)
  762. GO
  763.  
  764. ALTER TABLE RIDW.F_ACTIVITY_REQ_METRICS ADD CONSTRAINT F_ACTREQ_MET_FK1 FOREIGN KEY (ACTIVITY_CLASS_ID) REFERENCES RIDW.D_ACTIVITY_CLASSIFICATION(ACTIVITY_CLASS_ID)
  765. GO
  766.  
  767. ALTER TABLE RIDW.F_ACTIVITY_REQ_METRICS ADD CONSTRAINT F_ACTREQ_MET_FK4 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  768. GO
  769.  
  770. ALTER TABLE RIDW.F_ACTIVITY_REQ_METRICS ADD CONSTRAINT F_ACTREQ_MET_FK5 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  771. GO
  772.  
  773. ALTER TABLE RIDW.F_ACTIVITY_REQ_METRICS ADD CONSTRAINT F_ACTREQ_MET_FK6 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_PRIORITY(PRIORITY_ID)
  774. GO
  775.  
  776. ALTER TABLE RIDW.F_ACTIVITY_REQ_METRICS ADD CONSTRAINT F_ACTREQ_MET_FK7 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  777. GO
  778.  
  779. ALTER TABLE RIDW.F_ACTIVITY_REQ_METRICS ADD CONSTRAINT F_ACTREQ_MET_FK8 FOREIGN KEY (REQUIREMENT_ID) REFERENCES RIDW.D_REQUIREMENT(REQUIREMENT_ID)
  780. GO
  781.  
  782. ALTER TABLE RIDW.F_ACTIVITY_REQ_METRICS ADD CONSTRAINT F_ACTREQ_MET_FK9 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  783. GO
  784.  
  785. ALTER TABLE RIDW.F_ACTIVITY_REQ_METRICS ADD CONSTRAINT F_ACTREQ_MET_FK10 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_ACTIVITY_STATE(STATE_ID)
  786. GO
  787.  
  788. ALTER TABLE RIDW.F_ACT_ITER_CREATION_DT_METRICS ADD CONSTRAINT F_AICRDT_MET_FK2 FOREIGN KEY (ACTIVITY_CLASS_ID) REFERENCES RIDW.D_ACTIVITY_CLASSIFICATION(ACTIVITY_CLASS_ID)
  789. GO
  790.  
  791. ALTER TABLE RIDW.F_ACT_ITER_CREATION_DT_METRICS ADD CONSTRAINT F_AICRDT_MET_FK4 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  792. GO
  793.  
  794. ALTER TABLE RIDW.F_ACT_ITER_CREATION_DT_METRICS ADD CONSTRAINT F_AICRDT_MET_FK5 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_PRIORITY(PRIORITY_ID)
  795. GO
  796.  
  797. ALTER TABLE RIDW.F_ACT_ITER_CREATION_DT_METRICS ADD CONSTRAINT F_AICRDT_MET_FK6 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  798. GO
  799.  
  800. ALTER TABLE RIDW.F_ACT_ITER_CREATION_DT_METRICS ADD CONSTRAINT F_AICRDT_MET_FK7 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  801. GO
  802.  
  803. ALTER TABLE RIDW.F_ACT_ITER_CREATION_DT_METRICS ADD CONSTRAINT F_AICRDT_MET_FK8 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_ACTIVITY_STATE(STATE_ID)
  804. GO
  805.  
  806. ALTER TABLE RIDW.F_ACT_REQU_CREATION_DT_METRICS ADD CONSTRAINT F_ARCRDT_MET_FK2 FOREIGN KEY (ACTIVITY_CLASS_ID) REFERENCES RIDW.D_ACTIVITY_CLASSIFICATION(ACTIVITY_CLASS_ID)
  807. GO
  808.  
  809. ALTER TABLE RIDW.F_ACT_REQU_CREATION_DT_METRICS ADD CONSTRAINT F_ARCRDT_MET_FK4 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_PRIORITY(PRIORITY_ID)
  810. GO
  811.  
  812. ALTER TABLE RIDW.F_ACT_REQU_CREATION_DT_METRICS ADD CONSTRAINT F_ARCRDT_MET_FK5 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  813. GO
  814.  
  815. ALTER TABLE RIDW.F_ACT_REQU_CREATION_DT_METRICS ADD CONSTRAINT F_ARCRDT_MET_FK6 FOREIGN KEY (REQUIREMENT_ID) REFERENCES RIDW.D_REQUIREMENT(REQUIREMENT_ID)
  816. GO
  817.  
  818. ALTER TABLE RIDW.F_ACT_REQU_CREATION_DT_METRICS ADD CONSTRAINT F_ARCRDT_MET_FK7 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  819. GO
  820.  
  821. ALTER TABLE RIDW.F_ACT_REQU_CREATION_DT_METRICS ADD CONSTRAINT F_ARCRDT_MET_FK8 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_ACTIVITY_STATE(STATE_ID)
  822. GO
  823.  
  824. ALTER TABLE RIDW.F_BUILD_REQUI_METRICS ADD CONSTRAINT F_BLDREQUI_MET_FK1 FOREIGN KEY (BUILD_CLASS_ID) REFERENCES RIDW.D_BUILD_CLASSIFICATION(BUILD_CLASS_ID)
  825. GO
  826.  
  827. ALTER TABLE RIDW.F_BUILD_REQUI_METRICS ADD CONSTRAINT F_BLDREQUI_MET_FK3 FOREIGN KEY (BUILD_TYPE_ID) REFERENCES RIDW.D_BUILD_TYPE(BUILD_TYPE_ID)
  828. GO
  829.  
  830. ALTER TABLE RIDW.F_BUILD_REQUI_METRICS ADD CONSTRAINT F_BLDREQUI_MET_FK4 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  831. GO
  832.  
  833. ALTER TABLE RIDW.F_BUILD_REQUI_METRICS ADD CONSTRAINT F_BLDREQUI_MET_FK5 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  834. GO
  835.  
  836. ALTER TABLE RIDW.F_BUILD_REQUI_METRICS ADD CONSTRAINT F_BLDREQUI_MET_FK6 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  837. GO
  838.  
  839. ALTER TABLE RIDW.F_BUILD_REQUI_METRICS ADD CONSTRAINT F_BLDREQUI_MET_FK7 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  840. GO
  841.  
  842. ALTER TABLE RIDW.F_BUILD_REQUI_METRICS ADD CONSTRAINT F_BLDREQUI_MET_FK8 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  843. GO
  844.  
  845. ALTER TABLE RIDW.F_BUILD_REQUI_METRICS ADD CONSTRAINT F_BLDREQUI_MET_FK9 FOREIGN KEY (REQUIREMENT_ID) REFERENCES RIDW.D_REQUIREMENT(REQUIREMENT_ID)
  846. GO
  847.  
  848. ALTER TABLE RIDW.F_BUILD_REQU_EXEC_DT_METRICS ADD CONSTRAINT F_BREDT_MET_FK1 FOREIGN KEY (BUILD_CLASS_ID) REFERENCES RIDW.D_BUILD_CLASSIFICATION(BUILD_CLASS_ID)
  849. GO
  850.  
  851. ALTER TABLE RIDW.F_BUILD_REQU_EXEC_DT_METRICS ADD CONSTRAINT F_BREDT_MET_FK3 FOREIGN KEY (BUILD_TYPE_ID) REFERENCES RIDW.D_BUILD_TYPE(BUILD_TYPE_ID)
  852. GO
  853.  
  854. ALTER TABLE RIDW.F_BUILD_REQU_EXEC_DT_METRICS ADD CONSTRAINT F_BREDT_MET_FK4 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  855. GO
  856.  
  857. ALTER TABLE RIDW.F_BUILD_REQU_EXEC_DT_METRICS ADD CONSTRAINT F_BREDT_MET_FK5 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  858. GO
  859.  
  860. ALTER TABLE RIDW.F_BUILD_REQU_EXEC_DT_METRICS ADD CONSTRAINT F_BREDT_MET_FK6 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  861. GO
  862.  
  863. ALTER TABLE RIDW.F_BUILD_REQU_EXEC_DT_METRICS ADD CONSTRAINT F_BREDT_MET_FK7 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  864. GO
  865.  
  866. ALTER TABLE RIDW.F_BUILD_REQU_EXEC_DT_METRICS ADD CONSTRAINT F_BREDT_MET_FK8 FOREIGN KEY (STATUS_ID) REFERENCES RIDW.D_STATUS(STATUS_ID)
  867. GO
  868.  
  869. ALTER TABLE RIDW.F_BUILD_REQU_METRICS ADD CONSTRAINT F_BLDREQU_MET_FK1 FOREIGN KEY (BUILD_CLASS_ID) REFERENCES RIDW.D_BUILD_CLASSIFICATION(BUILD_CLASS_ID)
  870. GO
  871.  
  872. ALTER TABLE RIDW.F_BUILD_REQU_METRICS ADD CONSTRAINT F_BLDREQU_MET_FK3 FOREIGN KEY (BUILD_TYPE_ID) REFERENCES RIDW.D_BUILD_TYPE(BUILD_TYPE_ID)
  873. GO
  874.  
  875. ALTER TABLE RIDW.F_BUILD_REQU_METRICS ADD CONSTRAINT F_BLDREQU_MET_FK4 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  876. GO
  877.  
  878. ALTER TABLE RIDW.F_BUILD_REQU_METRICS ADD CONSTRAINT F_BLDREQU_MET_FK5 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  879. GO
  880.  
  881. ALTER TABLE RIDW.F_BUILD_REQU_METRICS ADD CONSTRAINT F_BLDREQU_MET_FK6 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  882. GO
  883.  
  884. ALTER TABLE RIDW.F_BUILD_REQU_METRICS ADD CONSTRAINT F_BLDREQU_MET_FK7 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  885. GO
  886.  
  887. ALTER TABLE RIDW.F_BUILD_REQU_METRICS ADD CONSTRAINT F_BLDREQU_MET_FK8 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  888. GO
  889.  
  890. ALTER TABLE RIDW.F_C_ACTIVITY_ITER_METRICS ADD CONSTRAINT F_CACTITER_MET_FK1 FOREIGN KEY (ACTIVITY_CLASS_ID) REFERENCES RIDW.D_ACTIVITY_CLASSIFICATION(ACTIVITY_CLASS_ID)
  891. GO
  892.  
  893. ALTER TABLE RIDW.F_C_ACTIVITY_ITER_METRICS ADD CONSTRAINT F_CACTITER_MET_FK4 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  894. GO
  895.  
  896. ALTER TABLE RIDW.F_C_ACTIVITY_ITER_METRICS ADD CONSTRAINT F_CACTITER_MET_FK5 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  897. GO
  898.  
  899. ALTER TABLE RIDW.F_C_ACTIVITY_ITER_METRICS ADD CONSTRAINT F_CACTITER_MET_FK6 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_PRIORITY(PRIORITY_ID)
  900. GO
  901.  
  902. ALTER TABLE RIDW.F_C_ACTIVITY_ITER_METRICS ADD CONSTRAINT F_CACTITER_MET_FK7 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  903. GO
  904.  
  905. ALTER TABLE RIDW.F_C_ACTIVITY_ITER_METRICS ADD CONSTRAINT F_CACTITER_MET_FK8 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  906. GO
  907.  
  908. ALTER TABLE RIDW.F_C_ACTIVITY_ITER_METRICS ADD CONSTRAINT F_CACTITER_MET_FK9 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_ACTIVITY_STATE(STATE_ID)
  909. GO
  910.  
  911. ALTER TABLE RIDW.F_C_ACTIVITY_REQ_METRICS ADD CONSTRAINT F_C_ACTREQ_MET_FK1 FOREIGN KEY (ACTIVITY_CLASS_ID) REFERENCES RIDW.D_ACTIVITY_CLASSIFICATION(ACTIVITY_CLASS_ID)
  912. GO
  913.  
  914. ALTER TABLE RIDW.F_C_ACTIVITY_REQ_METRICS ADD CONSTRAINT F_C_ACTREQ_MET_FK4 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  915. GO
  916.  
  917. ALTER TABLE RIDW.F_C_ACTIVITY_REQ_METRICS ADD CONSTRAINT F_C_ACTREQ_MET_FK5 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  918. GO
  919.  
  920. ALTER TABLE RIDW.F_C_ACTIVITY_REQ_METRICS ADD CONSTRAINT F_C_ACTREQ_MET_FK6 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_PRIORITY(PRIORITY_ID)
  921. GO
  922.  
  923. ALTER TABLE RIDW.F_C_ACTIVITY_REQ_METRICS ADD CONSTRAINT F_C_ACTREQ_MET_FK7 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  924. GO
  925.  
  926. ALTER TABLE RIDW.F_C_ACTIVITY_REQ_METRICS ADD CONSTRAINT F_C_ACTREQ_MET_FK8 FOREIGN KEY (REQUIREMENT_ID) REFERENCES RIDW.D_REQUIREMENT(REQUIREMENT_ID)
  927. GO
  928.  
  929. ALTER TABLE RIDW.F_C_ACTIVITY_REQ_METRICS ADD CONSTRAINT F_C_ACTREQ_MET_FK9 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  930. GO
  931.  
  932. ALTER TABLE RIDW.F_C_ACTIVITY_REQ_METRICS ADD CONSTRAINT F_CACTREQ_MET_FK10 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_ACTIVITY_STATE(STATE_ID)
  933. GO
  934.  
  935. ALTER TABLE RIDW.F_C_BUILD_REQUI_METRICS ADD CONSTRAINT F_CBLDREQ_MET_FK1 FOREIGN KEY (BUILD_CLASS_ID) REFERENCES RIDW.D_BUILD_CLASSIFICATION(BUILD_CLASS_ID)
  936. GO
  937.  
  938. ALTER TABLE RIDW.F_C_BUILD_REQUI_METRICS ADD CONSTRAINT F_CBLDREQ_MET_FK3 FOREIGN KEY (BUILD_TYPE_ID) REFERENCES RIDW.D_BUILD_TYPE(BUILD_TYPE_ID)
  939. GO
  940.  
  941. ALTER TABLE RIDW.F_C_BUILD_REQUI_METRICS ADD CONSTRAINT F_CBLDREQ_MET_FK4 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  942. GO
  943.  
  944. ALTER TABLE RIDW.F_C_BUILD_REQUI_METRICS ADD CONSTRAINT F_CBLDREQ_MET_FK5 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  945. GO
  946.  
  947. ALTER TABLE RIDW.F_C_BUILD_REQUI_METRICS ADD CONSTRAINT F_CBLDREQ_MET_FK6 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  948. GO
  949.  
  950. ALTER TABLE RIDW.F_C_BUILD_REQUI_METRICS ADD CONSTRAINT F_CBLDREQ_MET_FK7 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  951. GO
  952.  
  953. ALTER TABLE RIDW.F_C_BUILD_REQUI_METRICS ADD CONSTRAINT F_CBLDREQ_MET_FK8 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  954. GO
  955.  
  956. ALTER TABLE RIDW.F_C_BUILD_REQUI_METRICS ADD CONSTRAINT F_CBLDREQ_MET_FK9 FOREIGN KEY (REQUIREMENT_ID) REFERENCES RIDW.D_REQUIREMENT(REQUIREMENT_ID)
  957. GO
  958.  
  959. ALTER TABLE RIDW.F_C_BUILD_REQU_METRICS ADD CONSTRAINT F_CBLDREQU_MET_FK1 FOREIGN KEY (BUILD_CLASS_ID) REFERENCES RIDW.D_BUILD_CLASSIFICATION(BUILD_CLASS_ID)
  960. GO
  961.  
  962. ALTER TABLE RIDW.F_C_BUILD_REQU_METRICS ADD CONSTRAINT F_CBLDREQU_MET_FK3 FOREIGN KEY (BUILD_TYPE_ID) REFERENCES RIDW.D_BUILD_TYPE(BUILD_TYPE_ID)
  963. GO
  964.  
  965. ALTER TABLE RIDW.F_C_BUILD_REQU_METRICS ADD CONSTRAINT F_CBLDREQU_MET_FK4 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  966. GO
  967.  
  968. ALTER TABLE RIDW.F_C_BUILD_REQU_METRICS ADD CONSTRAINT F_CBLDREQU_MET_FK5 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  969. GO
  970.  
  971. ALTER TABLE RIDW.F_C_BUILD_REQU_METRICS ADD CONSTRAINT F_CBLDREQU_MET_FK6 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  972. GO
  973.  
  974. ALTER TABLE RIDW.F_C_BUILD_REQU_METRICS ADD CONSTRAINT F_CBLDREQU_MET_FK7 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  975. GO
  976.  
  977. ALTER TABLE RIDW.F_C_BUILD_REQU_METRICS ADD CONSTRAINT F_CBLDREQU_MET_FK8 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  978. GO
  979.  
  980. ALTER TABLE RIDW.F_C_EXECRESPOINTS_ITER_METRICS ADD CONSTRAINT F_CEPTI_MET_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  981. GO
  982.  
  983. ALTER TABLE RIDW.F_C_EXECRESPOINTS_ITER_METRICS ADD CONSTRAINT F_CEPTI_MET_FK2 FOREIGN KEY (EXECRES_CLASS_ID) REFERENCES RIDW.D_EXECRESULT_CLASSIFICATION(EXECRES_CLASS_ID)
  984. GO
  985.  
  986. ALTER TABLE RIDW.F_C_EXECRESPOINTS_ITER_METRICS ADD CONSTRAINT F_CEPTI_MET_FK4 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  987. GO
  988.  
  989. ALTER TABLE RIDW.F_C_EXECRESPOINTS_ITER_METRICS ADD CONSTRAINT F_CEPTI_MET_FK5 FOREIGN KEY (TESTCASE_ID) REFERENCES RIDW.D_TESTCASE(TESTCASE_ID)
  990. GO
  991.  
  992. ALTER TABLE RIDW.F_C_EXECRESPOINTS_ITER_METRICS ADD CONSTRAINT F_CEPTI_MET_FK6 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN(TESTPLAN_ID)
  993. GO
  994.  
  995. ALTER TABLE RIDW.F_C_EXECRESPOINTS_ITER_METRICS ADD CONSTRAINT F_CEPTI_MET_FK7 FOREIGN KEY (VERDICT_ID) REFERENCES RIDW.D_VERDICT(VERDICT_ID)
  996. GO
  997.  
  998. ALTER TABLE RIDW.F_C_EXECRESPOINTS_ITER_METRICS ADD CONSTRAINT F_CEPTI_MET_FK8 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  999. GO
  1000.  
  1001. ALTER TABLE RIDW.F_C_EXEC_RESULT_ITER_METRICS ADD CONSTRAINT F_CEREI_MET_FK1 FOREIGN KEY (ASSETREGISTRY_ID) REFERENCES RIDW.D_ASSETREGISTRY(ASSETREGISTRY_ID)
  1002. GO
  1003.  
  1004. ALTER TABLE RIDW.F_C_EXEC_RESULT_ITER_METRICS ADD CONSTRAINT F_CEREI_MET_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1005. GO
  1006.  
  1007. ALTER TABLE RIDW.F_C_EXEC_RESULT_ITER_METRICS ADD CONSTRAINT F_CEREI_MET_FK3 FOREIGN KEY (EXECRES_CLASS_ID) REFERENCES RIDW.D_EXECRESULT_CLASSIFICATION(EXECRES_CLASS_ID)
  1008. GO
  1009.  
  1010. ALTER TABLE RIDW.F_C_EXEC_RESULT_ITER_METRICS ADD CONSTRAINT F_CEREI_MET_FK4 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  1011. GO
  1012.  
  1013. ALTER TABLE RIDW.F_C_EXEC_RESULT_ITER_METRICS ADD CONSTRAINT F_CEREI_MET_FK5 FOREIGN KEY (TESTCASE_ID) REFERENCES RIDW.D_TESTCASE(TESTCASE_ID)
  1014. GO
  1015.  
  1016. ALTER TABLE RIDW.F_C_EXEC_RESULT_ITER_METRICS ADD CONSTRAINT F_CEREI_MET_FK6 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN(TESTPLAN_ID)
  1017. GO
  1018.  
  1019. ALTER TABLE RIDW.F_C_EXEC_RESULT_ITER_METRICS ADD CONSTRAINT F_CEREI_MET_FK7 FOREIGN KEY (VERDICT_ID) REFERENCES RIDW.D_VERDICT(VERDICT_ID)
  1020. GO
  1021.  
  1022. ALTER TABLE RIDW.F_C_EXEC_RESULT_ITER_METRICS ADD CONSTRAINT F_CEREI_MET_FK8 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  1023. GO
  1024.  
  1025. ALTER TABLE RIDW.F_C_EXEC_WORKITEM_ITER_METRICS ADD CONSTRAINT F_CEWI_MET_FK1 FOREIGN KEY (CONFIGURATION_ID) REFERENCES RIDW.D_CONFIGURATION(CONFIGURATION_ID)
  1026. GO
  1027.  
  1028. ALTER TABLE RIDW.F_C_EXEC_WORKITEM_ITER_METRICS ADD CONSTRAINT F_CEWI_MET_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1029. GO
  1030.  
  1031. ALTER TABLE RIDW.F_C_EXEC_WORKITEM_ITER_METRICS ADD CONSTRAINT F_CEWI_MET_FK4 FOREIGN KEY (EXECWORKIT_CLASS_ID) REFERENCES RIDW.D_EXECWORKITEM_CLASSIFICATION(EXECWORKIT_CLASS_ID)
  1032. GO
  1033.  
  1034. ALTER TABLE RIDW.F_C_EXEC_WORKITEM_ITER_METRICS ADD CONSTRAINT F_CEWI_MET_FK5 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  1035. GO
  1036.  
  1037. ALTER TABLE RIDW.F_C_EXEC_WORKITEM_ITER_METRICS ADD CONSTRAINT F_CEWI_MET_FK6 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  1038. GO
  1039.  
  1040. ALTER TABLE RIDW.F_C_EXEC_WORKITEM_ITER_METRICS ADD CONSTRAINT F_CEWI_MET_FK7 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN(TESTPLAN_ID)
  1041. GO
  1042.  
  1043. ALTER TABLE RIDW.F_C_EXEC_WORKITEM_ITER_METRICS ADD CONSTRAINT F_CEWI_MET_FK8 FOREIGN KEY (VERDICT_ID) REFERENCES RIDW.D_VERDICT(VERDICT_ID)
  1044. GO
  1045.  
  1046. ALTER TABLE RIDW.F_C_EXEC_WORKITEM_REQU_METRICS ADD CONSTRAINT F_CEWIR_MET_FK1 FOREIGN KEY (CONFIGURATION_ID) REFERENCES RIDW.D_CONFIGURATION(CONFIGURATION_ID)
  1047. GO
  1048.  
  1049. ALTER TABLE RIDW.F_C_EXEC_WORKITEM_REQU_METRICS ADD CONSTRAINT F_CEWIR_MET_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1050. GO
  1051.  
  1052. ALTER TABLE RIDW.F_C_EXEC_WORKITEM_REQU_METRICS ADD CONSTRAINT F_CEWIR_MET_FK3 FOREIGN KEY (EXECWORKIT_CLASS_ID) REFERENCES RIDW.D_EXECWORKITEM_CLASSIFICATION(EXECWORKIT_CLASS_ID)
  1053. GO
  1054.  
  1055. ALTER TABLE RIDW.F_C_EXEC_WORKITEM_REQU_METRICS ADD CONSTRAINT F_CEWIR_MET_FK4 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  1056. GO
  1057.  
  1058. ALTER TABLE RIDW.F_C_EXEC_WORKITEM_REQU_METRICS ADD CONSTRAINT F_CEWIR_MET_FK5 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  1059. GO
  1060.  
  1061. ALTER TABLE RIDW.F_C_EXEC_WORKITEM_REQU_METRICS ADD CONSTRAINT F_CEWIR_MET_FK6 FOREIGN KEY (REQUIREMENT_ID) REFERENCES RIDW.D_REQUIREMENT(REQUIREMENT_ID)
  1062. GO
  1063.  
  1064. ALTER TABLE RIDW.F_C_EXEC_WORKITEM_REQU_METRICS ADD CONSTRAINT F_CEWIR_MET_FK7 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN(TESTPLAN_ID)
  1065. GO
  1066.  
  1067. ALTER TABLE RIDW.F_C_EXEC_WORKITEM_REQU_METRICS ADD CONSTRAINT F_CEWIR_MET_FK8 FOREIGN KEY (VERDICT_ID) REFERENCES RIDW.D_VERDICT(VERDICT_ID)
  1068. GO
  1069.  
  1070. ALTER TABLE RIDW.F_C_FILE_STREAM_METRICS ADD CONSTRAINT F_C_FILESTRMET_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  1071. GO
  1072.  
  1073. ALTER TABLE RIDW.F_C_REQUEST_CUST_METRICS ADD CONSTRAINT F_CREQCU_MET_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  1074. GO
  1075.  
  1076. ALTER TABLE RIDW.F_C_REQUEST_CUST_METRICS ADD CONSTRAINT F_CREQCU_MET_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1077. GO
  1078.  
  1079. ALTER TABLE RIDW.F_C_REQUEST_CUST_METRICS ADD CONSTRAINT F_CREQCU_MET_FK3 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  1080. GO
  1081.  
  1082. ALTER TABLE RIDW.F_C_REQUEST_CUST_METRICS ADD CONSTRAINT F_CREQCU_MET_FK4 FOREIGN KEY (PLATFORM_ID) REFERENCES RIDW.D_PLATFORM(PLATFORM_ID)
  1083. GO
  1084.  
  1085. ALTER TABLE RIDW.F_C_REQUEST_CUST_METRICS ADD CONSTRAINT F_CREQCU_MET_FK5 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_REQUEST_PRIORITY(PRIORITY_ID)
  1086. GO
  1087.  
  1088. ALTER TABLE RIDW.F_C_REQUEST_CUST_METRICS ADD CONSTRAINT F_CREQCU_MET_FK6 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  1089. GO
  1090.  
  1091. ALTER TABLE RIDW.F_C_REQUEST_CUST_METRICS ADD CONSTRAINT F_CREQCU_MET_FK7 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  1092. GO
  1093.  
  1094. ALTER TABLE RIDW.F_C_REQUEST_CUST_METRICS ADD CONSTRAINT F_CREQCU_MET_FK8 FOREIGN KEY (REQUEST_CATEGORY_ID) REFERENCES RIDW.D_REQUEST_CATEGORY(REQUEST_CATEGORY_ID)
  1095. GO
  1096.  
  1097. ALTER TABLE RIDW.F_C_REQUEST_CUST_METRICS ADD CONSTRAINT F_CREQCU_MET_FK9 FOREIGN KEY (REQUEST_CLASS_ID) REFERENCES RIDW.D_REQUEST_CLASSIFICATION(REQUEST_CLASS_ID)
  1098. GO
  1099.  
  1100. ALTER TABLE RIDW.F_C_REQUEST_CUST_METRICS ADD CONSTRAINT F_CREQCU_MET_FK11 FOREIGN KEY (REQUEST_TYPE_ID) REFERENCES RIDW.D_REQUEST_TYPE(REQUEST_TYPE_ID)
  1101. GO
  1102.  
  1103. ALTER TABLE RIDW.F_C_REQUEST_CUST_METRICS ADD CONSTRAINT F_CREQCU_MET_FK12 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1104. GO
  1105.  
  1106. ALTER TABLE RIDW.F_C_REQUEST_CUST_METRICS ADD CONSTRAINT F_CREQCU_MET_FK13 FOREIGN KEY (SEVERITY_ID) REFERENCES RIDW.D_REQUEST_SEVERITY(SEVERITY_ID)
  1107. GO
  1108.  
  1109. ALTER TABLE RIDW.F_C_REQUEST_CUST_METRICS ADD CONSTRAINT F_CREQCU_MET_FK14 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_REQUEST_STATE(STATE_ID)
  1110. GO
  1111.  
  1112. ALTER TABLE RIDW.F_C_REQUEST_CUST_METRICS ADD CONSTRAINT F_CREQCU_MET_FK20 FOREIGN KEY (STATUS_ID) REFERENCES RIDW.D_REQUEST_STATUS(STATUS_ID)
  1113. GO
  1114.  
  1115. ALTER TABLE RIDW.F_C_REQUEST_CUST_METRICS ADD CONSTRAINT F_CREQCU_MET_FK21 FOREIGN KEY (TEAM_ID) REFERENCES RIDW.D_TEAM(TEAM_ID)
  1116. GO
  1117.  
  1118. ALTER TABLE RIDW.F_C_REQUEST_CUST_METRICS ADD CONSTRAINT F_CREQCU_MET_FK22 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1119. GO
  1120.  
  1121. ALTER TABLE RIDW.F_C_REQUEST_REQUI_FAIL_METRICS ADD CONSTRAINT F_CREQRQF_MET_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  1122. GO
  1123.  
  1124. ALTER TABLE RIDW.F_C_REQUEST_REQUI_FAIL_METRICS ADD CONSTRAINT F_CREQRQF_MET_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1125. GO
  1126.  
  1127. ALTER TABLE RIDW.F_C_REQUEST_REQUI_FAIL_METRICS ADD CONSTRAINT F_CREQRQF_MET_FK3 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  1128. GO
  1129.  
  1130. ALTER TABLE RIDW.F_C_REQUEST_REQUI_FAIL_METRICS ADD CONSTRAINT F_CREQRQF_MET_FK4 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  1131. GO
  1132.  
  1133. ALTER TABLE RIDW.F_C_REQUEST_REQUI_FAIL_METRICS ADD CONSTRAINT F_CREQRQF_MET_FK5 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  1134. GO
  1135.  
  1136. ALTER TABLE RIDW.F_C_REQUEST_REQUI_FAIL_METRICS ADD CONSTRAINT F_CREQRQF_MET_FK7 FOREIGN KEY (REQUIREMENT_ID) REFERENCES RIDW.D_REQUIREMENT(REQUIREMENT_ID)
  1137. GO
  1138.  
  1139. ALTER TABLE RIDW.F_C_REQUEST_REQUI_FAIL_METRICS ADD CONSTRAINT F_CREQRQF_MET_FK8 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1140. GO
  1141.  
  1142. ALTER TABLE RIDW.F_C_REQUEST_REQUI_METRICS ADD CONSTRAINT F_CREQRQU_MET_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  1143. GO
  1144.  
  1145. ALTER TABLE RIDW.F_C_REQUEST_REQUI_METRICS ADD CONSTRAINT F_CREQRQU_MET_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1146. GO
  1147.  
  1148. ALTER TABLE RIDW.F_C_REQUEST_REQUI_METRICS ADD CONSTRAINT F_CREQRQU_MET_FK3 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  1149. GO
  1150.  
  1151. ALTER TABLE RIDW.F_C_REQUEST_REQUI_METRICS ADD CONSTRAINT F_CREQRQU_MET_FK4 FOREIGN KEY (PLATFORM_ID) REFERENCES RIDW.D_PLATFORM(PLATFORM_ID)
  1152. GO
  1153.  
  1154. ALTER TABLE RIDW.F_C_REQUEST_REQUI_METRICS ADD CONSTRAINT F_CREQRQU_MET_FK5 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_REQUEST_PRIORITY(PRIORITY_ID)
  1155. GO
  1156.  
  1157. ALTER TABLE RIDW.F_C_REQUEST_REQUI_METRICS ADD CONSTRAINT F_CREQRQU_MET_FK6 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  1158. GO
  1159.  
  1160. ALTER TABLE RIDW.F_C_REQUEST_REQUI_METRICS ADD CONSTRAINT F_CREQRQU_MET_FK7 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  1161. GO
  1162.  
  1163. ALTER TABLE RIDW.F_C_REQUEST_REQUI_METRICS ADD CONSTRAINT F_CREQRQU_MET_FK8 FOREIGN KEY (REQUEST_CATEGORY_ID) REFERENCES RIDW.D_REQUEST_CATEGORY(REQUEST_CATEGORY_ID)
  1164. GO
  1165.  
  1166. ALTER TABLE RIDW.F_C_REQUEST_REQUI_METRICS ADD CONSTRAINT F_CREQRQU_MET_FK9 FOREIGN KEY (REQUEST_CLASS_ID) REFERENCES RIDW.D_REQUEST_CLASSIFICATION(REQUEST_CLASS_ID)
  1167. GO
  1168.  
  1169. ALTER TABLE RIDW.F_C_REQUEST_REQUI_METRICS ADD CONSTRAINT F_CREQRQU_MET_FK11 FOREIGN KEY (REQUEST_TYPE_ID) REFERENCES RIDW.D_REQUEST_TYPE(REQUEST_TYPE_ID)
  1170. GO
  1171.  
  1172. ALTER TABLE RIDW.F_C_REQUEST_REQUI_METRICS ADD CONSTRAINT F_CREQRQU_MET_FK12 FOREIGN KEY (REQUIREMENT_ID) REFERENCES RIDW.D_REQUIREMENT(REQUIREMENT_ID)
  1173. GO
  1174.  
  1175. ALTER TABLE RIDW.F_C_REQUEST_REQUI_METRICS ADD CONSTRAINT F_CREQRQU_MET_FK13 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1176. GO
  1177.  
  1178. ALTER TABLE RIDW.F_C_REQUEST_REQUI_METRICS ADD CONSTRAINT F_CREQRQU_MET_FK14 FOREIGN KEY (SEVERITY_ID) REFERENCES RIDW.D_REQUEST_SEVERITY(SEVERITY_ID)
  1179. GO
  1180.  
  1181. ALTER TABLE RIDW.F_C_REQUEST_REQUI_METRICS ADD CONSTRAINT F_CREQRQU_MET_FK15 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_REQUEST_STATE(STATE_ID)
  1182. GO
  1183.  
  1184. ALTER TABLE RIDW.F_C_REQUEST_REQUI_METRICS ADD CONSTRAINT F_CREQRQU_MET_FK21 FOREIGN KEY (STATUS_ID) REFERENCES RIDW.D_REQUEST_STATUS(STATUS_ID)
  1185. GO
  1186.  
  1187. ALTER TABLE RIDW.F_C_REQUEST_REQUI_METRICS ADD CONSTRAINT F_CREQRQU_MET_FK22 FOREIGN KEY (TEAM_ID) REFERENCES RIDW.D_TEAM(TEAM_ID)
  1188. GO
  1189.  
  1190. ALTER TABLE RIDW.F_C_REQUEST_REQUI_METRICS ADD CONSTRAINT F_CREQRQU_MET_FK23 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1191. GO
  1192.  
  1193. ALTER TABLE RIDW.F_C_REQUEST_TPLN_AGING ADD CONSTRAINT F_C_REQTPLN_AG_FK2 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  1194. GO
  1195.  
  1196. ALTER TABLE RIDW.F_C_REQUEST_TPLN_AGING ADD CONSTRAINT F_C_REQTPLN_AG_FK3 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1197. GO
  1198.  
  1199. ALTER TABLE RIDW.F_C_REQUEST_TPLN_AGING ADD CONSTRAINT F_C_REQTPLN_AG_FK4 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  1200. GO
  1201.  
  1202. ALTER TABLE RIDW.F_C_REQUEST_TPLN_AGING ADD CONSTRAINT F_C_REQTPLN_AG_FK5 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_REQUEST_PRIORITY(PRIORITY_ID)
  1203. GO
  1204.  
  1205. ALTER TABLE RIDW.F_C_REQUEST_TPLN_AGING ADD CONSTRAINT F_C_REQTPLN_AG_FK6 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  1206. GO
  1207.  
  1208. ALTER TABLE RIDW.F_C_REQUEST_TPLN_AGING ADD CONSTRAINT F_C_REQTPLN_AG_FK7 FOREIGN KEY (REQUEST_CLASS_ID) REFERENCES RIDW.D_REQUEST_CLASSIFICATION(REQUEST_CLASS_ID)
  1209. GO
  1210.  
  1211. ALTER TABLE RIDW.F_C_REQUEST_TPLN_AGING ADD CONSTRAINT F_C_REQTPLN_AG_FK8 FOREIGN KEY (REQUEST_TYPE_ID) REFERENCES RIDW.D_REQUEST_TYPE(REQUEST_TYPE_ID)
  1212. GO
  1213.  
  1214. ALTER TABLE RIDW.F_C_REQUEST_TPLN_AGING ADD CONSTRAINT F_C_REQTPLN_AG_FK9 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1215. GO
  1216.  
  1217. ALTER TABLE RIDW.F_C_REQUEST_TPLN_AGING ADD CONSTRAINT F_C_REQTPLN_AG_FK10 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1218. GO
  1219.  
  1220. ALTER TABLE RIDW.F_C_REQUEST_TPLN_AGING ADD CONSTRAINT F_CREQTPLN_AG_FK10 FOREIGN KEY (SEVERITY_ID) REFERENCES RIDW.D_REQUEST_SEVERITY(SEVERITY_ID)
  1221. GO
  1222.  
  1223. ALTER TABLE RIDW.F_C_REQUEST_TPLN_AGING ADD CONSTRAINT F_CREQTPLN_AG_FK11 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_REQUEST_STATE(STATE_ID)
  1224. GO
  1225.  
  1226. ALTER TABLE RIDW.F_C_REQUEST_TPLN_AGING ADD CONSTRAINT F_CREQTPLN_AG_FK17 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN(TESTPLAN_ID)
  1227. GO
  1228.  
  1229. ALTER TABLE RIDW.F_C_REQUEST_TPLN_FAIL_METRICS ADD CONSTRAINT F_CREQTPF_MET_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  1230. GO
  1231.  
  1232. ALTER TABLE RIDW.F_C_REQUEST_TPLN_FAIL_METRICS ADD CONSTRAINT F_CREQTPF_MET_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1233. GO
  1234.  
  1235. ALTER TABLE RIDW.F_C_REQUEST_TPLN_FAIL_METRICS ADD CONSTRAINT F_CREQTPF_MET_FK3 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  1236. GO
  1237.  
  1238. ALTER TABLE RIDW.F_C_REQUEST_TPLN_FAIL_METRICS ADD CONSTRAINT F_CREQTPF_MET_FK4 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  1239. GO
  1240.  
  1241. ALTER TABLE RIDW.F_C_REQUEST_TPLN_FAIL_METRICS ADD CONSTRAINT F_CREQTPF_MET_FK5 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  1242. GO
  1243.  
  1244. ALTER TABLE RIDW.F_C_REQUEST_TPLN_FAIL_METRICS ADD CONSTRAINT F_CREQTPF_MET_FK7 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN(TESTPLAN_ID)
  1245. GO
  1246.  
  1247. ALTER TABLE RIDW.F_C_REQUEST_TPLN_FAIL_METRICS ADD CONSTRAINT F_CREQTPF_MET_FK8 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1248. GO
  1249.  
  1250. ALTER TABLE RIDW.F_C_REQUEST_TPLN_METRICS ADD CONSTRAINT F_CREQTP_MET_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  1251. GO
  1252.  
  1253. ALTER TABLE RIDW.F_C_REQUEST_TPLN_METRICS ADD CONSTRAINT F_CREQTP_MET_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1254. GO
  1255.  
  1256. ALTER TABLE RIDW.F_C_REQUEST_TPLN_METRICS ADD CONSTRAINT F_CREQTP_MET_FK3 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  1257. GO
  1258.  
  1259. ALTER TABLE RIDW.F_C_REQUEST_TPLN_METRICS ADD CONSTRAINT F_CREQTP_MET_FK4 FOREIGN KEY (PLATFORM_ID) REFERENCES RIDW.D_PLATFORM(PLATFORM_ID)
  1260. GO
  1261.  
  1262. ALTER TABLE RIDW.F_C_REQUEST_TPLN_METRICS ADD CONSTRAINT F_CREQTP_MET_FK5 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_REQUEST_PRIORITY(PRIORITY_ID)
  1263. GO
  1264.  
  1265. ALTER TABLE RIDW.F_C_REQUEST_TPLN_METRICS ADD CONSTRAINT F_CREQTP_MET_FK6 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  1266. GO
  1267.  
  1268. ALTER TABLE RIDW.F_C_REQUEST_TPLN_METRICS ADD CONSTRAINT F_CREQTP_MET_FK7 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  1269. GO
  1270.  
  1271. ALTER TABLE RIDW.F_C_REQUEST_TPLN_METRICS ADD CONSTRAINT F_CREQTP_MET_FK8 FOREIGN KEY (REQUEST_CATEGORY_ID) REFERENCES RIDW.D_REQUEST_CATEGORY(REQUEST_CATEGORY_ID)
  1272. GO
  1273.  
  1274. ALTER TABLE RIDW.F_C_REQUEST_TPLN_METRICS ADD CONSTRAINT F_CREQTP_MET_FK9 FOREIGN KEY (REQUEST_CLASS_ID) REFERENCES RIDW.D_REQUEST_CLASSIFICATION(REQUEST_CLASS_ID)
  1275. GO
  1276.  
  1277. ALTER TABLE RIDW.F_C_REQUEST_TPLN_METRICS ADD CONSTRAINT F_CREQTP_MET_FK11 FOREIGN KEY (REQUEST_TYPE_ID) REFERENCES RIDW.D_REQUEST_TYPE(REQUEST_TYPE_ID)
  1278. GO
  1279.  
  1280. ALTER TABLE RIDW.F_C_REQUEST_TPLN_METRICS ADD CONSTRAINT F_CREQTP_MET_FK13 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1281. GO
  1282.  
  1283. ALTER TABLE RIDW.F_C_REQUEST_TPLN_METRICS ADD CONSTRAINT F_CREQTP_MET_FK14 FOREIGN KEY (SEVERITY_ID) REFERENCES RIDW.D_REQUEST_SEVERITY(SEVERITY_ID)
  1284. GO
  1285.  
  1286. ALTER TABLE RIDW.F_C_REQUEST_TPLN_METRICS ADD CONSTRAINT F_CREQTP_MET_FK15 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_REQUEST_STATE(STATE_ID)
  1287. GO
  1288.  
  1289. ALTER TABLE RIDW.F_C_REQUEST_TPLN_METRICS ADD CONSTRAINT F_CREQTP_MET_FK21 FOREIGN KEY (STATUS_ID) REFERENCES RIDW.D_REQUEST_STATUS(STATUS_ID)
  1290. GO
  1291.  
  1292. ALTER TABLE RIDW.F_C_REQUEST_TPLN_METRICS ADD CONSTRAINT F_CREQTP_MET_FK22 FOREIGN KEY (TEAM_ID) REFERENCES RIDW.D_TEAM(TEAM_ID)
  1293. GO
  1294.  
  1295. ALTER TABLE RIDW.F_C_REQUEST_TPLN_METRICS ADD CONSTRAINT F_CREQTP_MET_FK23 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN(TESTPLAN_ID)
  1296. GO
  1297.  
  1298. ALTER TABLE RIDW.F_C_REQUEST_TPLN_METRICS ADD CONSTRAINT F_CREQTP_MET_FK24 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1299. GO
  1300.  
  1301. ALTER TABLE RIDW.F_C_REQUEST_TPLN_TURNAROUND ADD CONSTRAINT F_CREQTPT_MET_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  1302. GO
  1303.  
  1304. ALTER TABLE RIDW.F_C_REQUEST_TPLN_TURNAROUND ADD CONSTRAINT F_CREQTPT_MET_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1305. GO
  1306.  
  1307. ALTER TABLE RIDW.F_C_REQUEST_TPLN_TURNAROUND ADD CONSTRAINT F_CREQTPT_MET_FK3 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  1308. GO
  1309.  
  1310. ALTER TABLE RIDW.F_C_REQUEST_TPLN_TURNAROUND ADD CONSTRAINT F_CREQTPT_MET_FK4 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_REQUEST_PRIORITY(PRIORITY_ID)
  1311. GO
  1312.  
  1313. ALTER TABLE RIDW.F_C_REQUEST_TPLN_TURNAROUND ADD CONSTRAINT F_CREQTPT_MET_FK5 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  1314. GO
  1315.  
  1316. ALTER TABLE RIDW.F_C_REQUEST_TPLN_TURNAROUND ADD CONSTRAINT F_CREQTPT_MET_FK6 FOREIGN KEY (REQUEST_CLASS_ID) REFERENCES RIDW.D_REQUEST_CLASSIFICATION(REQUEST_CLASS_ID)
  1317. GO
  1318.  
  1319. ALTER TABLE RIDW.F_C_REQUEST_TPLN_TURNAROUND ADD CONSTRAINT F_CREQTPT_MET_FK7 FOREIGN KEY (REQUEST_TYPE_ID) REFERENCES RIDW.D_REQUEST_TYPE(REQUEST_TYPE_ID)
  1320. GO
  1321.  
  1322. ALTER TABLE RIDW.F_C_REQUEST_TPLN_TURNAROUND ADD CONSTRAINT F_CREQTPT_MET_FK8 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1323. GO
  1324.  
  1325. ALTER TABLE RIDW.F_C_REQUEST_TPLN_TURNAROUND ADD CONSTRAINT F_CREQTPT_MET_FK9 FOREIGN KEY (SEVERITY_ID) REFERENCES RIDW.D_REQUEST_SEVERITY(SEVERITY_ID)
  1326. GO
  1327.  
  1328. ALTER TABLE RIDW.F_C_REQUEST_TPLN_TURNAROUND ADD CONSTRAINT F_CREQTPT_MET_FK10 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN (TESTPLAN_ID)
  1329. GO
  1330.  
  1331. ALTER TABLE RIDW.F_C_REQUEST_TPLN_TURNAROUND ADD CONSTRAINT F_CREQTPT_MET_FK11 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1332. GO
  1333.  
  1334. ALTER TABLE RIDW.F_C_REQUIREMENT_METRICS ADD CONSTRAINT F_C_REQU_MET_FK1 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  1335. GO
  1336.  
  1337. ALTER TABLE RIDW.F_C_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_CREQUTP_MET_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  1338. GO
  1339.  
  1340. ALTER TABLE RIDW.F_C_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_CREQUTP_MET_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1341. GO
  1342.  
  1343. ALTER TABLE RIDW.F_C_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_CREQUTP_MET_FK3 FOREIGN KEY (DIFFICULTY_ID) REFERENCES RIDW.D_DIFFICULTY(DIFFICULTY_ID)
  1344. GO
  1345.  
  1346. ALTER TABLE RIDW.F_C_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_CREQUTP_MET_FK4 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  1347. GO
  1348.  
  1349. ALTER TABLE RIDW.F_C_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_CREQUTP_MET_FK5 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_PRIORITY(PRIORITY_ID)
  1350. GO
  1351.  
  1352. ALTER TABLE RIDW.F_C_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_CREQUTP_MET_FK6 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  1353. GO
  1354.  
  1355. ALTER TABLE RIDW.F_C_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_CREQUTP_MET_FK7 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  1356. GO
  1357.  
  1358. ALTER TABLE RIDW.F_C_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_CREQUTP_MET_FK8 FOREIGN KEY (REQUIREMENT_CLASS_ID) REFERENCES RIDW.D_REQUIREMENT_CLASSIFICATION(REQUIREMENT_CLASS_ID)
  1359. GO
  1360.  
  1361. ALTER TABLE RIDW.F_C_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_CREQUTP_MET_FK10 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1362. GO
  1363.  
  1364. ALTER TABLE RIDW.F_C_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_CREQUTP_MET_FK11 FOREIGN KEY (STABILITY_ID) REFERENCES RIDW.D_STABILITY(STABILITY_ID)
  1365. GO
  1366.  
  1367. ALTER TABLE RIDW.F_C_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_CREQUTP_MET_FK12 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_REQUIREMENT_STATE(STATE_ID)
  1368. GO
  1369.  
  1370. ALTER TABLE RIDW.F_C_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_CREQUTP_MET_FK18 FOREIGN KEY (STATUS_ID) REFERENCES RIDW.D_STATUS(STATUS_ID)
  1371. GO
  1372.  
  1373. ALTER TABLE RIDW.F_C_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_CREQUTP_MET_FK19 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN(TESTPLAN_ID)
  1374. GO
  1375.  
  1376. ALTER TABLE RIDW.F_C_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_CREQUTP_MET_FK20 FOREIGN KEY (REQUIREMENT_TYPE_ID) REFERENCES RIDW.D_REQUIREMENT_TYPE (REQUIREMENT_TYPE_ID)
  1377. GO
  1378.  
  1379. ALTER TABLE RIDW.F_C_REQUI_TCASE_METRICS ADD CONSTRAINT F_CREQTC_MET_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  1380. GO
  1381.  
  1382. ALTER TABLE RIDW.F_C_REQUI_TCASE_METRICS ADD CONSTRAINT F_CREQTC_MET_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1383. GO
  1384.  
  1385. ALTER TABLE RIDW.F_C_REQUI_TCASE_METRICS ADD CONSTRAINT F_CREQTC_MET_FK3 FOREIGN KEY (DIFFICULTY_ID) REFERENCES RIDW.D_DIFFICULTY(DIFFICULTY_ID)
  1386. GO
  1387.  
  1388. ALTER TABLE RIDW.F_C_REQUI_TCASE_METRICS ADD CONSTRAINT F_CREQTC_MET_FK4 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  1389. GO
  1390.  
  1391. ALTER TABLE RIDW.F_C_REQUI_TCASE_METRICS ADD CONSTRAINT F_CREQTC_MET_FK5 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_PRIORITY(PRIORITY_ID)
  1392. GO
  1393.  
  1394. ALTER TABLE RIDW.F_C_REQUI_TCASE_METRICS ADD CONSTRAINT F_CREQTC_MET_FK6 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  1395. GO
  1396.  
  1397. ALTER TABLE RIDW.F_C_REQUI_TCASE_METRICS ADD CONSTRAINT F_CREQTC_MET_FK7 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  1398. GO
  1399.  
  1400. ALTER TABLE RIDW.F_C_REQUI_TCASE_METRICS ADD CONSTRAINT F_CREQTC_MET_FK8 FOREIGN KEY (REQUIREMENT_CLASS_ID) REFERENCES RIDW.D_REQUIREMENT_CLASSIFICATION(REQUIREMENT_CLASS_ID)
  1401. GO
  1402.  
  1403. ALTER TABLE RIDW.F_C_REQUI_TCASE_METRICS ADD CONSTRAINT F_CREQTC_MET_FK10 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1404. GO
  1405.  
  1406. ALTER TABLE RIDW.F_C_REQUI_TCASE_METRICS ADD CONSTRAINT F_CREQTC_MET_FK11 FOREIGN KEY (STABILITY_ID) REFERENCES RIDW.D_STABILITY(STABILITY_ID)
  1407. GO
  1408.  
  1409. ALTER TABLE RIDW.F_C_REQUI_TCASE_METRICS ADD CONSTRAINT F_CREQTC_MET_FK12 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_REQUIREMENT_STATE(STATE_ID)
  1410. GO
  1411.  
  1412. ALTER TABLE RIDW.F_C_REQUI_TCASE_METRICS ADD CONSTRAINT F_CREQTC_MET_FK18 FOREIGN KEY (STATUS_ID) REFERENCES RIDW.D_STATUS(STATUS_ID)
  1413. GO
  1414.  
  1415. ALTER TABLE RIDW.F_C_REQUI_TCASE_METRICS ADD CONSTRAINT F_CREQTC_MET_FK19 FOREIGN KEY (TESTCASE_ID) REFERENCES RIDW.D_TESTCASE(TESTCASE_ID)
  1416. GO
  1417.  
  1418. ALTER TABLE RIDW.F_C_REQUI_TCASE_METRICS ADD CONSTRAINT F_CREQTC_MET_FK20 FOREIGN KEY (REQUIREMENT_TYPE_ID) REFERENCES RIDW.D_REQUIREMENT_TYPE (REQUIREMENT_TYPE_ID)
  1419. GO
  1420.  
  1421. ALTER TABLE RIDW.F_C_TASK_COMP_METRICS ADD CONSTRAINT F_CTKCM_MET_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  1422. GO
  1423.  
  1424. ALTER TABLE RIDW.F_C_TASK_COMP_METRICS ADD CONSTRAINT F_CTKCM_MET_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1425. GO
  1426.  
  1427. ALTER TABLE RIDW.F_C_TASK_COMP_METRICS ADD CONSTRAINT F_CTKCM_MET_FK3 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  1428. GO
  1429.  
  1430. ALTER TABLE RIDW.F_C_TASK_COMP_METRICS ADD CONSTRAINT F_CTKCM_MET_FK4 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_PRIORITY(PRIORITY_ID)
  1431. GO
  1432.  
  1433. ALTER TABLE RIDW.F_C_TASK_COMP_METRICS ADD CONSTRAINT F_CTKCM_MET_FK5 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  1434. GO
  1435.  
  1436. ALTER TABLE RIDW.F_C_TASK_COMP_METRICS ADD CONSTRAINT F_CTKCM_MET_FK6 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1437. GO
  1438.  
  1439. ALTER TABLE RIDW.F_C_TASK_COMP_METRICS ADD CONSTRAINT F_CTKCM_MET_FK7 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_TASK_STATE(STATE_ID)
  1440. GO
  1441.  
  1442. ALTER TABLE RIDW.F_C_TASK_COMP_METRICS ADD CONSTRAINT F_CTKCM_MET_FK13 FOREIGN KEY (TASK_CLASS_ID) REFERENCES RIDW.D_TASK_CLASSIFICATION(TASK_CLASS_ID)
  1443. GO
  1444.  
  1445. ALTER TABLE RIDW.F_C_TASK_COMP_METRICS ADD CONSTRAINT F_CTKCM_MET_FK15 FOREIGN KEY (TASK_TYPE_ID) REFERENCES RIDW.D_TASK_TYPE(TASK_TYPE_ID)
  1446. GO
  1447.  
  1448. ALTER TABLE RIDW.F_C_TESTCASE_ITER_METRICS ADD CONSTRAINT F_CTSI_MET_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1449. GO
  1450.  
  1451. ALTER TABLE RIDW.F_C_TESTCASE_ITER_METRICS ADD CONSTRAINT F_CTSI_MET_FK2 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  1452. GO
  1453.  
  1454. ALTER TABLE RIDW.F_C_TESTCASE_ITER_METRICS ADD CONSTRAINT F_CTSI_MET_FK3 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_TESTCASE_STATE(STATE_ID)
  1455. GO
  1456.  
  1457. ALTER TABLE RIDW.F_C_TESTCASE_ITER_METRICS ADD CONSTRAINT F_CTSI_MET_FK9 FOREIGN KEY (TESTCASE_CLASS_ID) REFERENCES RIDW.D_TESTCASE_CLASSIFICATION(TESTCASE_CLASS_ID)
  1458. GO
  1459.  
  1460. ALTER TABLE RIDW.F_C_TESTCASE_ITER_METRICS ADD CONSTRAINT F_CTSI_MET_FK10 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN(TESTPLAN_ID)
  1461. GO
  1462.  
  1463. ALTER TABLE RIDW.F_C_TESTCASE_ITER_METRICS ADD CONSTRAINT F_CTSI_MET_FK11 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  1464. GO
  1465.  
  1466. ALTER TABLE RIDW.F_C_TESTCASE_REQUI_METRICS ADD CONSTRAINT F_CTPJR_MET_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1467. GO
  1468.  
  1469. ALTER TABLE RIDW.F_C_TESTCASE_REQUI_METRICS ADD CONSTRAINT F_CTPJR_MET_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  1470. GO
  1471.  
  1472. ALTER TABLE RIDW.F_C_TESTCASE_REQUI_METRICS ADD CONSTRAINT F_CTPJR_MET_FK3 FOREIGN KEY (REQUIREMENT_ID) REFERENCES RIDW.D_REQUIREMENT(REQUIREMENT_ID)
  1473. GO
  1474.  
  1475. ALTER TABLE RIDW.F_C_TESTCASE_REQUI_METRICS ADD CONSTRAINT F_CTPJR_MET_FK4 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_TESTCASE_STATE(STATE_ID)
  1476. GO
  1477.  
  1478. ALTER TABLE RIDW.F_C_TESTCASE_REQUI_METRICS ADD CONSTRAINT F_CTPJR_MET_FK10 FOREIGN KEY (TESTCASE_CLASS_ID) REFERENCES RIDW.D_TESTCASE_CLASSIFICATION(TESTCASE_CLASS_ID)
  1479. GO
  1480.  
  1481. ALTER TABLE RIDW.F_C_TESTCASE_REQUI_METRICS ADD CONSTRAINT F_CTPJR_MET_FK11 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN(TESTPLAN_ID)
  1482. GO
  1483.  
  1484. ALTER TABLE RIDW.F_C_TEXT_FILE_VERSION_METRICS ADD CONSTRAINT F_CTXFV_MET_FK1 FOREIGN KEY (ACTIVITY_ID) REFERENCES RIDW.D_ACTIVITY(ACTIVITY_ID)
  1485. GO
  1486.  
  1487. ALTER TABLE RIDW.F_C_TEXT_FILE_VERSION_METRICS ADD CONSTRAINT F_CTXFV_MET_FK2 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  1488. GO
  1489.  
  1490. ALTER TABLE RIDW.F_C_TEXT_FILE_VERSION_METRICS ADD CONSTRAINT F_CTXFV_MET_FK3 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1491. GO
  1492.  
  1493. ALTER TABLE RIDW.F_C_TEXT_FILE_VERSION_METRICS ADD CONSTRAINT F_CTXFV_MET_FK5 FOREIGN KEY (FILE_CLASS_ID) REFERENCES RIDW.D_FILE_CLASSIFICATION(FILE_CLASS_ID)
  1494. GO
  1495.  
  1496. ALTER TABLE RIDW.F_C_TEXT_FILE_VERSION_METRICS ADD CONSTRAINT F_CTXFV_MET_FK6 FOREIGN KEY (FILE_ID) REFERENCES RIDW.D_FILE(FILE_ID)
  1497. GO
  1498.  
  1499. ALTER TABLE RIDW.F_C_TEXT_FILE_VERSION_METRICS ADD CONSTRAINT F_CTXFV_MET_FK7 FOREIGN KEY (FILE_STREAM_ID) REFERENCES RIDW.D_FILE_STREAM(FILE_STREAM_ID)
  1500. GO
  1501.  
  1502. ALTER TABLE RIDW.F_C_TEXT_FILE_VERSION_METRICS ADD CONSTRAINT F_CTXFV_MET_FK8 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  1503. GO
  1504.  
  1505. ALTER TABLE RIDW.F_C_TEXT_FILE_VERSION_METRICS ADD CONSTRAINT F_CTXFV_MET_FK9 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1506. GO
  1507.  
  1508. ALTER TABLE RIDW.F_C_TEXT_FILE_VER_REQU_METRICS ADD CONSTRAINT F_CTXFVR_MET_FK1 FOREIGN KEY (ACTIVITY_ID) REFERENCES RIDW.D_ACTIVITY(ACTIVITY_ID)
  1509. GO
  1510.  
  1511. ALTER TABLE RIDW.F_C_TEXT_FILE_VER_REQU_METRICS ADD CONSTRAINT F_CTXFVR_MET_FK2 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  1512. GO
  1513.  
  1514. ALTER TABLE RIDW.F_C_TEXT_FILE_VER_REQU_METRICS ADD CONSTRAINT F_CTXFVR_MET_FK3 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1515. GO
  1516.  
  1517. ALTER TABLE RIDW.F_C_TEXT_FILE_VER_REQU_METRICS ADD CONSTRAINT F_CTXFVR_MET_FK5 FOREIGN KEY (FILE_CLASS_ID) REFERENCES RIDW.D_FILE_CLASSIFICATION(FILE_CLASS_ID)
  1518. GO
  1519.  
  1520. ALTER TABLE RIDW.F_C_TEXT_FILE_VER_REQU_METRICS ADD CONSTRAINT F_CTXFVR_MET_FK6 FOREIGN KEY (FILE_ID) REFERENCES RIDW.D_FILE(FILE_ID)
  1521. GO
  1522.  
  1523. ALTER TABLE RIDW.F_C_TEXT_FILE_VER_REQU_METRICS ADD CONSTRAINT F_CTXFVR_MET_FK7 FOREIGN KEY (FILE_STREAM_ID) REFERENCES RIDW.D_FILE_STREAM(FILE_STREAM_ID)
  1524. GO
  1525.  
  1526. ALTER TABLE RIDW.F_C_TEXT_FILE_VER_REQU_METRICS ADD CONSTRAINT F_CTXFVR_MET_FK8 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  1527. GO
  1528.  
  1529. ALTER TABLE RIDW.F_C_TEXT_FILE_VER_REQU_METRICS ADD CONSTRAINT F_CTXFVR_MET_FK9 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST(REQUEST_ID)
  1530. GO
  1531.  
  1532. ALTER TABLE RIDW.F_C_TEXT_FILE_VER_REQU_METRICS ADD CONSTRAINT F_CTXFVR_MET_FK10 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1533. GO
  1534.  
  1535. ALTER TABLE RIDW.F_EXECRESPOINTS_ITER_METRICS ADD CONSTRAINT F_EXPI_MET_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1536. GO
  1537.  
  1538. ALTER TABLE RIDW.F_EXECRESPOINTS_ITER_METRICS ADD CONSTRAINT F_EXPI_MET_FK2 FOREIGN KEY (EXECRES_CLASS_ID) REFERENCES RIDW.D_EXECRESULT_CLASSIFICATION(EXECRES_CLASS_ID)
  1539. GO
  1540.  
  1541. ALTER TABLE RIDW.F_EXECRESPOINTS_ITER_METRICS ADD CONSTRAINT F_EXPI_MET_FK4 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  1542. GO
  1543.  
  1544. ALTER TABLE RIDW.F_EXECRESPOINTS_ITER_METRICS ADD CONSTRAINT F_EXPI_MET_FK5 FOREIGN KEY (TESTCASE_ID) REFERENCES RIDW.D_TESTCASE(TESTCASE_ID)
  1545. GO
  1546.  
  1547. ALTER TABLE RIDW.F_EXECRESPOINTS_ITER_METRICS ADD CONSTRAINT F_EXPI_MET_FK6 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN(TESTPLAN_ID)
  1548. GO
  1549.  
  1550. ALTER TABLE RIDW.F_EXECRESPOINTS_ITER_METRICS ADD CONSTRAINT F_EXPI_MET_FK7 FOREIGN KEY (VERDICT_ID) REFERENCES RIDW.D_VERDICT(VERDICT_ID)
  1551. GO
  1552.  
  1553. ALTER TABLE RIDW.F_EXECRESPOINTS_ITER_METRICS ADD CONSTRAINT F_EXPI_MET_FK8 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  1554. GO
  1555.  
  1556. ALTER TABLE RIDW.F_EXECUTION_RES_ITER_METRICS ADD CONSTRAINT F_ERI_MET_FK1 FOREIGN KEY (ASSETREGISTRY_ID) REFERENCES RIDW.D_ASSETREGISTRY(ASSETREGISTRY_ID)
  1557. GO
  1558.  
  1559. ALTER TABLE RIDW.F_EXECUTION_RES_ITER_METRICS ADD CONSTRAINT F_ERI_MET_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1560. GO
  1561.  
  1562. ALTER TABLE RIDW.F_EXECUTION_RES_ITER_METRICS ADD CONSTRAINT F_ERI_MET_FK3 FOREIGN KEY (EXECRES_CLASS_ID) REFERENCES RIDW.D_EXECRESULT_CLASSIFICATION(EXECRES_CLASS_ID)
  1563. GO
  1564.  
  1565. ALTER TABLE RIDW.F_EXECUTION_RES_ITER_METRICS ADD CONSTRAINT F_ERI_MET_FK4 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  1566. GO
  1567.  
  1568. ALTER TABLE RIDW.F_EXECUTION_RES_ITER_METRICS ADD CONSTRAINT F_ERI_MET_FK5 FOREIGN KEY (TESTCASE_ID) REFERENCES RIDW.D_TESTCASE(TESTCASE_ID)
  1569. GO
  1570.  
  1571. ALTER TABLE RIDW.F_EXECUTION_RES_ITER_METRICS ADD CONSTRAINT F_ERI_MET_FK6 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN(TESTPLAN_ID)
  1572. GO
  1573.  
  1574. ALTER TABLE RIDW.F_EXECUTION_RES_ITER_METRICS ADD CONSTRAINT F_ERI_MET_FK7 FOREIGN KEY (VERDICT_ID) REFERENCES RIDW.D_VERDICT(VERDICT_ID)
  1575. GO
  1576.  
  1577. ALTER TABLE RIDW.F_EXECUTION_RES_ITER_METRICS ADD CONSTRAINT F_ERI_MET_FK8 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  1578. GO
  1579.  
  1580. ALTER TABLE RIDW.F_EXEC_WORKITEM_ITER_METRICS ADD CONSTRAINT F_EWI_MET_FK1 FOREIGN KEY (CONFIGURATION_ID) REFERENCES RIDW.D_CONFIGURATION(CONFIGURATION_ID)
  1581. GO
  1582.  
  1583. ALTER TABLE RIDW.F_EXEC_WORKITEM_ITER_METRICS ADD CONSTRAINT F_EWI_MET_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1584. GO
  1585.  
  1586. ALTER TABLE RIDW.F_EXEC_WORKITEM_ITER_METRICS ADD CONSTRAINT F_EWI_MET_FK3 FOREIGN KEY (EXECWORKIT_CLASS_ID) REFERENCES RIDW.D_EXECWORKITEM_CLASSIFICATION(EXECWORKIT_CLASS_ID)
  1587. GO
  1588.  
  1589. ALTER TABLE RIDW.F_EXEC_WORKITEM_ITER_METRICS ADD CONSTRAINT F_EWI_MET_FK4 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  1590. GO
  1591.  
  1592. ALTER TABLE RIDW.F_EXEC_WORKITEM_ITER_METRICS ADD CONSTRAINT F_EWI_MET_FK5 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  1593. GO
  1594.  
  1595. ALTER TABLE RIDW.F_EXEC_WORKITEM_ITER_METRICS ADD CONSTRAINT F_EWI_MET_FK6 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN(TESTPLAN_ID)
  1596. GO
  1597.  
  1598. ALTER TABLE RIDW.F_EXEC_WORKITEM_ITER_METRICS ADD CONSTRAINT F_EWI_MET_FK7 FOREIGN KEY (VERDICT_ID) REFERENCES RIDW.D_VERDICT(VERDICT_ID)
  1599. GO
  1600.  
  1601. ALTER TABLE RIDW.F_EXEC_WORKITEM_REQU_METRICS ADD CONSTRAINT F_EWR_MET_FK1 FOREIGN KEY (CONFIGURATION_ID) REFERENCES RIDW.D_CONFIGURATION(CONFIGURATION_ID)
  1602. GO
  1603.  
  1604. ALTER TABLE RIDW.F_EXEC_WORKITEM_REQU_METRICS ADD CONSTRAINT F_EWR_MET_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1605. GO
  1606.  
  1607. ALTER TABLE RIDW.F_EXEC_WORKITEM_REQU_METRICS ADD CONSTRAINT F_EWR_MET_FK3 FOREIGN KEY (EXECWORKIT_CLASS_ID) REFERENCES RIDW.D_EXECWORKITEM_CLASSIFICATION(EXECWORKIT_CLASS_ID)
  1608. GO
  1609.  
  1610. ALTER TABLE RIDW.F_EXEC_WORKITEM_REQU_METRICS ADD CONSTRAINT F_EWR_MET_FK4 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  1611. GO
  1612.  
  1613. ALTER TABLE RIDW.F_EXEC_WORKITEM_REQU_METRICS ADD CONSTRAINT F_EWR_MET_FK5 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  1614. GO
  1615.  
  1616. ALTER TABLE RIDW.F_EXEC_WORKITEM_REQU_METRICS ADD CONSTRAINT F_EWR_MET_FK6 FOREIGN KEY (REQUIREMENT_ID) REFERENCES RIDW.D_REQUIREMENT(REQUIREMENT_ID)
  1617. GO
  1618.  
  1619. ALTER TABLE RIDW.F_EXEC_WORKITEM_REQU_METRICS ADD CONSTRAINT F_EWR_MET_FK7 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN(TESTPLAN_ID)
  1620. GO
  1621.  
  1622. ALTER TABLE RIDW.F_EXEC_WORKITEM_REQU_METRICS ADD CONSTRAINT F_EWR_MET_FK8 FOREIGN KEY (VERDICT_ID) REFERENCES RIDW.D_VERDICT(VERDICT_ID)
  1623. GO
  1624.  
  1625. ALTER TABLE RIDW.F_FILE_STREAM_METRICS ADD CONSTRAINT F_FSTR_MET_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  1626. GO
  1627.  
  1628. ALTER TABLE RIDW.F_REQUEST_CLOSURE_DATE_METRICS ADD CONSTRAINT F_RCLDT_MET_FK1 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  1629. GO
  1630.  
  1631. ALTER TABLE RIDW.F_REQUEST_CUST_METRICS ADD CONSTRAINT F_REQCUST_MET_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  1632. GO
  1633.  
  1634. ALTER TABLE RIDW.F_REQUEST_CUST_METRICS ADD CONSTRAINT F_REQCUST_MET_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1635. GO
  1636.  
  1637. ALTER TABLE RIDW.F_REQUEST_CUST_METRICS ADD CONSTRAINT F_REQCUST_MET_FK3 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  1638. GO
  1639.  
  1640. ALTER TABLE RIDW.F_REQUEST_CUST_METRICS ADD CONSTRAINT F_REQCUST_MET_FK4 FOREIGN KEY (PLATFORM_ID) REFERENCES RIDW.D_PLATFORM(PLATFORM_ID)
  1641. GO
  1642.  
  1643. ALTER TABLE RIDW.F_REQUEST_CUST_METRICS ADD CONSTRAINT F_REQCUST_MET_FK5 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_REQUEST_PRIORITY(PRIORITY_ID)
  1644. GO
  1645.  
  1646. ALTER TABLE RIDW.F_REQUEST_CUST_METRICS ADD CONSTRAINT F_REQCUST_MET_FK6 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  1647. GO
  1648.  
  1649. ALTER TABLE RIDW.F_REQUEST_CUST_METRICS ADD CONSTRAINT F_REQCUST_MET_FK7 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  1650. GO
  1651.  
  1652. ALTER TABLE RIDW.F_REQUEST_CUST_METRICS ADD CONSTRAINT F_REQCUST_MET_FK8 FOREIGN KEY (REQUEST_CATEGORY_ID) REFERENCES RIDW.D_REQUEST_CATEGORY(REQUEST_CATEGORY_ID)
  1653. GO
  1654.  
  1655. ALTER TABLE RIDW.F_REQUEST_CUST_METRICS ADD CONSTRAINT F_REQCUST_MET_FK9 FOREIGN KEY (REQUEST_CLASS_ID) REFERENCES RIDW.D_REQUEST_CLASSIFICATION(REQUEST_CLASS_ID)
  1656. GO
  1657.  
  1658. ALTER TABLE RIDW.F_REQUEST_CUST_METRICS ADD CONSTRAINT F_REQCUST_MET_FK11 FOREIGN KEY (REQUEST_TYPE_ID) REFERENCES RIDW.D_REQUEST_TYPE(REQUEST_TYPE_ID)
  1659. GO
  1660.  
  1661. ALTER TABLE RIDW.F_REQUEST_CUST_METRICS ADD CONSTRAINT F_REQCUST_MET_FK12 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1662. GO
  1663.  
  1664. ALTER TABLE RIDW.F_REQUEST_CUST_METRICS ADD CONSTRAINT F_REQCUST_MET_FK13 FOREIGN KEY (SEVERITY_ID) REFERENCES RIDW.D_REQUEST_SEVERITY(SEVERITY_ID)
  1665. GO
  1666.  
  1667. ALTER TABLE RIDW.F_REQUEST_CUST_METRICS ADD CONSTRAINT F_REQCUST_MET_FK14 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_REQUEST_STATE(STATE_ID)
  1668. GO
  1669.  
  1670. ALTER TABLE RIDW.F_REQUEST_CUST_METRICS ADD CONSTRAINT F_REQCUST_MET_FK20 FOREIGN KEY (STATUS_ID) REFERENCES RIDW.D_REQUEST_STATUS(STATUS_ID)
  1671. GO
  1672.  
  1673. ALTER TABLE RIDW.F_REQUEST_CUST_METRICS ADD CONSTRAINT F_REQCUST_MET_FK21 FOREIGN KEY (TEAM_ID) REFERENCES RIDW.D_TEAM(TEAM_ID)
  1674. GO
  1675.  
  1676. ALTER TABLE RIDW.F_REQUEST_CUST_METRICS ADD CONSTRAINT F_REQCUST_MET_FK22 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1677. GO
  1678.  
  1679. ALTER TABLE RIDW.F_REQUEST_REQUI_FAIL_METRICS ADD CONSTRAINT F_RQRUF_MET_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  1680. GO
  1681.  
  1682. ALTER TABLE RIDW.F_REQUEST_REQUI_FAIL_METRICS ADD CONSTRAINT F_RQRUF_MET_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1683. GO
  1684.  
  1685. ALTER TABLE RIDW.F_REQUEST_REQUI_FAIL_METRICS ADD CONSTRAINT F_RQRUF_MET_FK3 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  1686. GO
  1687.  
  1688. ALTER TABLE RIDW.F_REQUEST_REQUI_FAIL_METRICS ADD CONSTRAINT F_RQRUF_MET_FK4 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  1689. GO
  1690.  
  1691. ALTER TABLE RIDW.F_REQUEST_REQUI_FAIL_METRICS ADD CONSTRAINT F_RQRUF_MET_FK5 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  1692. GO
  1693.  
  1694. ALTER TABLE RIDW.F_REQUEST_REQUI_FAIL_METRICS ADD CONSTRAINT F_RQRUF_MET_FK7 FOREIGN KEY (REQUIREMENT_ID) REFERENCES RIDW.D_REQUIREMENT(REQUIREMENT_ID)
  1695. GO
  1696.  
  1697. ALTER TABLE RIDW.F_REQUEST_REQUI_FAIL_METRICS ADD CONSTRAINT F_RQRUF_MET_FK8 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1698. GO
  1699.  
  1700. ALTER TABLE RIDW.F_REQUEST_REQUI_METRICS ADD CONSTRAINT F_REQREQUI_MET_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  1701. GO
  1702.  
  1703. ALTER TABLE RIDW.F_REQUEST_REQUI_METRICS ADD CONSTRAINT F_REQREQUI_MET_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1704. GO
  1705.  
  1706. ALTER TABLE RIDW.F_REQUEST_REQUI_METRICS ADD CONSTRAINT F_REQREQUI_MET_FK3 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  1707. GO
  1708.  
  1709. ALTER TABLE RIDW.F_REQUEST_REQUI_METRICS ADD CONSTRAINT F_REQREQUI_MET_FK4 FOREIGN KEY (PLATFORM_ID) REFERENCES RIDW.D_PLATFORM(PLATFORM_ID)
  1710. GO
  1711.  
  1712. ALTER TABLE RIDW.F_REQUEST_REQUI_METRICS ADD CONSTRAINT F_REQREQUI_MET_FK5 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_REQUEST_PRIORITY(PRIORITY_ID)
  1713. GO
  1714.  
  1715. ALTER TABLE RIDW.F_REQUEST_REQUI_METRICS ADD CONSTRAINT F_REQREQUI_MET_FK6 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  1716. GO
  1717.  
  1718. ALTER TABLE RIDW.F_REQUEST_REQUI_METRICS ADD CONSTRAINT F_REQREQUI_MET_FK7 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  1719. GO
  1720.  
  1721. ALTER TABLE RIDW.F_REQUEST_REQUI_METRICS ADD CONSTRAINT F_REQREQUI_MET_FK8 FOREIGN KEY (REQUEST_CATEGORY_ID) REFERENCES RIDW.D_REQUEST_CATEGORY(REQUEST_CATEGORY_ID)
  1722. GO
  1723.  
  1724. ALTER TABLE RIDW.F_REQUEST_REQUI_METRICS ADD CONSTRAINT F_REQREQUI_MET_FK9 FOREIGN KEY (REQUEST_CLASS_ID) REFERENCES RIDW.D_REQUEST_CLASSIFICATION(REQUEST_CLASS_ID)
  1725. GO
  1726.  
  1727. ALTER TABLE RIDW.F_REQUEST_REQUI_METRICS ADD CONSTRAINT F_RRUI_MET_FK11 FOREIGN KEY (REQUEST_TYPE_ID) REFERENCES RIDW.D_REQUEST_TYPE(REQUEST_TYPE_ID)
  1728. GO
  1729.  
  1730. ALTER TABLE RIDW.F_REQUEST_REQUI_METRICS ADD CONSTRAINT F_RRUI_MET_FK12 FOREIGN KEY (REQUIREMENT_ID) REFERENCES RIDW.D_REQUIREMENT(REQUIREMENT_ID)
  1731. GO
  1732.  
  1733. ALTER TABLE RIDW.F_REQUEST_REQUI_METRICS ADD CONSTRAINT F_RRUI_MET_FK13 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1734. GO
  1735.  
  1736. ALTER TABLE RIDW.F_REQUEST_REQUI_METRICS ADD CONSTRAINT F_RRUI_MET_FK14 FOREIGN KEY (SEVERITY_ID) REFERENCES RIDW.D_REQUEST_SEVERITY(SEVERITY_ID)
  1737. GO
  1738.  
  1739. ALTER TABLE RIDW.F_REQUEST_REQUI_METRICS ADD CONSTRAINT F_RRUI_MET_FK15 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_REQUEST_STATE(STATE_ID)
  1740. GO
  1741.  
  1742. ALTER TABLE RIDW.F_REQUEST_REQUI_METRICS ADD CONSTRAINT F_RRUI_MET_FK21 FOREIGN KEY (STATUS_ID) REFERENCES RIDW.D_REQUEST_STATUS(STATUS_ID)
  1743. GO
  1744.  
  1745. ALTER TABLE RIDW.F_REQUEST_REQUI_METRICS ADD CONSTRAINT F_RRUI_MET_FK22 FOREIGN KEY (TEAM_ID) REFERENCES RIDW.D_TEAM(TEAM_ID)
  1746. GO
  1747.  
  1748. ALTER TABLE RIDW.F_REQUEST_REQUI_METRICS ADD CONSTRAINT F_RRUI_MET_FK23 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1749. GO
  1750.  
  1751. ALTER TABLE RIDW.F_REQUEST_RES_REQUI_DT_METRICS ADD CONSTRAINT F_RRERD_MET_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  1752. GO
  1753.  
  1754. ALTER TABLE RIDW.F_REQUEST_RES_REQUI_DT_METRICS ADD CONSTRAINT F_RRERD_MET_FK2 FOREIGN KEY (CUSTOMER_PRIORITY_ID) REFERENCES RIDW.D_CUSTOMER_PRIORITY(CUSTOMER_PRIORITY_ID)
  1755. GO
  1756.  
  1757. ALTER TABLE RIDW.F_REQUEST_RES_REQUI_DT_METRICS ADD CONSTRAINT F_RRERD_MET_FK3 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  1758. GO
  1759.  
  1760. ALTER TABLE RIDW.F_REQUEST_RES_REQUI_DT_METRICS ADD CONSTRAINT F_RRERD_MET_FK4 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_REQUEST_PRIORITY(PRIORITY_ID)
  1761. GO
  1762.  
  1763. ALTER TABLE RIDW.F_REQUEST_RES_REQUI_DT_METRICS ADD CONSTRAINT F_RRERD_MET_FK5 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  1764. GO
  1765.  
  1766. ALTER TABLE RIDW.F_REQUEST_RES_REQUI_DT_METRICS ADD CONSTRAINT F_RRERD_MET_FK6 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  1767. GO
  1768.  
  1769. ALTER TABLE RIDW.F_REQUEST_RES_REQUI_DT_METRICS ADD CONSTRAINT F_RRERD_MET_FK8 FOREIGN KEY (REQUEST_CATEGORY_ID) REFERENCES RIDW.D_REQUEST_CATEGORY(REQUEST_CATEGORY_ID)
  1770. GO
  1771.  
  1772. ALTER TABLE RIDW.F_REQUEST_RES_REQUI_DT_METRICS ADD CONSTRAINT F_RRERD_MET_FK9 FOREIGN KEY (REQUEST_CLASS_ID) REFERENCES RIDW.D_REQUEST_CLASSIFICATION(REQUEST_CLASS_ID)
  1773. GO
  1774.  
  1775. ALTER TABLE RIDW.F_REQUEST_RES_REQUI_DT_METRICS ADD CONSTRAINT F_RRERD_MET_FK10 FOREIGN KEY (REQUEST_TYPE_ID) REFERENCES RIDW.D_REQUEST_TYPE(REQUEST_TYPE_ID)
  1776. GO
  1777.  
  1778. ALTER TABLE RIDW.F_REQUEST_RES_REQUI_DT_METRICS ADD CONSTRAINT F_RRERD_MET_FK11 FOREIGN KEY (REQUIREMENT_ID) REFERENCES RIDW.D_REQUIREMENT(REQUIREMENT_ID)
  1779. GO
  1780.  
  1781. ALTER TABLE RIDW.F_REQUEST_RES_REQUI_DT_METRICS ADD CONSTRAINT F_RRERD_MET_FK12 FOREIGN KEY (SEVERITY_ID) REFERENCES RIDW.D_REQUEST_SEVERITY(SEVERITY_ID)
  1782. GO
  1783.  
  1784. ALTER TABLE RIDW.F_REQUEST_RES_REQUI_DT_METRICS ADD CONSTRAINT F_RRERD_MET_FK13 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_REQUEST_STATE(STATE_ID)
  1785. GO
  1786.  
  1787. ALTER TABLE RIDW.F_REQUEST_RES_REQUI_DT_METRICS ADD CONSTRAINT F_RRERD_MET_FK19 FOREIGN KEY (STATUS_ID) REFERENCES RIDW.D_REQUEST_STATUS(STATUS_ID)
  1788. GO
  1789.  
  1790. ALTER TABLE RIDW.F_REQUEST_RES_REQUI_DT_METRICS ADD CONSTRAINT F_RRERD_MET_FK20 FOREIGN KEY (TEAM_ID) REFERENCES RIDW.D_TEAM(TEAM_ID)
  1791. GO
  1792.  
  1793. ALTER TABLE RIDW.F_REQUEST_RES_REQUI_DT_METRICS ADD CONSTRAINT F_RRERD_MET_FK21 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1794. GO
  1795.  
  1796. ALTER TABLE RIDW.F_REQUEST_RES_TPLN_DT_METRICS ADD CONSTRAINT F_RRETD_MET_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  1797. GO
  1798.  
  1799. ALTER TABLE RIDW.F_REQUEST_RES_TPLN_DT_METRICS ADD CONSTRAINT F_RRETD_MET_FK2 FOREIGN KEY (CUSTOMER_PRIORITY_ID) REFERENCES RIDW.D_CUSTOMER_PRIORITY(CUSTOMER_PRIORITY_ID)
  1800. GO
  1801.  
  1802. ALTER TABLE RIDW.F_REQUEST_RES_TPLN_DT_METRICS ADD CONSTRAINT F_RRETD_MET_FK3 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  1803. GO
  1804.  
  1805. ALTER TABLE RIDW.F_REQUEST_RES_TPLN_DT_METRICS ADD CONSTRAINT F_RRETD_MET_FK4 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_REQUEST_PRIORITY(PRIORITY_ID)
  1806. GO
  1807.  
  1808. ALTER TABLE RIDW.F_REQUEST_RES_TPLN_DT_METRICS ADD CONSTRAINT F_RRETD_MET_FK5 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  1809. GO
  1810.  
  1811. ALTER TABLE RIDW.F_REQUEST_RES_TPLN_DT_METRICS ADD CONSTRAINT F_RRETD_MET_FK6 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  1812. GO
  1813.  
  1814. ALTER TABLE RIDW.F_REQUEST_RES_TPLN_DT_METRICS ADD CONSTRAINT F_RRETD_MET_FK8 FOREIGN KEY (REQUEST_CATEGORY_ID) REFERENCES RIDW.D_REQUEST_CATEGORY(REQUEST_CATEGORY_ID)
  1815. GO
  1816.  
  1817. ALTER TABLE RIDW.F_REQUEST_RES_TPLN_DT_METRICS ADD CONSTRAINT F_RRETD_MET_FK9 FOREIGN KEY (REQUEST_CLASS_ID) REFERENCES RIDW.D_REQUEST_CLASSIFICATION(REQUEST_CLASS_ID)
  1818. GO
  1819.  
  1820. ALTER TABLE RIDW.F_REQUEST_RES_TPLN_DT_METRICS ADD CONSTRAINT F_RRETD_MET_FK10 FOREIGN KEY (REQUEST_TYPE_ID) REFERENCES RIDW.D_REQUEST_TYPE(REQUEST_TYPE_ID)
  1821. GO
  1822.  
  1823. ALTER TABLE RIDW.F_REQUEST_RES_TPLN_DT_METRICS ADD CONSTRAINT F_RRETD_MET_FK11 FOREIGN KEY (SEVERITY_ID) REFERENCES RIDW.D_REQUEST_SEVERITY(SEVERITY_ID)
  1824. GO
  1825.  
  1826. ALTER TABLE RIDW.F_REQUEST_RES_TPLN_DT_METRICS ADD CONSTRAINT F_RRETD_MET_FK12 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_REQUEST_STATE(STATE_ID)
  1827. GO
  1828.  
  1829. ALTER TABLE RIDW.F_REQUEST_RES_TPLN_DT_METRICS ADD CONSTRAINT F_RRETD_MET_FK18 FOREIGN KEY (STATUS_ID) REFERENCES RIDW.D_REQUEST_STATUS(STATUS_ID)
  1830. GO
  1831.  
  1832. ALTER TABLE RIDW.F_REQUEST_RES_TPLN_DT_METRICS ADD CONSTRAINT F_RRETD_MET_FK19 FOREIGN KEY (TEAM_ID) REFERENCES RIDW.D_TEAM(TEAM_ID)
  1833. GO
  1834.  
  1835. ALTER TABLE RIDW.F_REQUEST_RES_TPLN_DT_METRICS ADD CONSTRAINT F_RRETD_MET_FK20 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN(TESTPLAN_ID)
  1836. GO
  1837.  
  1838. ALTER TABLE RIDW.F_REQUEST_RES_TPLN_DT_METRICS ADD CONSTRAINT F_RRETD_MET_FK21 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1839. GO
  1840.  
  1841. ALTER TABLE RIDW.F_REQUEST_TPLN_AGING ADD CONSTRAINT F_REQTPLN_AG_FK2 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  1842. GO
  1843.  
  1844. ALTER TABLE RIDW.F_REQUEST_TPLN_AGING ADD CONSTRAINT F_REQTPLN_AG_FK3 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1845. GO
  1846.  
  1847. ALTER TABLE RIDW.F_REQUEST_TPLN_AGING ADD CONSTRAINT F_REQTPLN_AG_FK4 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  1848. GO
  1849.  
  1850. ALTER TABLE RIDW.F_REQUEST_TPLN_AGING ADD CONSTRAINT F_REQTPLN_AG_FK5 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_REQUEST_PRIORITY(PRIORITY_ID)
  1851. GO
  1852.  
  1853. ALTER TABLE RIDW.F_REQUEST_TPLN_AGING ADD CONSTRAINT F_REQTPLN_AG_FK6 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  1854. GO
  1855.  
  1856. ALTER TABLE RIDW.F_REQUEST_TPLN_AGING ADD CONSTRAINT F_REQTPLN_AG_FK7 FOREIGN KEY (REQUEST_CLASS_ID) REFERENCES RIDW.D_REQUEST_CLASSIFICATION(REQUEST_CLASS_ID)
  1857. GO
  1858.  
  1859. ALTER TABLE RIDW.F_REQUEST_TPLN_AGING ADD CONSTRAINT F_REQTPLN_AG_FK8 FOREIGN KEY (REQUEST_TYPE_ID) REFERENCES RIDW.D_REQUEST_TYPE(REQUEST_TYPE_ID)
  1860. GO
  1861.  
  1862. ALTER TABLE RIDW.F_REQUEST_TPLN_AGING ADD CONSTRAINT F_REQTPLN_AG_FK9 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1863. GO
  1864.  
  1865. ALTER TABLE RIDW.F_REQUEST_TPLN_AGING ADD CONSTRAINT F_REQTPLN_AG_FK10 FOREIGN KEY (SEVERITY_ID) REFERENCES RIDW.D_REQUEST_SEVERITY(SEVERITY_ID)
  1866. GO
  1867.  
  1868. ALTER TABLE RIDW.F_REQUEST_TPLN_AGING ADD CONSTRAINT F_REQTPLN_AG_FK11 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_REQUEST_STATE(STATE_ID)
  1869. GO
  1870.  
  1871. ALTER TABLE RIDW.F_REQUEST_TPLN_AGING ADD CONSTRAINT F_REQTPLN_AG_FK17 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN(TESTPLAN_ID)
  1872. GO
  1873.  
  1874. ALTER TABLE RIDW.F_REQUEST_TPLN_AGING ADD CONSTRAINT F_REQTPLN_AG_FK18 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1875. GO
  1876.  
  1877. ALTER TABLE RIDW.F_REQUEST_TPLN_FAIL_METRICS ADD CONSTRAINT F_RPLF_MET_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  1878. GO
  1879.  
  1880. ALTER TABLE RIDW.F_REQUEST_TPLN_FAIL_METRICS ADD CONSTRAINT F_RPLF_MET_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1881. GO
  1882.  
  1883. ALTER TABLE RIDW.F_REQUEST_TPLN_FAIL_METRICS ADD CONSTRAINT F_RPLF_MET_FK3 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  1884. GO
  1885.  
  1886. ALTER TABLE RIDW.F_REQUEST_TPLN_FAIL_METRICS ADD CONSTRAINT F_RPLF_MET_FK4 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  1887. GO
  1888.  
  1889. ALTER TABLE RIDW.F_REQUEST_TPLN_FAIL_METRICS ADD CONSTRAINT F_RPLF_MET_FK5 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  1890. GO
  1891.  
  1892. ALTER TABLE RIDW.F_REQUEST_TPLN_FAIL_METRICS ADD CONSTRAINT F_RPLF_MET_FK7 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN(TESTPLAN_ID)
  1893. GO
  1894.  
  1895. ALTER TABLE RIDW.F_REQUEST_TPLN_FAIL_METRICS ADD CONSTRAINT F_RPLF_MET_FK8 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1896. GO
  1897.  
  1898. ALTER TABLE RIDW.F_REQUEST_TPLN_METRICS ADD CONSTRAINT F_REQTPLN_MET_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  1899. GO
  1900.  
  1901. ALTER TABLE RIDW.F_REQUEST_TPLN_METRICS ADD CONSTRAINT F_REQTPLN_MET_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1902. GO
  1903.  
  1904. ALTER TABLE RIDW.F_REQUEST_TPLN_METRICS ADD CONSTRAINT F_REQTPLN_MET_FK3 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  1905. GO
  1906.  
  1907. ALTER TABLE RIDW.F_REQUEST_TPLN_METRICS ADD CONSTRAINT F_REQTPLN_MET_FK4 FOREIGN KEY (PLATFORM_ID) REFERENCES RIDW.D_PLATFORM(PLATFORM_ID)
  1908. GO
  1909.  
  1910. ALTER TABLE RIDW.F_REQUEST_TPLN_METRICS ADD CONSTRAINT F_REQTPLN_MET_FK5 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_REQUEST_PRIORITY(PRIORITY_ID)
  1911. GO
  1912.  
  1913. ALTER TABLE RIDW.F_REQUEST_TPLN_METRICS ADD CONSTRAINT F_REQTPLN_MET_FK6 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  1914. GO
  1915.  
  1916. ALTER TABLE RIDW.F_REQUEST_TPLN_METRICS ADD CONSTRAINT F_REQTPLN_MET_FK7 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  1917. GO
  1918.  
  1919. ALTER TABLE RIDW.F_REQUEST_TPLN_METRICS ADD CONSTRAINT F_REQTPLN_MET_FK8 FOREIGN KEY (REQUEST_CATEGORY_ID) REFERENCES RIDW.D_REQUEST_CATEGORY(REQUEST_CATEGORY_ID)
  1920. GO
  1921.  
  1922. ALTER TABLE RIDW.F_REQUEST_TPLN_METRICS ADD CONSTRAINT F_REQTPLN_MET_FK9 FOREIGN KEY (REQUEST_CLASS_ID) REFERENCES RIDW.D_REQUEST_CLASSIFICATION(REQUEST_CLASS_ID)
  1923. GO
  1924.  
  1925. ALTER TABLE RIDW.F_REQUEST_TPLN_METRICS ADD CONSTRAINT F_REQTPLN_MET_FK11 FOREIGN KEY (REQUEST_TYPE_ID) REFERENCES RIDW.D_REQUEST_TYPE(REQUEST_TYPE_ID)
  1926. GO
  1927.  
  1928. ALTER TABLE RIDW.F_REQUEST_TPLN_METRICS ADD CONSTRAINT F_REQTPLN_MET_FK12 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1929. GO
  1930.  
  1931. ALTER TABLE RIDW.F_REQUEST_TPLN_METRICS ADD CONSTRAINT F_REQTPLN_MET_FK13 FOREIGN KEY (SEVERITY_ID) REFERENCES RIDW.D_REQUEST_SEVERITY(SEVERITY_ID)
  1932. GO
  1933.  
  1934. ALTER TABLE RIDW.F_REQUEST_TPLN_METRICS ADD CONSTRAINT F_REQTPLN_MET_FK14 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_REQUEST_STATE(STATE_ID)
  1935. GO
  1936.  
  1937. ALTER TABLE RIDW.F_REQUEST_TPLN_METRICS ADD CONSTRAINT F_REQTPLN_MET_FK20 FOREIGN KEY (STATUS_ID) REFERENCES RIDW.D_REQUEST_STATUS(STATUS_ID)
  1938. GO
  1939.  
  1940. ALTER TABLE RIDW.F_REQUEST_TPLN_METRICS ADD CONSTRAINT F_REQTPLN_MET_FK21 FOREIGN KEY (TEAM_ID) REFERENCES RIDW.D_TEAM(TEAM_ID)
  1941. GO
  1942.  
  1943. ALTER TABLE RIDW.F_REQUEST_TPLN_METRICS ADD CONSTRAINT F_REQTPLN_MET_FK22 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN(TESTPLAN_ID)
  1944. GO
  1945.  
  1946. ALTER TABLE RIDW.F_REQUEST_TPLN_METRICS ADD CONSTRAINT F_REQTPLN_MET_FK23 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1947. GO
  1948.  
  1949. ALTER TABLE RIDW.F_REQUEST_TPLN_TURNAROUND ADD CONSTRAINT F_RQTPT_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  1950. GO
  1951.  
  1952. ALTER TABLE RIDW.F_REQUEST_TPLN_TURNAROUND ADD CONSTRAINT F_RQTPT_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  1953. GO
  1954.  
  1955. ALTER TABLE RIDW.F_REQUEST_TPLN_TURNAROUND ADD CONSTRAINT F_RQTPT_FK3 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  1956. GO
  1957.  
  1958. ALTER TABLE RIDW.F_REQUEST_TPLN_TURNAROUND ADD CONSTRAINT F_RQTPT_FK4 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_REQUEST_PRIORITY(PRIORITY_ID)
  1959. GO
  1960.  
  1961. ALTER TABLE RIDW.F_REQUEST_TPLN_TURNAROUND ADD CONSTRAINT F_RQTPT_FK5 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  1962. GO
  1963.  
  1964. ALTER TABLE RIDW.F_REQUEST_TPLN_TURNAROUND ADD CONSTRAINT F_RQTPT_FK6 FOREIGN KEY (REQUEST_CLASS_ID) REFERENCES RIDW.D_REQUEST_CLASSIFICATION(REQUEST_CLASS_ID)
  1965. GO
  1966.  
  1967. ALTER TABLE RIDW.F_REQUEST_TPLN_TURNAROUND ADD CONSTRAINT F_RQTPT_FK7 FOREIGN KEY (REQUEST_TYPE_ID) REFERENCES RIDW.D_REQUEST_TYPE(REQUEST_TYPE_ID)
  1968. GO
  1969.  
  1970. ALTER TABLE RIDW.F_REQUEST_TPLN_TURNAROUND ADD CONSTRAINT F_RQTPT_FK8 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1971. GO
  1972.  
  1973. ALTER TABLE RIDW.F_REQUEST_TPLN_TURNAROUND ADD CONSTRAINT F_RQTPT_FK9 FOREIGN KEY (SEVERITY_ID) REFERENCES RIDW.D_REQUEST_SEVERITY(SEVERITY_ID)
  1974. GO
  1975.  
  1976. ALTER TABLE RIDW.F_REQUEST_TPLN_TURNAROUND ADD CONSTRAINT F_RQTPT_FK10 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  1977. GO
  1978.  
  1979. ALTER TABLE RIDW.F_REQUEST_TPLN_TURNAROUND ADD CONSTRAINT F_REQTU_FK1 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN(TESTPLAN_ID)
  1980. GO
  1981.  
  1982. ALTER TABLE RIDW.F_REQUE_CLOSE_REQUI_DT_METRICS ADD CONSTRAINT F_RCRDT_MET_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  1983. GO
  1984.  
  1985. ALTER TABLE RIDW.F_REQUE_CLOSE_REQUI_DT_METRICS ADD CONSTRAINT F_RCRDT_MET_FK2 FOREIGN KEY (CUSTOMER_PRIORITY_ID) REFERENCES RIDW.D_CUSTOMER_PRIORITY(CUSTOMER_PRIORITY_ID)
  1986. GO
  1987.  
  1988. ALTER TABLE RIDW.F_REQUE_CLOSE_REQUI_DT_METRICS ADD CONSTRAINT F_RCRDT_MET_FK3 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  1989. GO
  1990.  
  1991. ALTER TABLE RIDW.F_REQUE_CLOSE_REQUI_DT_METRICS ADD CONSTRAINT F_RCRDT_MET_FK4 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  1992. GO
  1993.  
  1994. ALTER TABLE RIDW.F_REQUE_CLOSE_REQUI_DT_METRICS ADD CONSTRAINT F_RCRDT_MET_FK5 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  1995. GO
  1996.  
  1997. ALTER TABLE RIDW.F_REQUE_CLOSE_REQUI_DT_METRICS ADD CONSTRAINT F_RCRDT_MET_FK7 FOREIGN KEY (REQUEST_CLASS_ID) REFERENCES RIDW.D_REQUEST_CLASSIFICATION(REQUEST_CLASS_ID)
  1998. GO
  1999.  
  2000. ALTER TABLE RIDW.F_REQUE_CLOSE_REQUI_DT_METRICS ADD CONSTRAINT F_RCRDT_MET_FK8 FOREIGN KEY (REQUEST_TYPE_ID) REFERENCES RIDW.D_REQUEST_TYPE(REQUEST_TYPE_ID)
  2001. GO
  2002.  
  2003. ALTER TABLE RIDW.F_REQUE_CLOSE_REQUI_DT_METRICS ADD CONSTRAINT F_RCRDT_MET_FK9 FOREIGN KEY (REQUIREMENT_ID) REFERENCES RIDW.D_REQUIREMENT(REQUIREMENT_ID)
  2004. GO
  2005.  
  2006. ALTER TABLE RIDW.F_REQUE_CLOSE_REQUI_DT_METRICS ADD CONSTRAINT F_RCRDT_MET_FK10 FOREIGN KEY (SEVERITY_ID) REFERENCES RIDW.D_REQUEST_SEVERITY(SEVERITY_ID)
  2007. GO
  2008.  
  2009. ALTER TABLE RIDW.F_REQUE_CLOSE_REQUI_DT_METRICS ADD CONSTRAINT F_RCRDT_MET_FK11 FOREIGN KEY (STATUS_ID) REFERENCES RIDW.D_REQUEST_STATUS(STATUS_ID)
  2010. GO
  2011.  
  2012. ALTER TABLE RIDW.F_REQUE_CLOSE_REQUI_DT_METRICS ADD CONSTRAINT F_RCRDT_MET_FK12 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  2013. GO
  2014.  
  2015. ALTER TABLE RIDW.F_REQUE_CLOSE_TPLN_DT_METRICS ADD CONSTRAINT F_RCTD_MET_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  2016. GO
  2017.  
  2018. ALTER TABLE RIDW.F_REQUE_CLOSE_TPLN_DT_METRICS ADD CONSTRAINT F_RCTD_MET_FK2 FOREIGN KEY (CUSTOMER_PRIORITY_ID) REFERENCES RIDW.D_CUSTOMER_PRIORITY(CUSTOMER_PRIORITY_ID)
  2019. GO
  2020.  
  2021. ALTER TABLE RIDW.F_REQUE_CLOSE_TPLN_DT_METRICS ADD CONSTRAINT F_RCTD_MET_FK3 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  2022. GO
  2023.  
  2024. ALTER TABLE RIDW.F_REQUE_CLOSE_TPLN_DT_METRICS ADD CONSTRAINT F_RCTD_MET_FK4 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  2025. GO
  2026.  
  2027. ALTER TABLE RIDW.F_REQUE_CLOSE_TPLN_DT_METRICS ADD CONSTRAINT F_RCTD_MET_FK5 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  2028. GO
  2029.  
  2030. ALTER TABLE RIDW.F_REQUE_CLOSE_TPLN_DT_METRICS ADD CONSTRAINT F_RCTD_MET_FK7 FOREIGN KEY (REQUEST_CLASS_ID) REFERENCES RIDW.D_REQUEST_CLASSIFICATION(REQUEST_CLASS_ID)
  2031. GO
  2032.  
  2033. ALTER TABLE RIDW.F_REQUE_CLOSE_TPLN_DT_METRICS ADD CONSTRAINT F_RCTD_MET_FK8 FOREIGN KEY (REQUEST_TYPE_ID) REFERENCES RIDW.D_REQUEST_TYPE(REQUEST_TYPE_ID)
  2034. GO
  2035.  
  2036. ALTER TABLE RIDW.F_REQUE_CLOSE_TPLN_DT_METRICS ADD CONSTRAINT F_RCTD_MET_FK9 FOREIGN KEY (SEVERITY_ID) REFERENCES RIDW.D_REQUEST_SEVERITY(SEVERITY_ID)
  2037. GO
  2038.  
  2039. ALTER TABLE RIDW.F_REQUE_CLOSE_TPLN_DT_METRICS ADD CONSTRAINT F_RCTD_MET_FK10 FOREIGN KEY (STATUS_ID) REFERENCES RIDW.D_REQUEST_STATUS(STATUS_ID)
  2040. GO
  2041.  
  2042. ALTER TABLE RIDW.F_REQUE_CLOSE_TPLN_DT_METRICS ADD CONSTRAINT F_RCTD_MET_FK11 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN(TESTPLAN_ID)
  2043. GO
  2044.  
  2045. ALTER TABLE RIDW.F_REQUE_CLOSE_TPLN_DT_METRICS ADD CONSTRAINT F_RCTD_MET_FK12 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  2046. GO
  2047.  
  2048. ALTER TABLE RIDW.F_REQUIREMENT_METRICS ADD CONSTRAINT F_REQ_MET_FK1 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  2049. GO
  2050.  
  2051. ALTER TABLE RIDW.F_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_RTPLN_MET_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  2052. GO
  2053.  
  2054. ALTER TABLE RIDW.F_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_RQTP_MET_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  2055. GO
  2056.  
  2057. ALTER TABLE RIDW.F_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_RQTP_MET_FK3 FOREIGN KEY (DIFFICULTY_ID) REFERENCES RIDW.D_DIFFICULTY(DIFFICULTY_ID)
  2058. GO
  2059.  
  2060. ALTER TABLE RIDW.F_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_RQTP_MET_FK4 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  2061. GO
  2062.  
  2063. ALTER TABLE RIDW.F_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_RQTP_MET_FK5 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_PRIORITY(PRIORITY_ID)
  2064. GO
  2065.  
  2066. ALTER TABLE RIDW.F_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_RQTP_MET_FK6 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  2067. GO
  2068.  
  2069. ALTER TABLE RIDW.F_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_RQTP_MET_FK7 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  2070. GO
  2071.  
  2072. ALTER TABLE RIDW.F_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_RQTP_MET_FK8 FOREIGN KEY (REQUIREMENT_CLASS_ID) REFERENCES RIDW.D_REQUIREMENT_CLASSIFICATION(REQUIREMENT_CLASS_ID)
  2073. GO
  2074.  
  2075. ALTER TABLE RIDW.F_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_RTPLN_MET_FK10 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  2076. GO
  2077.  
  2078. ALTER TABLE RIDW.F_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_RTPLN_MET_FK11 FOREIGN KEY (STABILITY_ID) REFERENCES RIDW.D_STABILITY(STABILITY_ID)
  2079. GO
  2080.  
  2081. ALTER TABLE RIDW.F_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_RTPLN_MET_FK12 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_REQUIREMENT_STATE(STATE_ID)
  2082. GO
  2083.  
  2084. ALTER TABLE RIDW.F_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_RTPLN_MET_FK18 FOREIGN KEY (STATUS_ID) REFERENCES RIDW.D_STATUS(STATUS_ID)
  2085. GO
  2086.  
  2087. ALTER TABLE RIDW.F_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_RTPLN_MET_FK19 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN(TESTPLAN_ID)
  2088. GO
  2089.  
  2090. ALTER TABLE RIDW.F_REQUIREMENT_TPLN_METRICS ADD CONSTRAINT F_RTPLN_MET_FK20 FOREIGN KEY (REQUIREMENT_TYPE_ID) REFERENCES RIDW.D_REQUIREMENT_TYPE (REQUIREMENT_TYPE_ID)
  2091. GO
  2092.  
  2093. ALTER TABLE RIDW.F_REQUI_TCASE_METRICS ADD CONSTRAINT F_RTC_MET_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  2094. GO
  2095.  
  2096. ALTER TABLE RIDW.F_REQUI_TCASE_METRICS ADD CONSTRAINT F_RTC_MET_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  2097. GO
  2098.  
  2099. ALTER TABLE RIDW.F_REQUI_TCASE_METRICS ADD CONSTRAINT F_RTC_MET_FK3 FOREIGN KEY (DIFFICULTY_ID) REFERENCES RIDW.D_DIFFICULTY(DIFFICULTY_ID)
  2100. GO
  2101.  
  2102. ALTER TABLE RIDW.F_REQUI_TCASE_METRICS ADD CONSTRAINT F_RTC_MET_FK4 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  2103. GO
  2104.  
  2105. ALTER TABLE RIDW.F_REQUI_TCASE_METRICS ADD CONSTRAINT F_RTC_MET_FK5 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_PRIORITY(PRIORITY_ID)
  2106. GO
  2107.  
  2108. ALTER TABLE RIDW.F_REQUI_TCASE_METRICS ADD CONSTRAINT F_RTC_MET_FK6 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  2109. GO
  2110.  
  2111. ALTER TABLE RIDW.F_REQUI_TCASE_METRICS ADD CONSTRAINT F_RTC_MET_FK7 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  2112. GO
  2113.  
  2114. ALTER TABLE RIDW.F_REQUI_TCASE_METRICS ADD CONSTRAINT F_RTC_MET_FK8 FOREIGN KEY (REQUIREMENT_CLASS_ID) REFERENCES RIDW.D_REQUIREMENT_CLASSIFICATION(REQUIREMENT_CLASS_ID)
  2115. GO
  2116.  
  2117. ALTER TABLE RIDW.F_REQUI_TCASE_METRICS ADD CONSTRAINT F_RTC_MET_FK10 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  2118. GO
  2119.  
  2120. ALTER TABLE RIDW.F_REQUI_TCASE_METRICS ADD CONSTRAINT F_RTC_MET_FK11 FOREIGN KEY (STABILITY_ID) REFERENCES RIDW.D_STABILITY(STABILITY_ID)
  2121. GO
  2122.  
  2123. ALTER TABLE RIDW.F_REQUI_TCASE_METRICS ADD CONSTRAINT F_RTC_MET_FK12 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_REQUIREMENT_STATE(STATE_ID)
  2124. GO
  2125.  
  2126. ALTER TABLE RIDW.F_REQUI_TCASE_METRICS ADD CONSTRAINT F_RTC_MET_FK18 FOREIGN KEY (STATUS_ID) REFERENCES RIDW.D_STATUS(STATUS_ID)
  2127. GO
  2128.  
  2129. ALTER TABLE RIDW.F_REQUI_TCASE_METRICS ADD CONSTRAINT F_RTC_MET_FK19 FOREIGN KEY (TESTCASE_ID) REFERENCES RIDW.D_TESTCASE(TESTCASE_ID)
  2130. GO
  2131.  
  2132. ALTER TABLE RIDW.F_REQUI_TCASE_METRICS ADD CONSTRAINT F_RTC_MET_FK20 FOREIGN KEY (REQUIREMENT_TYPE_ID) REFERENCES RIDW.D_REQUIREMENT_TYPE (REQUIREMENT_TYPE_ID)
  2133. GO
  2134.  
  2135. ALTER TABLE RIDW.F_REQU_CREATI_REQUI_DT_METRICS ADD CONSTRAINT F_RRDT_MET_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  2136. GO
  2137.  
  2138. ALTER TABLE RIDW.F_REQU_CREATI_REQUI_DT_METRICS ADD CONSTRAINT F_RRDT_MET_FK2 FOREIGN KEY (CUSTOMER_PRIORITY_ID) REFERENCES RIDW.D_CUSTOMER_PRIORITY(CUSTOMER_PRIORITY_ID)
  2139. GO
  2140.  
  2141. ALTER TABLE RIDW.F_REQU_CREATI_REQUI_DT_METRICS ADD CONSTRAINT F_RRDT_MET_FK3 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_REQUEST_PRIORITY(PRIORITY_ID)
  2142. GO
  2143.  
  2144. ALTER TABLE RIDW.F_REQU_CREATI_REQUI_DT_METRICS ADD CONSTRAINT F_RRDT_MET_FK4 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  2145. GO
  2146.  
  2147. ALTER TABLE RIDW.F_REQU_CREATI_REQUI_DT_METRICS ADD CONSTRAINT F_RRDT_MET_FK5 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  2148. GO
  2149.  
  2150. ALTER TABLE RIDW.F_REQU_CREATI_REQUI_DT_METRICS ADD CONSTRAINT F_RRDT_MET_FK7 FOREIGN KEY (REQUEST_CATEGORY_ID) REFERENCES RIDW.D_REQUEST_CATEGORY(REQUEST_CATEGORY_ID)
  2151. GO
  2152.  
  2153. ALTER TABLE RIDW.F_REQU_CREATI_REQUI_DT_METRICS ADD CONSTRAINT F_RRDT_MET_FK8 FOREIGN KEY (REQUEST_CLASS_ID) REFERENCES RIDW.D_REQUEST_CLASSIFICATION(REQUEST_CLASS_ID)
  2154. GO
  2155.  
  2156. ALTER TABLE RIDW.F_REQU_CREATI_REQUI_DT_METRICS ADD CONSTRAINT F_RRDT_MET_FK9 FOREIGN KEY (REQUEST_TYPE_ID) REFERENCES RIDW.D_REQUEST_TYPE(REQUEST_TYPE_ID)
  2157. GO
  2158.  
  2159. ALTER TABLE RIDW.F_REQU_CREATI_REQUI_DT_METRICS ADD CONSTRAINT F_RRDT_MET_FK10 FOREIGN KEY (REQUIREMENT_ID) REFERENCES RIDW.D_REQUIREMENT(REQUIREMENT_ID)
  2160. GO
  2161.  
  2162. ALTER TABLE RIDW.F_REQU_CREATI_REQUI_DT_METRICS ADD CONSTRAINT F_RRDT_MET_FK11 FOREIGN KEY (SEVERITY_ID) REFERENCES RIDW.D_REQUEST_SEVERITY(SEVERITY_ID)
  2163. GO
  2164.  
  2165. ALTER TABLE RIDW.F_REQU_CREATI_REQUI_DT_METRICS ADD CONSTRAINT F_RRDT_MET_FK12 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_REQUEST_STATE(STATE_ID)
  2166. GO
  2167.  
  2168. ALTER TABLE RIDW.F_REQU_CREATI_REQUI_DT_METRICS ADD CONSTRAINT F_RRDT_MET_FK18 FOREIGN KEY (STATUS_ID) REFERENCES RIDW.D_REQUEST_STATUS(STATUS_ID)
  2169. GO
  2170.  
  2171. ALTER TABLE RIDW.F_REQU_CREATI_REQUI_DT_METRICS ADD CONSTRAINT F_RRDT_MET_FK19 FOREIGN KEY (TEAM_ID) REFERENCES RIDW.D_TEAM(TEAM_ID)
  2172. GO
  2173.  
  2174. ALTER TABLE RIDW.F_REQU_CREATI_REQUI_DT_METRICS ADD CONSTRAINT F_RRDT_MET_FK20 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  2175. GO
  2176.  
  2177. ALTER TABLE RIDW.F_REQU_CREATI_REQUI_DT_METRICS ADD CONSTRAINT F_RRDT_MET_FK21 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  2178. GO
  2179.  
  2180. ALTER TABLE RIDW.F_REQU_CREATI_TPLN_DT_METRICS ADD CONSTRAINT F_RCRTD_MET_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  2181. GO
  2182.  
  2183. ALTER TABLE RIDW.F_REQU_CREATI_TPLN_DT_METRICS ADD CONSTRAINT F_RCRTD_MET_FK2 FOREIGN KEY (CUSTOMER_PRIORITY_ID) REFERENCES RIDW.D_CUSTOMER_PRIORITY(CUSTOMER_PRIORITY_ID)
  2184. GO
  2185.  
  2186. ALTER TABLE RIDW.F_REQU_CREATI_TPLN_DT_METRICS ADD CONSTRAINT F_RCRTD_MET_FK3 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  2187. GO
  2188.  
  2189. ALTER TABLE RIDW.F_REQU_CREATI_TPLN_DT_METRICS ADD CONSTRAINT F_RCRTD_MET_FK4 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_REQUEST_PRIORITY(PRIORITY_ID)
  2190. GO
  2191.  
  2192. ALTER TABLE RIDW.F_REQU_CREATI_TPLN_DT_METRICS ADD CONSTRAINT F_RCRTD_MET_FK5 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  2193. GO
  2194.  
  2195. ALTER TABLE RIDW.F_REQU_CREATI_TPLN_DT_METRICS ADD CONSTRAINT F_RCRTD_MET_FK6 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE(RELEASE_ID)
  2196. GO
  2197.  
  2198. ALTER TABLE RIDW.F_REQU_CREATI_TPLN_DT_METRICS ADD CONSTRAINT F_RCRTD_MET_FK8 FOREIGN KEY (REQUEST_CATEGORY_ID) REFERENCES RIDW.D_REQUEST_CATEGORY(REQUEST_CATEGORY_ID)
  2199. GO
  2200.  
  2201. ALTER TABLE RIDW.F_REQU_CREATI_TPLN_DT_METRICS ADD CONSTRAINT F_RCRTD_MET_FK9 FOREIGN KEY (REQUEST_CLASS_ID) REFERENCES RIDW.D_REQUEST_CLASSIFICATION(REQUEST_CLASS_ID)
  2202. GO
  2203.  
  2204. ALTER TABLE RIDW.F_REQU_CREATI_TPLN_DT_METRICS ADD CONSTRAINT F_RCRTD_MET_FK10 FOREIGN KEY (REQUEST_TYPE_ID) REFERENCES RIDW.D_REQUEST_TYPE(REQUEST_TYPE_ID)
  2205. GO
  2206.  
  2207. ALTER TABLE RIDW.F_REQU_CREATI_TPLN_DT_METRICS ADD CONSTRAINT F_RCRTD_MET_FK11 FOREIGN KEY (SEVERITY_ID) REFERENCES RIDW.D_REQUEST_SEVERITY(SEVERITY_ID)
  2208. GO
  2209.  
  2210. ALTER TABLE RIDW.F_REQU_CREATI_TPLN_DT_METRICS ADD CONSTRAINT F_RCRTD_MET_FK12 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_REQUEST_STATE(STATE_ID)
  2211. GO
  2212.  
  2213. ALTER TABLE RIDW.F_REQU_CREATI_TPLN_DT_METRICS ADD CONSTRAINT F_RCRTD_MET_FK18 FOREIGN KEY (STATUS_ID) REFERENCES RIDW.D_REQUEST_STATUS(STATUS_ID)
  2214. GO
  2215.  
  2216. ALTER TABLE RIDW.F_REQU_CREATI_TPLN_DT_METRICS ADD CONSTRAINT F_RCRTD_MET_FK19 FOREIGN KEY (TEAM_ID) REFERENCES RIDW.D_TEAM(TEAM_ID)
  2217. GO
  2218.  
  2219. ALTER TABLE RIDW.F_REQU_CREATI_TPLN_DT_METRICS ADD CONSTRAINT F_RCRTD_MET_FK20 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN(TESTPLAN_ID)
  2220. GO
  2221.  
  2222. ALTER TABLE RIDW.F_REQU_CREATI_TPLN_DT_METRICS ADD CONSTRAINT F_RCRTD_MET_FK21 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  2223. GO
  2224.  
  2225. ALTER TABLE RIDW.F_TASK_CLOSE_COMP_DT_METRICS ADD CONSTRAINT F_TCCMD_MET_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  2226. GO
  2227.  
  2228. ALTER TABLE RIDW.F_TASK_CLOSE_COMP_DT_METRICS ADD CONSTRAINT F_TCCMD_MET_FK2 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  2229. GO
  2230.  
  2231. ALTER TABLE RIDW.F_TASK_CLOSE_COMP_DT_METRICS ADD CONSTRAINT F_TCCMD_MET_FK3 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_PRIORITY(PRIORITY_ID)
  2232. GO
  2233.  
  2234. ALTER TABLE RIDW.F_TASK_CLOSE_COMP_DT_METRICS ADD CONSTRAINT F_TCCMD_MET_FK4 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  2235. GO
  2236.  
  2237. ALTER TABLE RIDW.F_TASK_CLOSE_COMP_DT_METRICS ADD CONSTRAINT F_TCCMD_MET_FK5 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  2238. GO
  2239.  
  2240. ALTER TABLE RIDW.F_TASK_CLOSE_COMP_DT_METRICS ADD CONSTRAINT F_TCCMD_MET_FK6 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_TASK_STATE(STATE_ID)
  2241. GO
  2242.  
  2243. ALTER TABLE RIDW.F_TASK_CLOSE_COMP_DT_METRICS ADD CONSTRAINT F_TCCMD_MET_FK13 FOREIGN KEY (TASK_CLASS_ID) REFERENCES RIDW.D_TASK_CLASSIFICATION(TASK_CLASS_ID)
  2244. GO
  2245.  
  2246. ALTER TABLE RIDW.F_TASK_CLOSE_COMP_DT_METRICS ADD CONSTRAINT F_TCCMD_MET_FK14 FOREIGN KEY (TASK_TYPE_ID) REFERENCES RIDW.D_TASK_TYPE(TASK_TYPE_ID)
  2247. GO
  2248.  
  2249. ALTER TABLE RIDW.F_TASK_COMP_METRICS ADD CONSTRAINT F_TKC_MET_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  2250. GO
  2251.  
  2252. ALTER TABLE RIDW.F_TASK_COMP_METRICS ADD CONSTRAINT F_TKC_MET_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  2253. GO
  2254.  
  2255. ALTER TABLE RIDW.F_TASK_COMP_METRICS ADD CONSTRAINT F_TKC_MET_FK3 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  2256. GO
  2257.  
  2258. ALTER TABLE RIDW.F_TASK_COMP_METRICS ADD CONSTRAINT F_TKC_MET_FK4 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_PRIORITY(PRIORITY_ID)
  2259. GO
  2260.  
  2261. ALTER TABLE RIDW.F_TASK_COMP_METRICS ADD CONSTRAINT F_TKC_MET_FK5 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  2262. GO
  2263.  
  2264. ALTER TABLE RIDW.F_TASK_COMP_METRICS ADD CONSTRAINT F_TKC_MET_FK6 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  2265. GO
  2266.  
  2267. ALTER TABLE RIDW.F_TASK_COMP_METRICS ADD CONSTRAINT F_TKC_MET_FK7 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_TASK_STATE(STATE_ID)
  2268. GO
  2269.  
  2270. ALTER TABLE RIDW.F_TASK_COMP_METRICS ADD CONSTRAINT F_TKC_MET_FK13 FOREIGN KEY (TASK_CLASS_ID) REFERENCES RIDW.D_TASK_CLASSIFICATION(TASK_CLASS_ID)
  2271. GO
  2272.  
  2273. ALTER TABLE RIDW.F_TASK_COMP_METRICS ADD CONSTRAINT F_TKC_MET_FK15 FOREIGN KEY (TASK_TYPE_ID) REFERENCES RIDW.D_TASK_TYPE(TASK_TYPE_ID)
  2274. GO
  2275.  
  2276. ALTER TABLE RIDW.F_TASK_CREATE_COMP_DT_METRICS ADD CONSTRAINT F_TCRCMD_MET_FK1 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  2277. GO
  2278.  
  2279. ALTER TABLE RIDW.F_TASK_CREATE_COMP_DT_METRICS ADD CONSTRAINT F_TCRCMD_MET_FK2 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  2280. GO
  2281.  
  2282. ALTER TABLE RIDW.F_TASK_CREATE_COMP_DT_METRICS ADD CONSTRAINT F_TCRCMD_MET_FK3 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_PRIORITY(PRIORITY_ID)
  2283. GO
  2284.  
  2285. ALTER TABLE RIDW.F_TASK_CREATE_COMP_DT_METRICS ADD CONSTRAINT F_TCRCMD_MET_FK4 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  2286. GO
  2287.  
  2288. ALTER TABLE RIDW.F_TASK_CREATE_COMP_DT_METRICS ADD CONSTRAINT F_TCRCMD_MET_FK5 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  2289. GO
  2290.  
  2291. ALTER TABLE RIDW.F_TASK_CREATE_COMP_DT_METRICS ADD CONSTRAINT F_TCRCMD_MET_FK6 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_TASK_STATE(STATE_ID)
  2292. GO
  2293.  
  2294. ALTER TABLE RIDW.F_TASK_CREATE_COMP_DT_METRICS ADD CONSTRAINT F_TCRCMD_MET_FK13 FOREIGN KEY (TASK_CLASS_ID) REFERENCES RIDW.D_TASK_CLASSIFICATION(TASK_CLASS_ID)
  2295. GO
  2296.  
  2297. ALTER TABLE RIDW.F_TASK_CREATE_COMP_DT_METRICS ADD CONSTRAINT F_TCRCMD_MET_FK14 FOREIGN KEY (TASK_TYPE_ID) REFERENCES RIDW.D_TASK_TYPE(TASK_TYPE_ID)
  2298. GO
  2299.  
  2300. ALTER TABLE RIDW.F_TESTCASE_ITER_METRICS ADD CONSTRAINT F_TESTITER_MET_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  2301. GO
  2302.  
  2303. ALTER TABLE RIDW.F_TESTCASE_ITER_METRICS ADD CONSTRAINT F_TESTITER_MET_FK2 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION(ITERATION_ID)
  2304. GO
  2305.  
  2306. ALTER TABLE RIDW.F_TESTCASE_ITER_METRICS ADD CONSTRAINT F_TESTITER_MET_FK3 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_TESTCASE_STATE(STATE_ID)
  2307. GO
  2308.  
  2309. ALTER TABLE RIDW.F_TESTCASE_ITER_METRICS ADD CONSTRAINT F_TESTITER_MET_FK9 FOREIGN KEY (TESTCASE_CLASS_ID) REFERENCES RIDW.D_TESTCASE_CLASSIFICATION(TESTCASE_CLASS_ID)
  2310. GO
  2311.  
  2312. ALTER TABLE RIDW.F_TESTCASE_ITER_METRICS ADD CONSTRAINT F_TSIT_MET_FK10 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN(TESTPLAN_ID)
  2313. GO
  2314.  
  2315. ALTER TABLE RIDW.F_TESTCASE_ITER_METRICS ADD CONSTRAINT F_TSIT_MET_FK11 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  2316. GO
  2317.  
  2318. ALTER TABLE RIDW.F_TESTCASE_REQUI_METRICS ADD CONSTRAINT F_TPJR_MET_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  2319. GO
  2320.  
  2321. ALTER TABLE RIDW.F_TESTCASE_REQUI_METRICS ADD CONSTRAINT F_TPJR_MET_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  2322. GO
  2323.  
  2324. ALTER TABLE RIDW.F_TESTCASE_REQUI_METRICS ADD CONSTRAINT F_TPJR_MET_FK3 FOREIGN KEY (REQUIREMENT_ID) REFERENCES RIDW.D_REQUIREMENT(REQUIREMENT_ID)
  2325. GO
  2326.  
  2327. ALTER TABLE RIDW.F_TESTCASE_REQUI_METRICS ADD CONSTRAINT F_TPJR_MET_FK4 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_TESTCASE_STATE(STATE_ID)
  2328. GO
  2329.  
  2330. ALTER TABLE RIDW.F_TESTCASE_REQUI_METRICS ADD CONSTRAINT F_TPJR_MET_FK10 FOREIGN KEY (TESTCASE_CLASS_ID) REFERENCES RIDW.D_TESTCASE_CLASSIFICATION(TESTCASE_CLASS_ID)
  2331. GO
  2332.  
  2333. ALTER TABLE RIDW.F_TESTCASE_REQUI_METRICS ADD CONSTRAINT F_TPJR_MET_FK11 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN(TESTPLAN_ID)
  2334. GO
  2335.  
  2336. ALTER TABLE RIDW.F_TEXT_FILE_VERSION_DT_METRICS ADD CONSTRAINT F_TFVD_MET_FK1 FOREIGN KEY (ACTIVITY_ID) REFERENCES RIDW.D_ACTIVITY(ACTIVITY_ID)
  2337. GO
  2338.  
  2339. ALTER TABLE RIDW.F_TEXT_FILE_VERSION_DT_METRICS ADD CONSTRAINT F_TFVD_MET_FK2 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  2340. GO
  2341.  
  2342. ALTER TABLE RIDW.F_TEXT_FILE_VERSION_DT_METRICS ADD CONSTRAINT F_TFVD_MET_FK3 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  2343. GO
  2344.  
  2345. ALTER TABLE RIDW.F_TEXT_FILE_VERSION_DT_METRICS ADD CONSTRAINT F_TFVD_MET_FK5 FOREIGN KEY (FILE_CLASS_ID) REFERENCES RIDW.D_FILE_CLASSIFICATION(FILE_CLASS_ID)
  2346. GO
  2347.  
  2348. ALTER TABLE RIDW.F_TEXT_FILE_VERSION_DT_METRICS ADD CONSTRAINT F_TFVD_MET_FK6 FOREIGN KEY (FILE_ID) REFERENCES RIDW.D_FILE(FILE_ID)
  2349. GO
  2350.  
  2351. ALTER TABLE RIDW.F_TEXT_FILE_VERSION_DT_METRICS ADD CONSTRAINT F_TFVD_MET_FK7 FOREIGN KEY (FILE_STREAM_ID) REFERENCES RIDW.D_FILE_STREAM(FILE_STREAM_ID)
  2352. GO
  2353.  
  2354. ALTER TABLE RIDW.F_TEXT_FILE_VERSION_DT_METRICS ADD CONSTRAINT F_TFVD_MET_FK8 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  2355. GO
  2356.  
  2357. ALTER TABLE RIDW.F_TEXT_FILE_VERSION_DT_METRICS ADD CONSTRAINT F_TFVD_MET_FK9 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  2358. GO
  2359.  
  2360. ALTER TABLE RIDW.F_TEXT_FILE_VERSION_METRICS ADD CONSTRAINT F_TFV_MET_FK1 FOREIGN KEY (ACTIVITY_ID) REFERENCES RIDW.D_ACTIVITY(ACTIVITY_ID)
  2361. GO
  2362.  
  2363. ALTER TABLE RIDW.F_TEXT_FILE_VERSREQ_DT_METRICS ADD CONSTRAINT F_TFVRD_MET_FK1 FOREIGN KEY (ACTIVITY_ID) REFERENCES RIDW.D_ACTIVITY(ACTIVITY_ID)
  2364. GO
  2365.  
  2366. ALTER TABLE RIDW.F_TEXT_FILE_VERSREQ_DT_METRICS ADD CONSTRAINT F_TFVRD_MET_FK2 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  2367. GO
  2368.  
  2369. ALTER TABLE RIDW.F_TEXT_FILE_VERSREQ_DT_METRICS ADD CONSTRAINT F_TFVRD_MET_FK3 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  2370. GO
  2371.  
  2372. ALTER TABLE RIDW.F_TEXT_FILE_VERSREQ_DT_METRICS ADD CONSTRAINT F_TFVRD_MET_FK5 FOREIGN KEY (FILE_CLASS_ID) REFERENCES RIDW.D_FILE_CLASSIFICATION(FILE_CLASS_ID)
  2373. GO
  2374.  
  2375. ALTER TABLE RIDW.F_TEXT_FILE_VERSREQ_DT_METRICS ADD CONSTRAINT F_TFVRD_MET_FK6 FOREIGN KEY (FILE_ID) REFERENCES RIDW.D_FILE(FILE_ID)
  2376. GO
  2377.  
  2378. ALTER TABLE RIDW.F_TEXT_FILE_VERSREQ_DT_METRICS ADD CONSTRAINT F_TFVRD_MET_FK7 FOREIGN KEY (FILE_STREAM_ID) REFERENCES RIDW.D_FILE_STREAM(FILE_STREAM_ID)
  2379. GO
  2380.  
  2381. ALTER TABLE RIDW.F_TEXT_FILE_VERSREQ_DT_METRICS ADD CONSTRAINT F_TFVRD_MET_FK8 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  2382. GO
  2383.  
  2384. ALTER TABLE RIDW.F_TEXT_FILE_VERSREQ_DT_METRICS ADD CONSTRAINT F_TFVRD_MET_FK9 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST(REQUEST_ID)
  2385. GO
  2386.  
  2387. ALTER TABLE RIDW.F_TEXT_FILE_VERSREQ_DT_METRICS ADD CONSTRAINT F_TFVRD_MET_FK10 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  2388. GO
  2389.  
  2390. ALTER TABLE RIDW.F_TEXT_FILE_VER_REQU_METRICS ADD CONSTRAINT F_TXFVR_MET_FK1 FOREIGN KEY (ACTIVITY_ID) REFERENCES RIDW.D_ACTIVITY(ACTIVITY_ID)
  2391. GO
  2392.  
  2393. ALTER TABLE RIDW.F_TEXT_FILE_VER_REQU_METRICS ADD CONSTRAINT F_TXFVR_MET_FK2 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  2394. GO
  2395.  
  2396. ALTER TABLE RIDW.F_TEXT_FILE_VER_REQU_METRICS ADD CONSTRAINT F_TXFVR_MET_FK3 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  2397. GO
  2398.  
  2399. ALTER TABLE RIDW.F_TEXT_FILE_VER_REQU_METRICS ADD CONSTRAINT F_TXFVR_MET_FK5 FOREIGN KEY (FILE_CLASS_ID) REFERENCES RIDW.D_FILE_CLASSIFICATION(FILE_CLASS_ID)
  2400. GO
  2401.  
  2402. ALTER TABLE RIDW.F_TEXT_FILE_VER_REQU_METRICS ADD CONSTRAINT F_TXFVR_MET_FK6 FOREIGN KEY (FILE_ID) REFERENCES RIDW.D_FILE(FILE_ID)
  2403. GO
  2404.  
  2405. ALTER TABLE RIDW.F_TEXT_FILE_VER_REQU_METRICS ADD CONSTRAINT F_TXFVR_MET_FK7 FOREIGN KEY (FILE_STREAM_ID) REFERENCES RIDW.D_FILE_STREAM(FILE_STREAM_ID)
  2406. GO
  2407.  
  2408. ALTER TABLE RIDW.F_TEXT_FILE_VER_REQU_METRICS ADD CONSTRAINT F_TXFVR_MET_FK8 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  2409. GO
  2410.  
  2411. ALTER TABLE RIDW.F_TEXT_FILE_VER_REQU_METRICS ADD CONSTRAINT F_TXFVR_MET_FK9 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST(REQUEST_ID)
  2412. GO
  2413.  
  2414. ALTER TABLE RIDW.F_TEXT_FILE_VER_REQU_METRICS ADD CONSTRAINT F_TXFVR_MET_FK10 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  2415. GO
  2416.  
  2417. ALTER TABLE RIDW.F_ACTIVITY_COMP_METRICS ADD CONSTRAINT F_ACTCMPM_FK1 FOREIGN KEY (ACTIVITY_CLASS_ID) REFERENCES RIDW.D_ACTIVITY_CLASSIFICATION (ACTIVITY_CLASS_ID)
  2418. GO
  2419.  
  2420. ALTER TABLE RIDW.F_ACTIVITY_COMP_METRICS ADD CONSTRAINT F_ACTCMPM_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  2421. GO
  2422.  
  2423. ALTER TABLE RIDW.F_ACTIVITY_COMP_METRICS ADD CONSTRAINT F_ACTCMPM_FK4 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID)
  2424. GO
  2425.  
  2426. ALTER TABLE RIDW.F_ACTIVITY_COMP_METRICS ADD CONSTRAINT F_ACTCMPM_FK5 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  2427. GO
  2428.  
  2429. ALTER TABLE RIDW.F_ACTIVITY_COMP_METRICS ADD CONSTRAINT F_ACTCMPM_FK7 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_ACTIVITY_STATE (STATE_ID)
  2430. GO
  2431.  
  2432. ALTER TABLE RIDW.F_ACTIVITY_COMP_METRICS ADD CONSTRAINT F_ACTCMPM_FK8 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_PRIORITY (PRIORITY_ID)
  2433. GO
  2434.  
  2435. ALTER TABLE RIDW.F_ACTIVITY_COMP_METRICS ADD CONSTRAINT F_ACTCMPM_FK9 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT (COMPONENT_ID)
  2436. GO
  2437.  
  2438. ALTER TABLE RIDW.F_C_ACTIVITY_COMP_METRICS ADD CONSTRAINT F_C_ACTCMPM_FK1 FOREIGN KEY (ACTIVITY_CLASS_ID) REFERENCES RIDW.D_ACTIVITY_CLASSIFICATION (ACTIVITY_CLASS_ID)
  2439. GO
  2440.  
  2441. ALTER TABLE RIDW.F_C_ACTIVITY_COMP_METRICS ADD CONSTRAINT F_C_ACTCMPM_FK2 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  2442. GO
  2443.  
  2444. ALTER TABLE RIDW.F_C_ACTIVITY_COMP_METRICS ADD CONSTRAINT F_C_ACTCMPM_FK4 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID)
  2445. GO
  2446.  
  2447. ALTER TABLE RIDW.F_C_ACTIVITY_COMP_METRICS ADD CONSTRAINT F_C_ACTCMPM_FK5 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  2448. GO
  2449.  
  2450. ALTER TABLE RIDW.F_C_ACTIVITY_COMP_METRICS ADD CONSTRAINT F_C_ACTCMPM_FK7 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_ACTIVITY_STATE (STATE_ID)
  2451. GO
  2452.  
  2453. ALTER TABLE RIDW.F_C_ACTIVITY_COMP_METRICS ADD CONSTRAINT F_C_ACTCMPM_FK8 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_PRIORITY (PRIORITY_ID)
  2454. GO
  2455.  
  2456. ALTER TABLE RIDW.F_C_ACTIVITY_COMP_METRICS ADD CONSTRAINT F_C_ACTCMPM_FK9 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT (COMPONENT_ID)
  2457. GO
  2458.  
  2459. ALTER TABLE RIDW.F_ACT_COM_CREATION_DT_METRICS ADD CONSTRAINT F_ACTCOMCRDM_FK1 FOREIGN KEY (ACTIVITY_CLASS_ID) REFERENCES RIDW.D_ACTIVITY_CLASSIFICATION (ACTIVITY_CLASS_ID)
  2460. GO
  2461.  
  2462. ALTER TABLE RIDW.F_ACT_COM_CREATION_DT_METRICS ADD CONSTRAINT F_ACTCOMCRDM_FK2 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_ACTIVITY_STATE (STATE_ID)
  2463. GO
  2464.  
  2465. ALTER TABLE RIDW.F_ACT_COM_CREATION_DT_METRICS ADD CONSTRAINT F_ACTCOMCRDM_FK3 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  2466. GO
  2467.  
  2468. ALTER TABLE RIDW.F_ACT_COM_CREATION_DT_METRICS ADD CONSTRAINT F_ACTCOMCRDM_FK5 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID)
  2469. GO
  2470.  
  2471. ALTER TABLE RIDW.F_ACT_COM_CREATION_DT_METRICS ADD CONSTRAINT F_ACTCOMCRDM_FK6 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_PRIORITY (PRIORITY_ID)
  2472. GO
  2473.  
  2474. ALTER TABLE RIDW.F_ACT_COM_CREATION_DT_METRICS ADD CONSTRAINT F_ACTCOMCRDM_FK7 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT (COMPONENT_ID)
  2475. GO
  2476.  
  2477. ALTER TABLE RIDW.H_ACTIVITY_ITER_METRICS ADD CONSTRAINT H_ACT_ITER_MET_FK1 FOREIGN KEY (ACTIVITY_ID) REFERENCES RIDW.D_ACTIVITY(ACTIVITY_ID) ON DELETE CASCADE
  2478. GO
  2479.  
  2480. ALTER TABLE RIDW.H_ACTIVITY_ITER_METRICS ADD CONSTRAINT H_ACT_ITER_MET_FK2 FOREIGN KEY (ACTIVITY_METRICS_ID) REFERENCES RIDW.F_ACTIVITY_ITER_METRICS(ACTIVITY_METRICS_ID) ON DELETE CASCADE
  2481. GO
  2482.  
  2483. ALTER TABLE RIDW.H_ACTIVITY_REQ_METRICS ADD CONSTRAINT H_ACT_REQ_MET_FK1 FOREIGN KEY (ACTIVITY_ID) REFERENCES RIDW.D_ACTIVITY(ACTIVITY_ID) ON DELETE CASCADE
  2484. GO
  2485.  
  2486. ALTER TABLE RIDW.H_ACTIVITY_REQ_METRICS ADD CONSTRAINT H_ACT_REQ_MET_FK2 FOREIGN KEY (ACTIVITY_METRICS_ID) REFERENCES RIDW.F_ACTIVITY_REQ_METRICS(ACTIVITY_METRICS_ID) ON DELETE CASCADE
  2487. GO
  2488.  
  2489. ALTER TABLE RIDW.H_ACT_ITER_CREATION_DT_METRICS ADD CONSTRAINT H_AICRD_MET_FK1 FOREIGN KEY (ACTIVITYCRD_METRICS_ID) REFERENCES RIDW.F_ACT_ITER_CREATION_DT_METRICS(ACTIVITYCRD_METRICS_ID) ON DELETE CASCADE
  2490. GO
  2491.  
  2492. ALTER TABLE RIDW.H_ACT_ITER_CREATION_DT_METRICS ADD CONSTRAINT H_AICRD_MET_FK2 FOREIGN KEY (ACTIVITY_ID) REFERENCES RIDW.D_ACTIVITY(ACTIVITY_ID) ON DELETE CASCADE
  2493. GO
  2494.  
  2495. ALTER TABLE RIDW.H_ACT_REQUI_CREAT_DT_METRICS ADD CONSTRAINT H_ARCRD_MET_FK1 FOREIGN KEY (ACTIVITYCRD_METRICS_ID) REFERENCES RIDW.F_ACT_REQU_CREATION_DT_METRICS(ACTIVITYCRD_METRICS_ID) ON DELETE CASCADE
  2496. GO
  2497.  
  2498. ALTER TABLE RIDW.H_ACT_REQUI_CREAT_DT_METRICS ADD CONSTRAINT H_ARCRD_MET_FK2 FOREIGN KEY (ACTIVITY_ID) REFERENCES RIDW.D_ACTIVITY(ACTIVITY_ID) ON DELETE CASCADE
  2499. GO
  2500.  
  2501. ALTER TABLE RIDW.H_BUILD_REQUI_ATTEMPTS ADD CONSTRAINT H_BRRQA_FK2 FOREIGN KEY (BUILD_METRIC_ID) REFERENCES RIDW.F_BUILD_REQUI_METRICS (BUILD_METRIC_ID) ON DELETE CASCADE
  2502. GO
  2503.  
  2504. ALTER TABLE RIDW.H_BUILD_REQUI_ATTEMPTS ADD CONSTRAINT H_BRQA_FK1 FOREIGN KEY (BUILD_ID) REFERENCES RIDW.D_BUILD(BUILD_ID) ON DELETE CASCADE
  2505. GO
  2506.  
  2507. ALTER TABLE RIDW.H_BUILD_REQUI_FAIL ADD CONSTRAINT H_BRQF_FK1 FOREIGN KEY (BUILD_ID) REFERENCES RIDW.D_BUILD(BUILD_ID) ON DELETE CASCADE
  2508. GO
  2509.  
  2510. ALTER TABLE RIDW.H_BUILD_REQUI_FAIL ADD CONSTRAINT H_BRQF_FK2 FOREIGN KEY (BUILD_METRIC_ID) REFERENCES RIDW.F_BUILD_REQUI_METRICS(BUILD_METRIC_ID) ON DELETE CASCADE
  2511. GO
  2512.  
  2513. ALTER TABLE RIDW.H_BUILD_REQUI_PASS ADD CONSTRAINT H_BRQP_FK1 FOREIGN KEY (BUILD_ID) REFERENCES RIDW.D_BUILD(BUILD_ID) ON DELETE CASCADE
  2514. GO
  2515.  
  2516. ALTER TABLE RIDW.H_BUILD_REQUI_PASS ADD CONSTRAINT H_BRQP_FK2 FOREIGN KEY (BUILD_METRIC_ID) REFERENCES RIDW.F_BUILD_REQUI_METRICS(BUILD_METRIC_ID) ON DELETE CASCADE
  2517. GO
  2518.  
  2519. ALTER TABLE RIDW.H_BUILD_REQU_ATTEMPTS ADD CONSTRAINT H_BRQUA_FK1 FOREIGN KEY (BUILD_ID) REFERENCES RIDW.D_BUILD(BUILD_ID) ON DELETE CASCADE
  2520. GO
  2521.  
  2522. ALTER TABLE RIDW.H_BUILD_REQU_ATTEMPTS ADD CONSTRAINT H_BRQUA_FK2 FOREIGN KEY (BUILD_METRIC_ID) REFERENCES RIDW.F_BUILD_REQU_METRICS(BUILD_METRIC_ID) ON DELETE CASCADE
  2523. GO
  2524.  
  2525. ALTER TABLE RIDW.H_BUILD_REQU_EXEC_DT_MET_TOT ADD CONSTRAINT H_BREDT_MET_FK1 FOREIGN KEY (BUILD_EXEC_METRIC_ID) REFERENCES RIDW.F_BUILD_REQU_EXEC_DT_METRICS(BUILD_EXEC_METRIC_ID) ON DELETE CASCADE
  2526. GO
  2527.  
  2528. ALTER TABLE RIDW.H_BUILD_REQU_EXEC_DT_MET_TOT ADD CONSTRAINT H_BREDT_MET_FK2 FOREIGN KEY (BUILD_ID) REFERENCES RIDW.D_BUILD(BUILD_ID) ON DELETE CASCADE
  2529. GO
  2530.  
  2531. ALTER TABLE RIDW.H_EXECRESPOINTS_ITER_METRICS ADD CONSTRAINT H_EXPI_MET_FK1 FOREIGN KEY (EXECRES_METRIC_ID) REFERENCES RIDW.F_EXECRESPOINTS_ITER_METRICS(EXECRES_METRIC_ID) ON DELETE CASCADE
  2532. GO
  2533.  
  2534. ALTER TABLE RIDW.H_EXECRESPOINTS_ITER_METRICS ADD CONSTRAINT H_EXPI_MET_FK2 FOREIGN KEY (EXECUTION_RESULT_ID) REFERENCES RIDW.D_EXECUTION_RESULT(EXECUTION_RESULT_ID) ON DELETE CASCADE
  2535. GO
  2536.  
  2537. ALTER TABLE RIDW.H_EXECUTION_RES_ITER_METRICS ADD CONSTRAINT H_ERI_MET_FK1 FOREIGN KEY (EXECUTION_RESULT_ID) REFERENCES RIDW.D_EXECUTION_RESULT(EXECUTION_RESULT_ID) ON DELETE CASCADE
  2538. GO
  2539.  
  2540. ALTER TABLE RIDW.H_EXECUTION_RES_ITER_METRICS ADD CONSTRAINT H_ERI_MET_FK2 FOREIGN KEY (EXERES_METRICS_ID) REFERENCES RIDW.F_EXECUTION_RES_ITER_METRICS(EXERES_METRICS_ID) ON DELETE CASCADE
  2541. GO
  2542.  
  2543. ALTER TABLE RIDW.H_EXEC_WORKITEM_ITER_METRICS ADD CONSTRAINT HEWI_MET_FK1 FOREIGN KEY (EXECWORKITEM_ID) REFERENCES RIDW.D_EXECUTION_WORKITEM(EXECWORKITEM_ID) ON DELETE CASCADE
  2544. GO
  2545.  
  2546. ALTER TABLE RIDW.H_EXEC_WORKITEM_ITER_METRICS ADD CONSTRAINT HEWI_MET_FK2 FOREIGN KEY (EXECWORKITEM_METRIC_ID) REFERENCES RIDW.F_EXEC_WORKITEM_ITER_METRICS(EXECWORKITEM_METRIC_ID) ON DELETE CASCADE
  2547. GO
  2548.  
  2549. ALTER TABLE RIDW.H_EXEC_WORKITEM_REQU_METRICS ADD CONSTRAINT HEWR_MET_FK1 FOREIGN KEY (EXECWORKITEM_ID) REFERENCES RIDW.D_EXECUTION_WORKITEM(EXECWORKITEM_ID) ON DELETE CASCADE
  2550. GO
  2551.  
  2552. ALTER TABLE RIDW.H_EXEC_WORKITEM_REQU_METRICS ADD CONSTRAINT HEWR_MET_FK2 FOREIGN KEY (EXECWORKITEM_METRIC_ID) REFERENCES RIDW.F_EXEC_WORKITEM_REQU_METRICS(EXECWORKITEM_METRIC_ID) ON DELETE CASCADE
  2553. GO
  2554.  
  2555. ALTER TABLE RIDW.H_REQUEST_AGING_TPLN_MAX ADD CONSTRAINT H_RAT_MX_FK1 FOREIGN KEY (AGING_METRIC_ID) REFERENCES RIDW.F_REQUEST_TPLN_AGING(AGING_METRIC_ID) ON DELETE CASCADE
  2556. GO
  2557.  
  2558. ALTER TABLE RIDW.H_REQUEST_AGING_TPLN_MAX ADD CONSTRAINT H_RAT_MX_FK2 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST(REQUEST_ID) ON DELETE CASCADE
  2559. GO
  2560.  
  2561. ALTER TABLE RIDW.H_REQUEST_AGING_TPLN_MIN ADD CONSTRAINT H_RAT_MI_FK1 FOREIGN KEY (AGING_METRIC_ID) REFERENCES RIDW.F_REQUEST_TPLN_AGING(AGING_METRIC_ID) ON DELETE CASCADE
  2562. GO
  2563.  
  2564. ALTER TABLE RIDW.H_REQUEST_AGING_TPLN_MIN ADD CONSTRAINT H_RAT_MI_FK2 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST(REQUEST_ID) ON DELETE CASCADE
  2565. GO
  2566.  
  2567. ALTER TABLE RIDW.H_REQUEST_AGING_TPLN_TOTAL ADD CONSTRAINT H_RAT_TO_FK1 FOREIGN KEY (AGING_METRIC_ID) REFERENCES RIDW.F_REQUEST_TPLN_AGING(AGING_METRIC_ID) ON DELETE CASCADE
  2568. GO
  2569.  
  2570. ALTER TABLE RIDW.H_REQUEST_AGING_TPLN_TOTAL ADD CONSTRAINT H_RAT_TO_FK2 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST(REQUEST_ID) ON DELETE CASCADE
  2571. GO
  2572.  
  2573. ALTER TABLE RIDW.H_REQUEST_CUST_METRICS_BLOCK ADD CONSTRAINT H_RCMBL_FK1 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST(REQUEST_ID) ON DELETE CASCADE
  2574. GO
  2575.  
  2576. ALTER TABLE RIDW.H_REQUEST_CUST_METRICS_BLOCK ADD CONSTRAINT H_RCBL_MET_FK2 FOREIGN KEY (REQUEST_METRIC_ID) REFERENCES RIDW.F_REQUEST_CUST_METRICS(REQUEST_METRIC_ID) ON DELETE CASCADE
  2577. GO
  2578.  
  2579. ALTER TABLE RIDW.H_REQUEST_CUST_METRICS_TOTAL ADD CONSTRAINT H_RCTO_MET_FK1 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST(REQUEST_ID) ON DELETE CASCADE
  2580. GO
  2581.  
  2582. ALTER TABLE RIDW.H_REQUEST_CUST_METRICS_TOTAL ADD CONSTRAINT H_RCTO_MET_FK2 FOREIGN KEY (REQUEST_METRIC_ID) REFERENCES RIDW.F_REQUEST_CUST_METRICS(REQUEST_METRIC_ID) ON DELETE CASCADE
  2583. GO
  2584.  
  2585. ALTER TABLE RIDW.H_REQUEST_REQUI_FAIL_METRICS ADD CONSTRAINT H_RRF_MET_FK1 FOREIGN KEY (REQFAIL_METRIC_ID) REFERENCES RIDW.F_REQUEST_REQUI_FAIL_METRICS(REQFAIL_METRIC_ID) ON DELETE CASCADE
  2586. GO
  2587.  
  2588. ALTER TABLE RIDW.H_REQUEST_REQUI_FAIL_METRICS ADD CONSTRAINT H_RRF_MET_FK2 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST(REQUEST_ID) ON DELETE CASCADE
  2589. GO
  2590.  
  2591. ALTER TABLE RIDW.H_REQUEST_REQUI_METRICS_BLOCK ADD CONSTRAINT H_RRIBL_MET_FK1 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST(REQUEST_ID) ON DELETE CASCADE
  2592. GO
  2593.  
  2594. ALTER TABLE RIDW.H_REQUEST_REQUI_METRICS_BLOCK ADD CONSTRAINT H_RRIBL_MET_FK2 FOREIGN KEY (REQUEST_METRIC_ID) REFERENCES RIDW.F_REQUEST_REQUI_METRICS(REQUEST_METRIC_ID) ON DELETE CASCADE
  2595. GO
  2596.  
  2597. ALTER TABLE RIDW.H_REQUEST_REQUI_METRICS_TOTAL ADD CONSTRAINT H_RRITO_MET_FK1 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST(REQUEST_ID) ON DELETE CASCADE
  2598. GO
  2599.  
  2600. ALTER TABLE RIDW.H_REQUEST_REQUI_METRICS_TOTAL ADD CONSTRAINT H_RRITO_MET_FK2 FOREIGN KEY (REQUEST_METRIC_ID) REFERENCES RIDW.F_REQUEST_REQUI_METRICS(REQUEST_METRIC_ID) ON DELETE CASCADE
  2601. GO
  2602.  
  2603. ALTER TABLE RIDW.H_REQUEST_RES_REQUI_DT_METRICS ADD CONSTRAINT H_RRRQD_MET_FK1 FOREIGN KEY (REQDT_METRIC_ID) REFERENCES RIDW.F_REQUEST_RES_REQUI_DT_METRICS(REQDT_METRIC_ID) ON DELETE CASCADE
  2604. GO
  2605.  
  2606. ALTER TABLE RIDW.H_REQUEST_RES_REQUI_DT_METRICS ADD CONSTRAINT H_RRRQD_MET_FK2 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST(REQUEST_ID) ON DELETE CASCADE
  2607. GO
  2608.  
  2609. ALTER TABLE RIDW.H_REQUEST_RES_TPLN_DT_METRICS ADD CONSTRAINT H_RRETD_MET_FK1 FOREIGN KEY (REQDT_METRIC_ID) REFERENCES RIDW.F_REQUEST_RES_TPLN_DT_METRICS(REQDT_METRIC_ID) ON DELETE CASCADE
  2610. GO
  2611.  
  2612. ALTER TABLE RIDW.H_REQUEST_RES_TPLN_DT_METRICS ADD CONSTRAINT H_RRETD_MET_FK2 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST(REQUEST_ID) ON DELETE CASCADE
  2613. GO
  2614.  
  2615. ALTER TABLE RIDW.H_REQUEST_TPLN_FAIL_METRICS ADD CONSTRAINT H_RTF_MET_FK1 FOREIGN KEY (REQFAIL_METRIC_ID) REFERENCES RIDW.F_REQUEST_TPLN_FAIL_METRICS(REQFAIL_METRIC_ID) ON DELETE CASCADE
  2616. GO
  2617.  
  2618. ALTER TABLE RIDW.H_REQUEST_TPLN_FAIL_METRICS ADD CONSTRAINT H_RTF_MET_FK2 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST(REQUEST_ID) ON DELETE CASCADE
  2619. GO
  2620.  
  2621. ALTER TABLE RIDW.H_REQUEST_TPLN_METRICS_BLOCK ADD CONSTRAINT H_RQTPB_MET_FK1 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST(REQUEST_ID) ON DELETE CASCADE
  2622. GO
  2623.  
  2624. ALTER TABLE RIDW.H_REQUEST_TPLN_METRICS_BLOCK ADD CONSTRAINT H_RQTPB_MET_FK2 FOREIGN KEY (REQUEST_METRIC_ID) REFERENCES RIDW.F_REQUEST_TPLN_METRICS(REQUEST_METRIC_ID) ON DELETE CASCADE
  2625. GO
  2626.  
  2627. ALTER TABLE RIDW.H_REQUEST_TPLN_METRICS_TOTAL ADD CONSTRAINT H_RQTPT_MET_FK1 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST(REQUEST_ID) ON DELETE CASCADE
  2628. GO
  2629.  
  2630. ALTER TABLE RIDW.H_REQUEST_TPLN_METRICS_TOTAL ADD CONSTRAINT H_RQTPT_MET_FK2 FOREIGN KEY (REQUEST_METRIC_ID) REFERENCES RIDW.F_REQUEST_TPLN_METRICS(REQUEST_METRIC_ID) ON DELETE CASCADE
  2631. GO
  2632.  
  2633. ALTER TABLE RIDW.H_REQUEST_TPLN_TURNAROUND_MAX ADD CONSTRAINT H_RQTPT_MAX_FK1 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST(REQUEST_ID) ON DELETE CASCADE
  2634. GO
  2635.  
  2636. ALTER TABLE RIDW.H_REQUEST_TPLN_TURNAROUND_MAX ADD CONSTRAINT H_RQTPT_MAX_FK2 FOREIGN KEY (TURNAROUND_METRIC_ID) REFERENCES RIDW.F_REQUEST_TPLN_TURNAROUND(TURNAROUND_METRIC_ID) ON DELETE CASCADE
  2637. GO
  2638.  
  2639. ALTER TABLE RIDW.H_REQUEST_TPLN_TURNAROUND_MIN ADD CONSTRAINT H_RQTPT_MIN_FK1 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST(REQUEST_ID) ON DELETE CASCADE
  2640. GO
  2641.  
  2642. ALTER TABLE RIDW.H_REQUEST_TPLN_TURNAROUND_MIN ADD CONSTRAINT H_RQTPT_MIN_FK2 FOREIGN KEY (TURNAROUND_METRIC_ID) REFERENCES RIDW.F_REQUEST_TPLN_TURNAROUND(TURNAROUND_METRIC_ID) ON DELETE CASCADE
  2643. GO
  2644.  
  2645. ALTER TABLE RIDW.H_REQUEST_TPLN_TURNAROUND_TOT ADD CONSTRAINT H_RQTPT_TOT_FK1 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST(REQUEST_ID) ON DELETE CASCADE
  2646. GO
  2647.  
  2648. ALTER TABLE RIDW.H_REQUEST_TPLN_TURNAROUND_TOT ADD CONSTRAINT H_RQTPT_TOT_FK2 FOREIGN KEY (TURNAROUND_METRIC_ID) REFERENCES RIDW.F_REQUEST_TPLN_TURNAROUND(TURNAROUND_METRIC_ID) ON DELETE CASCADE
  2649. GO
  2650.  
  2651. ALTER TABLE RIDW.H_REQUE_CLOSE_REQUI_DT_METRICS ADD CONSTRAINT H_RCRUD_MET_FK1 FOREIGN KEY (REQCDT_METRIC_ID) REFERENCES RIDW.F_REQUE_CLOSE_REQUI_DT_METRICS(REQCDT_METRIC_ID) ON DELETE CASCADE
  2652. GO
  2653.  
  2654. ALTER TABLE RIDW.H_REQUE_CLOSE_REQUI_DT_METRICS ADD CONSTRAINT H_RCRUD_MET_FK2 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST(REQUEST_ID) ON DELETE CASCADE
  2655. GO
  2656.  
  2657. ALTER TABLE RIDW.H_REQUE_CLOSE_TPLN_DT_METRICS ADD CONSTRAINT H_RCTPD_MET_FK1 FOREIGN KEY (REQCDT_METRIC_ID) REFERENCES RIDW.F_REQUE_CLOSE_TPLN_DT_METRICS(REQCDT_METRIC_ID) ON DELETE CASCADE
  2658. GO
  2659.  
  2660. ALTER TABLE RIDW.H_REQUE_CLOSE_TPLN_DT_METRICS ADD CONSTRAINT H_RCTPD_MET_FK2 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST(REQUEST_ID) ON DELETE CASCADE
  2661. GO
  2662.  
  2663. ALTER TABLE RIDW.H_REQUI_TCASE_METRICS_CHANGES ADD CONSTRAINT H_RTCCH_MET_FK1 FOREIGN KEY (REQUIREMENT_ID) REFERENCES RIDW.D_REQUIREMENT(REQUIREMENT_ID) ON DELETE CASCADE
  2664. GO
  2665.  
  2666. ALTER TABLE RIDW.H_REQUI_TCASE_METRICS_CHANGES ADD CONSTRAINT H_RTCCH_MET_FK2 FOREIGN KEY (REQ_METRIC_ID) REFERENCES RIDW.F_REQUI_TCASE_METRICS(REQ_METRIC_ID) ON DELETE CASCADE
  2667. GO
  2668.  
  2669. ALTER TABLE RIDW.H_REQUI_TCASE_METRICS_TOTAL ADD CONSTRAINT H_RTCT_MET_FK1 FOREIGN KEY (REQUIREMENT_ID) REFERENCES RIDW.D_REQUIREMENT(REQUIREMENT_ID) ON DELETE CASCADE
  2670. GO
  2671.  
  2672. ALTER TABLE RIDW.H_REQUI_TCASE_METRICS_TOTAL ADD CONSTRAINT H_RTCT_MET_FK2 FOREIGN KEY (REQ_METRIC_ID) REFERENCES RIDW.F_REQUI_TCASE_METRICS(REQ_METRIC_ID) ON DELETE CASCADE
  2673. GO
  2674.  
  2675. ALTER TABLE RIDW.H_REQUI_TPLN_METRICS_CHANGES ADD CONSTRAINT H_RTPCH_MET_FK1 FOREIGN KEY (REQUIREMENT_ID) REFERENCES RIDW.D_REQUIREMENT(REQUIREMENT_ID) ON DELETE CASCADE
  2676. GO
  2677.  
  2678. ALTER TABLE RIDW.H_REQUI_TPLN_METRICS_CHANGES ADD CONSTRAINT H_RTPCH_MET_FK2 FOREIGN KEY (REQ_METRIC_ID) REFERENCES RIDW.F_REQUIREMENT_TPLN_METRICS(REQ_METRIC_ID) ON DELETE CASCADE
  2679. GO
  2680.  
  2681. ALTER TABLE RIDW.H_REQUI_TPLN_METRICS_TOTAL ADD CONSTRAINT H_RTPTO_MET_FK1 FOREIGN KEY (REQUIREMENT_ID) REFERENCES RIDW.D_REQUIREMENT(REQUIREMENT_ID) ON DELETE CASCADE
  2682. GO
  2683.  
  2684. ALTER TABLE RIDW.H_REQUI_TPLN_METRICS_TOTAL ADD CONSTRAINT H_RTPTO_MET_FK2 FOREIGN KEY (REQ_METRIC_ID) REFERENCES RIDW.F_REQUIREMENT_TPLN_METRICS(REQ_METRIC_ID) ON DELETE CASCADE
  2685. GO
  2686.  
  2687. ALTER TABLE RIDW.H_REQU_CREATI_REQUI_DT_METRICS ADD CONSTRAINT H_RCRD_MET_FK1 FOREIGN KEY (REQDT_METRIC_ID) REFERENCES RIDW.F_REQU_CREATI_REQUI_DT_METRICS(REQDT_METRIC_ID) ON DELETE CASCADE
  2688. GO
  2689.  
  2690. ALTER TABLE RIDW.H_REQU_CREATI_REQUI_DT_METRICS ADD CONSTRAINT H_RCRD_MET_FK2 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST(REQUEST_ID) ON DELETE CASCADE
  2691. GO
  2692.  
  2693. ALTER TABLE RIDW.H_REQU_CREATI_TPLN_DT_METRICS ADD CONSTRAINT H_RCTTPD_MET_FK1 FOREIGN KEY (REQDT_METRIC_ID) REFERENCES RIDW.F_REQU_CREATI_TPLN_DT_METRICS(REQDT_METRIC_ID) ON DELETE CASCADE
  2694. GO
  2695.  
  2696. ALTER TABLE RIDW.H_REQU_CREATI_TPLN_DT_METRICS ADD CONSTRAINT H_RCTTPD_MET_FK2 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST(REQUEST_ID) ON DELETE CASCADE
  2697. GO
  2698.  
  2699. ALTER TABLE RIDW.H_TASK_CLOSE_COMP_DT_METRICS ADD CONSTRAINT H_TCCMD_MET_FK1 FOREIGN KEY (TASKCLS_METRICS_ID) REFERENCES RIDW.F_TASK_CLOSE_COMP_DT_METRICS(TASKCLS_METRICS_ID) ON DELETE CASCADE
  2700. GO
  2701.  
  2702. ALTER TABLE RIDW.H_TASK_CLOSE_COMP_DT_METRICS ADD CONSTRAINT H_TCCMD_MET_FK2 FOREIGN KEY (TASK_ID) REFERENCES RIDW.D_TASK(TASK_ID) ON DELETE CASCADE
  2703. GO
  2704.  
  2705. ALTER TABLE RIDW.H_TASK_COMP_METRICS ADD CONSTRAINT H_TKC_MET_FK1 FOREIGN KEY (TASK_ID) REFERENCES RIDW.D_TASK(TASK_ID) ON DELETE CASCADE
  2706. GO
  2707.  
  2708. ALTER TABLE RIDW.H_TASK_COMP_METRICS ADD CONSTRAINT H_TKC_MET_FK2 FOREIGN KEY (TASK_METRICS_ID) REFERENCES RIDW.F_TASK_COMP_METRICS(TASK_METRICS_ID) ON DELETE CASCADE
  2709. GO
  2710.  
  2711. ALTER TABLE RIDW.H_TASK_CREATE_COMP_DT_METRICS ADD CONSTRAINT H_TCRCMD_MET_FK1 FOREIGN KEY (TASKCRD_METRICS_ID) REFERENCES RIDW.F_TASK_CREATE_COMP_DT_METRICS(TASKCRD_METRICS_ID) ON DELETE CASCADE
  2712. GO
  2713.  
  2714. ALTER TABLE RIDW.H_TASK_CREATE_COMP_DT_METRICS ADD CONSTRAINT H_TCRCMD_MET_FK2 FOREIGN KEY (TASK_ID) REFERENCES RIDW.D_TASK(TASK_ID) ON DELETE CASCADE
  2715. GO
  2716.  
  2717. ALTER TABLE RIDW.H_TESTCASE_ITER_METRICS ADD CONSTRAINT H_TCI_MET_FK1 FOREIGN KEY (TESTCASE_ID) REFERENCES RIDW.D_TESTCASE(TESTCASE_ID) ON DELETE CASCADE
  2718. GO
  2719.  
  2720. ALTER TABLE RIDW.H_TESTCASE_ITER_METRICS ADD CONSTRAINT H_TCI_MET_FK2 FOREIGN KEY (TSTCASE_METRIC_ID) REFERENCES RIDW.F_TESTCASE_ITER_METRICS(TSTCASE_METRIC_ID) ON DELETE CASCADE
  2721. GO
  2722.  
  2723. ALTER TABLE RIDW.H_TESTCASE_REQUI_METRICS ADD CONSTRAINT H_TPJR_MET_FK1 FOREIGN KEY (TESTCASE_ID) REFERENCES RIDW.D_TESTCASE(TESTCASE_ID) ON DELETE CASCADE
  2724. GO
  2725.  
  2726. ALTER TABLE RIDW.H_TESTCASE_REQUI_METRICS ADD CONSTRAINT H_TPJR_MET_FK2 FOREIGN KEY (TSTCASE_METRIC_ID) REFERENCES RIDW.F_TESTCASE_REQUI_METRICS(TSTCASE_METRIC_ID) ON DELETE CASCADE
  2727. GO
  2728.  
  2729. ALTER TABLE RIDW.H_TEXT_FILE_VERS_DT_METRICS_CH ADD CONSTRAINT H_TXFVDCH_MET_FK1 FOREIGN KEY (FILE_VERSION_ID) REFERENCES RIDW.D_FILE_VERSION(FILE_VERSION_ID) ON DELETE CASCADE
  2730. GO
  2731.  
  2732. ALTER TABLE RIDW.H_TEXT_FILE_VERS_DT_METRICS_CH ADD CONSTRAINT H_TXFVDCH_MET_FK2 FOREIGN KEY (SLOC_METRICS_ID) REFERENCES RIDW.F_TEXT_FILE_VERSION_DT_METRICS(SLOC_METRICS_ID) ON DELETE CASCADE
  2733. GO
  2734.  
  2735. ALTER TABLE RIDW.H_TEXT_FILE_VERS_DT_METRICS_TO ADD CONSTRAINT H_TXFVDTO_MET_FK1 FOREIGN KEY (FILE_VERSION_ID) REFERENCES RIDW.D_FILE_VERSION(FILE_VERSION_ID) ON DELETE CASCADE
  2736. GO
  2737.  
  2738. ALTER TABLE RIDW.H_TEXT_FILE_VERS_DT_METRICS_TO ADD CONSTRAINT H_TXFVDTO_MET_FK2 FOREIGN KEY (SLOC_METRICS_ID) REFERENCES RIDW.F_TEXT_FILE_VERSION_DT_METRICS(SLOC_METRICS_ID) ON DELETE CASCADE
  2739. GO
  2740.  
  2741. ALTER TABLE RIDW.H_TEXT_FILE_VER_REQ_METRICS_CH ADD CONSTRAINT H_TXFVRCH_MET_FK1 FOREIGN KEY (FILE_VERSION_ID) REFERENCES RIDW.D_FILE_VERSION(FILE_VERSION_ID) ON DELETE CASCADE
  2742. GO
  2743.  
  2744. ALTER TABLE RIDW.H_TEXT_FILE_VER_REQ_METRICS_CH ADD CONSTRAINT H_TXFVRCH_MET_FK2 FOREIGN KEY (SLOC_METRICS_ID) REFERENCES RIDW.F_TEXT_FILE_VER_REQU_METRICS(SLOC_METRICS_ID) ON DELETE CASCADE
  2745. GO
  2746.  
  2747. ALTER TABLE RIDW.H_TEXT_FILE_VER_REQ_METRICS_TO ADD CONSTRAINT H_TXFVRTO_MET_FK1 FOREIGN KEY (FILE_VERSION_ID) REFERENCES RIDW.D_FILE_VERSION(FILE_VERSION_ID) ON DELETE CASCADE
  2748. GO
  2749.  
  2750. ALTER TABLE RIDW.H_TEXT_FILE_VER_REQ_METRICS_TO ADD CONSTRAINT H_TXFVRTO_MET_FK2 FOREIGN KEY (SLOC_METRICS_ID) REFERENCES RIDW.F_TEXT_FILE_VER_REQU_METRICS(SLOC_METRICS_ID) ON DELETE CASCADE
  2751. GO
  2752.  
  2753. ALTER TABLE RIDW.H_TXT_FILE_VERSREQ_DT_METR_CH ADD CONSTRAINT H_TXFVRDC_MET_FK1 FOREIGN KEY (FILE_VERSION_ID) REFERENCES RIDW.D_FILE_VERSION(FILE_VERSION_ID) ON DELETE CASCADE
  2754. GO
  2755.  
  2756. ALTER TABLE RIDW.H_TXT_FILE_VERSREQ_DT_METR_CH ADD CONSTRAINT H_TXFVRDC_MET_FK2 FOREIGN KEY (SLOC_METRICS_ID) REFERENCES RIDW.F_TEXT_FILE_VERSREQ_DT_METRICS(SLOC_METRICS_ID) ON DELETE CASCADE
  2757. GO
  2758.  
  2759. ALTER TABLE RIDW.H_TXT_FILE_VERSREQ_DT_METR_TO ADD CONSTRAINT H_TXFVRDT_MET_FK1 FOREIGN KEY (FILE_VERSION_ID) REFERENCES RIDW.D_FILE_VERSION(FILE_VERSION_ID) ON DELETE CASCADE
  2760. GO
  2761.  
  2762. ALTER TABLE RIDW.H_TXT_FILE_VERSREQ_DT_METR_TO ADD CONSTRAINT H_TXFVRDT_MET_FK2 FOREIGN KEY (SLOC_METRICS_ID) REFERENCES RIDW.F_TEXT_FILE_VERSREQ_DT_METRICS(SLOC_METRICS_ID) ON DELETE CASCADE
  2763. GO
  2764.  
  2765. ALTER TABLE RIDW.H_ACTIVITY_COMP_METRICS ADD CONSTRAINT H_ACTCOMPM_FK1 FOREIGN KEY (ACTIVITY_METRICS_ID) REFERENCES RIDW.F_ACTIVITY_COMP_METRICS (ACTIVITY_METRICS_ID) ON DELETE CASCADE
  2766. GO
  2767.  
  2768. ALTER TABLE RIDW.H_ACTIVITY_COMP_METRICS ADD CONSTRAINT H_ACTCOMPM_FK2 FOREIGN KEY (ACTIVITY_ID) REFERENCES RIDW.D_ACTIVITY (ACTIVITY_ID) ON DELETE CASCADE
  2769. GO
  2770.  
  2771. ALTER TABLE RIDW.H_ACT_COM_CREATION_DT_METRICS ADD CONSTRAINT H_ACTCOMCRDM_FK1 FOREIGN KEY (ACTIVITYCRD_METRICS_ID) REFERENCES RIDW.F_ACT_COM_CREATION_DT_METRICS (ACTIVITYCRD_METRICS_ID) ON DELETE CASCADE
  2772. GO
  2773.  
  2774. ALTER TABLE RIDW.H_ACT_COM_CREATION_DT_METRICS ADD CONSTRAINT H_ACTCOMCRDM_FK2 FOREIGN KEY (ACTIVITY_ID) REFERENCES RIDW.D_ACTIVITY (ACTIVITY_ID) ON DELETE CASCADE
  2775. GO
  2776.  
  2777. ALTER TABLE RIDW.F_TEXT_FILE_VER_BSLN_METRICS ADD CONSTRAINT F_TFVBSLN_FK1 FOREIGN KEY (FILE_ID) REFERENCES RIDW.D_FILE (FILE_ID)
  2778. GO
  2779.  
  2780. ALTER TABLE RIDW.F_TEXT_FILE_VER_BSLN_METRICS ADD CONSTRAINT F_TFVBSLN_FK2 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID)
  2781. GO
  2782.  
  2783. ALTER TABLE RIDW.F_TEXT_FILE_VER_BSLN_METRICS ADD CONSTRAINT F_TFVBSLN_FK3 FOREIGN KEY (FILE_STREAM_ID) REFERENCES RIDW.D_FILE_STREAM (FILE_STREAM_ID)
  2784. GO
  2785.  
  2786. ALTER TABLE RIDW.F_TEXT_FILE_VER_BSLN_METRICS ADD CONSTRAINT F_TFVBSLN_FK4 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  2787. GO
  2788.  
  2789. ALTER TABLE RIDW.F_TEXT_FILE_VER_BSLN_METRICS ADD CONSTRAINT F_TFVBSLN_FK6 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT (COMPONENT_ID)
  2790. GO
  2791.  
  2792. ALTER TABLE RIDW.F_TEXT_FILE_VER_BSLN_METRICS ADD CONSTRAINT F_TFVBSLN_FK7 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  2793. GO
  2794.  
  2795. ALTER TABLE RIDW.F_TEXT_FILE_VER_BSLN_METRICS ADD CONSTRAINT F_TFVBSLN_FK10 FOREIGN KEY (FILE_CLASS_ID) REFERENCES RIDW.D_FILE_CLASSIFICATION (FILE_CLASS_ID)
  2796. GO
  2797.  
  2798. ALTER TABLE RIDW.F_TEXT_FILE_VER_BSLN_METRICS ADD CONSTRAINT F_TFVBSLN_FK11 FOREIGN KEY (FILE_BASELINE_ID) REFERENCES RIDW.D_FILE_BASELINE (FILE_BASELINE_ID)
  2799. GO
  2800.  
  2801. ALTER TABLE RIDW.F_C_TEXT_FILE_VERBSLN_METRICS ADD CONSTRAINT F_CTXFVBSLN_FK1 FOREIGN KEY (ACTIVITY_ID) REFERENCES RIDW.D_ACTIVITY(ACTIVITY_ID)
  2802. GO
  2803.  
  2804. ALTER TABLE RIDW.F_C_TEXT_FILE_VERBSLN_METRICS ADD CONSTRAINT F_CTXFVBSLN_FK2 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT(COMPONENT_ID)
  2805. GO
  2806.  
  2807. ALTER TABLE RIDW.F_C_TEXT_FILE_VERBSLN_METRICS ADD CONSTRAINT F_CTXFVBSLN_FK3 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  2808. GO
  2809.  
  2810. ALTER TABLE RIDW.F_C_TEXT_FILE_VERBSLN_METRICS ADD CONSTRAINT F_CTXFVBSLN_FK5 FOREIGN KEY (FILE_CLASS_ID) REFERENCES RIDW.D_FILE_CLASSIFICATION(FILE_CLASS_ID)
  2811. GO
  2812.  
  2813. ALTER TABLE RIDW.F_C_TEXT_FILE_VERBSLN_METRICS ADD CONSTRAINT F_CTXFVBSLN_FK6 FOREIGN KEY (FILE_ID) REFERENCES RIDW.D_FILE(FILE_ID)
  2814. GO
  2815.  
  2816. ALTER TABLE RIDW.F_C_TEXT_FILE_VERBSLN_METRICS ADD CONSTRAINT F_CTXFVBSLN_FK7 FOREIGN KEY (FILE_STREAM_ID) REFERENCES RIDW.D_FILE_STREAM(FILE_STREAM_ID)
  2817. GO
  2818.  
  2819. ALTER TABLE RIDW.F_C_TEXT_FILE_VERBSLN_METRICS ADD CONSTRAINT F_CTXFVBSLN_FK8 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT(PROJECT_ID)
  2820. GO
  2821.  
  2822. ALTER TABLE RIDW.F_C_TEXT_FILE_VERBSLN_METRICS ADD CONSTRAINT F_CTXFVBSLN_FK9 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  2823. GO
  2824.  
  2825. ALTER TABLE RIDW.F_C_TEXT_FILE_VERBSLN_METRICS ADD CONSTRAINT F_CTXFVBSLN_FK10 FOREIGN KEY (FILE_BASELINE_ID) REFERENCES RIDW.D_FILE_BASELINE (FILE_BASELINE_ID)
  2826. GO
  2827.  
  2828. ALTER TABLE RIDW.H_TEXT_FILE_VERBSLN_METRICS_CH ADD CONSTRAINT H_TFVBSLNCH_FK1 FOREIGN KEY (SLOC_METRICS_ID) REFERENCES RIDW.F_TEXT_FILE_VER_BSLN_METRICS (SLOC_METRICS_ID) ON DELETE CASCADE
  2829. GO
  2830.  
  2831. ALTER TABLE RIDW.H_TEXT_FILE_VERBSLN_METRICS_CH ADD CONSTRAINT H_TFVBSLNCH_FK2 FOREIGN KEY (FILE_VERSION_ID) REFERENCES RIDW.D_FILE_VERSION (FILE_VERSION_ID) ON DELETE CASCADE
  2832. GO
  2833.  
  2834. ALTER TABLE RIDW.H_TEXT_FILE_VERBSLN_METRICS_TO ADD CONSTRAINT H_TFVBSLNT_FK1 FOREIGN KEY (SLOC_METRICS_ID) REFERENCES RIDW.F_TEXT_FILE_VER_BSLN_METRICS (SLOC_METRICS_ID) ON DELETE CASCADE
  2835. GO
  2836.  
  2837. ALTER TABLE RIDW.H_TEXT_FILE_VERBSLN_METRICS_TO ADD CONSTRAINT H_TFVBSLNT_FK2 FOREIGN KEY (FILE_VERSION_ID) REFERENCES RIDW.D_FILE_VERSION (FILE_VERSION_ID) ON DELETE CASCADE
  2838. GO
  2839.  
  2840. ALTER TABLE RIDW.F_MISSING_TIMESHEET_METRICS ADD CONSTRAINT F_MISSTIMSH_FK1 FOREIGN KEY (WEEK_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  2841. GO
  2842.  
  2843. ALTER TABLE RIDW.F_MISSING_TIMESHEET_METRICS ADD CONSTRAINT F_MISSTIMSH_FK3 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID)
  2844. GO
  2845.  
  2846. ALTER TABLE RIDW.F_MISSING_TIMESHEET_METRICS ADD CONSTRAINT F_MISSTIMSH_FK4 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  2847. GO
  2848.  
  2849. ALTER TABLE RIDW.F_MISSING_TIMESHEET_METRICS ADD CONSTRAINT F_MISSTIMSH_FK5 FOREIGN KEY (CHARGECODE_ID) REFERENCES RIDW.D_CHARGECODE (CHARGECODE_ID)
  2850. GO
  2851.  
  2852. ALTER TABLE RIDW.F_MISSING_TIMESHEET_METRICS ADD CONSTRAINT F_MISSTIMSH_FK6 FOREIGN KEY (POOL_ID) REFERENCES RIDW.D_POOL (POOL_ID)
  2853. GO
  2854.  
  2855. ALTER TABLE RIDW.F_MISSING_TIMESHEET_METRICS ADD CONSTRAINT F_MISSTIMSH_FK7 FOREIGN KEY (CITY_ID) REFERENCES RIDW.D_CITY (CITY_ID)
  2856. GO
  2857.  
  2858. ALTER TABLE RIDW.F_MISSING_TIMESHEET_METRICS ADD CONSTRAINT F_MISSTIMSH_FK8 FOREIGN KEY (ORGANIZATION_ID) REFERENCES RIDW.D_ORGANIZATION (ORGANIZATION_ID)
  2859. GO
  2860.  
  2861. ALTER TABLE RIDW.H_MISSING_TIMESHEET_METRICS ADD CONSTRAINT H_MISSTIMSH_FK1 FOREIGN KEY (TIMESHEET_METRICS_ID) REFERENCES RIDW.F_MISSING_TIMESHEET_METRICS (TIMESHEET_METRICS_ID) ON DELETE CASCADE
  2862. GO
  2863.  
  2864. ALTER TABLE RIDW.H_MISSING_TIMESHEET_METRICS ADD CONSTRAINT H_MISSTIMSH_FK2 FOREIGN KEY (ACTIVITY_ID) REFERENCES RIDW.D_ACTIVITY (ACTIVITY_ID) ON DELETE CASCADE
  2865. GO
  2866.  
  2867. ALTER TABLE RIDW.F_TIMESHEET_METRICS ADD CONSTRAINT F_TIMESH_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  2868. GO
  2869.  
  2870. ALTER TABLE RIDW.F_TIMESHEET_METRICS ADD CONSTRAINT F_TIMESH_FK2 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_TIMESHEET_STATE (STATE_ID)
  2871. GO
  2872.  
  2873. ALTER TABLE RIDW.F_TIMESHEET_METRICS ADD CONSTRAINT F_TIMESH_FK3 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID)
  2874. GO
  2875.  
  2876. ALTER TABLE RIDW.F_TIMESHEET_METRICS ADD CONSTRAINT F_TIMESH_FK4 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  2877. GO
  2878.  
  2879. ALTER TABLE RIDW.F_TIMESHEET_METRICS ADD CONSTRAINT F_TIMESH_FK5 FOREIGN KEY (CHARGECODE_ID) REFERENCES RIDW.D_CHARGECODE (CHARGECODE_ID)
  2880. GO
  2881.  
  2882. ALTER TABLE RIDW.F_TIMESHEET_METRICS ADD CONSTRAINT F_TIMESH_FK6 FOREIGN KEY (POOL_ID) REFERENCES RIDW.D_POOL (POOL_ID)
  2883. GO
  2884.  
  2885. ALTER TABLE RIDW.F_TIMESHEET_METRICS ADD CONSTRAINT F_TIMESH_FK7 FOREIGN KEY (CITY_ID) REFERENCES RIDW.D_CITY (CITY_ID)
  2886. GO
  2887.  
  2888. ALTER TABLE RIDW.F_TIMESHEET_METRICS ADD CONSTRAINT F_TIMESH_FK8 FOREIGN KEY (ORGANIZATION_ID) REFERENCES RIDW.D_ORGANIZATION (ORGANIZATION_ID)
  2889. GO
  2890.  
  2891. ALTER TABLE RIDW.H_TIMESHEET_METRICS ADD CONSTRAINT H_TIMESH_FK1 FOREIGN KEY (TIMESHEET_METRICS_ID) REFERENCES RIDW.F_TIMESHEET_METRICS (TIMESHEET_METRICS_ID) ON DELETE CASCADE
  2892. GO
  2893.  
  2894. ALTER TABLE RIDW.H_TIMESHEET_METRICS ADD CONSTRAINT H_TIMESH_FK2 FOREIGN KEY (ACTIVITY_ID) REFERENCES RIDW.D_ACTIVITY (ACTIVITY_ID) ON DELETE CASCADE
  2895. GO
  2896.  
  2897. ALTER TABLE RIDW.F_TIMESHEET_TIMECODE_METRICS ADD CONSTRAINT F_TIMESHTC_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  2898. GO
  2899.  
  2900. ALTER TABLE RIDW.F_TIMESHEET_TIMECODE_METRICS ADD CONSTRAINT F_TIMESHTC_FK2 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_TIMESHEET_STATE (STATE_ID)
  2901. GO
  2902.  
  2903. ALTER TABLE RIDW.F_TIMESHEET_TIMECODE_METRICS ADD CONSTRAINT F_TIMESHTC_FK3 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID)
  2904. GO
  2905.  
  2906. ALTER TABLE RIDW.F_TIMESHEET_TIMECODE_METRICS ADD CONSTRAINT F_TIMESHTC_FK4 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  2907. GO
  2908.  
  2909. ALTER TABLE RIDW.F_TIMESHEET_TIMECODE_METRICS ADD CONSTRAINT F_TIMESHTC_FK5 FOREIGN KEY (CHARGECODE_ID) REFERENCES RIDW.D_CHARGECODE (CHARGECODE_ID)
  2910. GO
  2911.  
  2912. ALTER TABLE RIDW.F_TIMESHEET_TIMECODE_METRICS ADD CONSTRAINT F_TIMESHTC_FK6 FOREIGN KEY (TIMECODE_ID) REFERENCES RIDW.D_TIMECODE (TIMECODE_ID)
  2913. GO
  2914.  
  2915. ALTER TABLE RIDW.F_TIMESHEET_TIMECODE_METRICS ADD CONSTRAINT F_TIMESHTC_FK7 FOREIGN KEY (ORGANIZATION_ID) REFERENCES RIDW.D_ORGANIZATION (ORGANIZATION_ID)
  2916. GO
  2917.  
  2918. ALTER TABLE RIDW.F_TIMESHEET_TIMECODE_METRICS ADD CONSTRAINT F_TIMESHTC_FK8 FOREIGN KEY (POOL_ID) REFERENCES RIDW.D_POOL (POOL_ID)
  2919. GO
  2920.  
  2921. ALTER TABLE RIDW.F_TIMESHEET_TIMECODE_METRICS ADD CONSTRAINT F_TIMESHTC_FK9 FOREIGN KEY (CITY_ID) REFERENCES RIDW.D_CITY (CITY_ID)
  2922. GO
  2923.  
  2924. ALTER TABLE RIDW.H_TIMESHEET_TIMECODE_METRICS ADD CONSTRAINT H_TIMESHTC_FK1 FOREIGN KEY (TIMESHEET_METRICS_ID) REFERENCES RIDW.F_TIMESHEET_TIMECODE_METRICS (TIMESHEET_METRICS_ID) ON DELETE CASCADE
  2925. GO
  2926.  
  2927. ALTER TABLE RIDW.H_TIMESHEET_TIMECODE_METRICS ADD CONSTRAINT H_TIMESHTC_FK2 FOREIGN KEY (ACTIVITY_ID) REFERENCES RIDW.D_ACTIVITY (ACTIVITY_ID) ON DELETE CASCADE
  2928. GO
  2929.  
  2930. ALTER TABLE RIDW.F_WK_PROJ_RESDEMSUPP_METRICS ADD CONSTRAINT F_WPJRESDSMET_FK1 FOREIGN KEY (WEEK_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  2931. GO
  2932.  
  2933. ALTER TABLE RIDW.F_WK_PROJ_RESDEMSUPP_METRICS ADD CONSTRAINT F_WPJRESDSMET_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  2934. GO
  2935.  
  2936. ALTER TABLE RIDW.F_WK_PROJ_RESDEMSUPP_METRICS ADD CONSTRAINT F_WPJRESDSMET_FK3 FOREIGN KEY (CITY_ID) REFERENCES RIDW.D_CITY (CITY_ID)
  2937. GO
  2938.  
  2939. ALTER TABLE RIDW.F_WK_PROJ_RESDEMSUPP_METRICS ADD CONSTRAINT F_WPJRESDSMET_FK4 FOREIGN KEY (ORGANIZATION_ID) REFERENCES RIDW.D_ORGANIZATION (ORGANIZATION_ID)
  2940. GO
  2941.  
  2942. ALTER TABLE RIDW.F_MO_PROJ_RESDEMSUPP_METRICS ADD CONSTRAINT F_MPJRESDSMET_FK1 FOREIGN KEY (MONTH_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  2943. GO
  2944.  
  2945. ALTER TABLE RIDW.F_MO_PROJ_RESDEMSUPP_METRICS ADD CONSTRAINT F_MPJRESDSMET_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  2946. GO
  2947.  
  2948. ALTER TABLE RIDW.F_MO_PROJ_RESDEMSUPP_METRICS ADD CONSTRAINT F_MPJRESDSMET_FK3 FOREIGN KEY (CITY_ID) REFERENCES RIDW.D_CITY (CITY_ID)
  2949. GO
  2950.  
  2951. ALTER TABLE RIDW.F_MO_PROJ_RESDEMSUPP_METRICS ADD CONSTRAINT F_MPJRESDSMET_FK4 FOREIGN KEY (ORGANIZATION_ID) REFERENCES RIDW.D_ORGANIZATION (ORGANIZATION_ID)
  2952. GO
  2953.  
  2954. ALTER TABLE RIDW.F_WK_RESOURCE_UTIL_METRICS ADD CONSTRAINT F_WRESUTILMET_FK1 FOREIGN KEY (WEEK_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  2955. GO
  2956.  
  2957. ALTER TABLE RIDW.F_WK_RESOURCE_UTIL_METRICS ADD CONSTRAINT F_WRESUTILMET_FK2 FOREIGN KEY (POOL_ID) REFERENCES RIDW.D_POOL (POOL_ID)
  2958. GO
  2959.  
  2960. ALTER TABLE RIDW.F_WK_RESOURCE_UTIL_METRICS ADD CONSTRAINT F_WRESUTILMET_FK3 FOREIGN KEY (CITY_ID) REFERENCES RIDW.D_CITY (CITY_ID)
  2961. GO
  2962.  
  2963. ALTER TABLE RIDW.F_WK_RESOURCE_UTIL_METRICS ADD CONSTRAINT F_WRESUTILMET_FK4 FOREIGN KEY (ORGANIZATION_ID) REFERENCES RIDW.D_ORGANIZATION (ORGANIZATION_ID)
  2964. GO
  2965.  
  2966. ALTER TABLE RIDW.F_MO_RESOURCE_UTIL_METRICS ADD CONSTRAINT F_MRESUTILMETT_FK1 FOREIGN KEY (MONTH_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  2967. GO
  2968.  
  2969. ALTER TABLE RIDW.F_MO_RESOURCE_UTIL_METRICS ADD CONSTRAINT F_MRESUTILMET_FK2 FOREIGN KEY (POOL_ID) REFERENCES RIDW.D_POOL (POOL_ID)
  2970. GO
  2971.  
  2972. ALTER TABLE RIDW.F_MO_RESOURCE_UTIL_METRICS ADD CONSTRAINT F_MRESUTILMET_FK3 FOREIGN KEY (CITY_ID) REFERENCES RIDW.D_CITY (CITY_ID)
  2973. GO
  2974.  
  2975. ALTER TABLE RIDW.F_MO_RESOURCE_UTIL_METRICS ADD CONSTRAINT F_MRESUTILMET_FK4 FOREIGN KEY (ORGANIZATION_ID) REFERENCES RIDW.D_ORGANIZATION (ORGANIZATION_ID)
  2976. GO
  2977.  
  2978. ALTER TABLE RIDW.F_RISK_METRICS ADD CONSTRAINT F_RISKMET_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  2979. GO
  2980.  
  2981. ALTER TABLE RIDW.F_RISK_METRICS ADD CONSTRAINT F_RISKMET_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  2982. GO
  2983.  
  2984. ALTER TABLE RIDW.F_RISK_METRICS ADD CONSTRAINT F_RISKMET_FK3 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_RISK_STATE (STATE_ID)
  2985. GO
  2986.  
  2987. ALTER TABLE RIDW.F_RISK_METRICS ADD CONSTRAINT F_RISKMET_FK4 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_PRIORITY (PRIORITY_ID)
  2988. GO
  2989.  
  2990. ALTER TABLE RIDW.F_RISK_METRICS ADD CONSTRAINT F_RISKMET_FK5 FOREIGN KEY (OWNER_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID)
  2991. GO
  2992.  
  2993. ALTER TABLE RIDW.F_RISK_METRICS ADD CONSTRAINT F_RISKMET_FK6 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE (RELEASE_ID)
  2994. GO
  2995.  
  2996. ALTER TABLE RIDW.F_RISK_METRICS ADD CONSTRAINT F_RISKMET_FK7 FOREIGN KEY (IMPACT_RANK_ID) REFERENCES RIDW.D_IMPACT_RANK (IMPACT_RANK_ID)
  2997. GO
  2998.  
  2999. ALTER TABLE RIDW.F_RISK_METRICS ADD CONSTRAINT F_RISKMET_FK8 FOREIGN KEY (PROBABILITY_RANK_ID) REFERENCES RIDW.D_PROBABILITY_RANK (PROBABILITY_RANK_ID)
  3000. GO
  3001.  
  3002. ALTER TABLE RIDW.F_RISK_METRICS ADD CONSTRAINT F_RISKMET_FK9 FOREIGN KEY (PROBABILITY_COST_RANK_ID) REFERENCES RIDW.D_PROBABILITY_COST_RANK (PROBABILITY_COST_RANK_ID)
  3003. GO
  3004.  
  3005. ALTER TABLE RIDW.F_RISK_METRICS ADD CONSTRAINT F_RISKMET_FK10 FOREIGN KEY (SCORE_RANK_ID) REFERENCES RIDW.D_SCORE_RANK (SCORE_RANK_ID)
  3006. GO
  3007.  
  3008. ALTER TABLE RIDW.F_C_RISK_METRICS ADD CONSTRAINT F_C_RISKMET_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  3009. GO
  3010.  
  3011. ALTER TABLE RIDW.F_C_RISK_METRICS ADD CONSTRAINT F_C_RISKMET_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  3012. GO
  3013.  
  3014. ALTER TABLE RIDW.F_C_RISK_METRICS ADD CONSTRAINT F_C_RISKMET_FK3 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_RISK_STATE (STATE_ID)
  3015. GO
  3016.  
  3017. ALTER TABLE RIDW.F_C_RISK_METRICS ADD CONSTRAINT F_C_RISKMET_FK4 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_PRIORITY (PRIORITY_ID)
  3018. GO
  3019.  
  3020. ALTER TABLE RIDW.F_C_RISK_METRICS ADD CONSTRAINT F_C_RISKMET_FK5 FOREIGN KEY (OWNER_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID)
  3021. GO
  3022.  
  3023. ALTER TABLE RIDW.F_C_RISK_METRICS ADD CONSTRAINT F_C_RISKMET_FK6 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE (RELEASE_ID)
  3024. GO
  3025.  
  3026. ALTER TABLE RIDW.F_C_RISK_METRICS ADD CONSTRAINT F_C_RISKMET_FK7 FOREIGN KEY (IMPACT_RANK_ID) REFERENCES RIDW.D_IMPACT_RANK (IMPACT_RANK_ID)
  3027. GO
  3028.  
  3029. ALTER TABLE RIDW.F_C_RISK_METRICS ADD CONSTRAINT F_C_RISKMET_FK8 FOREIGN KEY (PROBABILITY_RANK_ID) REFERENCES RIDW.D_PROBABILITY_RANK (PROBABILITY_RANK_ID)
  3030. GO
  3031.  
  3032. ALTER TABLE RIDW.F_C_RISK_METRICS ADD CONSTRAINT F_C_RISKMET_FK9 FOREIGN KEY (PROBABILITY_COST_RANK_ID) REFERENCES RIDW.D_PROBABILITY_COST_RANK (PROBABILITY_COST_RANK_ID)
  3033. GO
  3034.  
  3035. ALTER TABLE RIDW.F_C_RISK_METRICS ADD CONSTRAINT F_C_RISKMET_FK10 FOREIGN KEY (SCORE_RANK_ID) REFERENCES RIDW.D_SCORE_RANK (SCORE_RANK_ID)
  3036. GO
  3037.  
  3038. ALTER TABLE RIDW.H_WK_PROJ_RESDEMSUPP_METRICS ADD CONSTRAINT H_WPJRESDSMET_FK1 FOREIGN KEY (F_PROJDS_MET_ID) REFERENCES RIDW.F_WK_PROJ_RESDEMSUPP_METRICS (F_PROJDS_MET_ID) ON DELETE CASCADE
  3039. GO
  3040.  
  3041. ALTER TABLE RIDW.H_WK_PROJ_RESDEMSUPP_METRICS ADD CONSTRAINT H_WPJRESDSMET_FK2 FOREIGN KEY (PROJECT_ALLOCATION_ID) REFERENCES RIDW.D_PROJECT_ALLOCATION (PROJECT_ALLOCATION_ID) ON DELETE CASCADE
  3042. GO
  3043.  
  3044. ALTER TABLE RIDW.H_MO_PROJ_RESDEMSUPP_METRICS ADD CONSTRAINT H_MPJRESDSMET_FK1 FOREIGN KEY (F_PROJDS_MET_ID) REFERENCES RIDW.F_MO_PROJ_RESDEMSUPP_METRICS (F_PROJDS_MET_ID) ON DELETE CASCADE
  3045. GO
  3046.  
  3047. ALTER TABLE RIDW.H_MO_PROJ_RESDEMSUPP_METRICS ADD CONSTRAINT H_MPJRESDSMET_FK2 FOREIGN KEY (PROJECT_ALLOCATION_ID) REFERENCES RIDW.D_PROJECT_ALLOCATION (PROJECT_ALLOCATION_ID) ON DELETE CASCADE
  3048. GO
  3049.  
  3050. ALTER TABLE RIDW.H_WK_RESOURCE_UTIL_METRICS ADD CONSTRAINT H_WRESUTILMET_FK1 FOREIGN KEY (F_RESUTIL_MET_ID) REFERENCES RIDW.F_WK_RESOURCE_UTIL_METRICS (F_RESUTIL_MET_ID) ON DELETE CASCADE
  3051. GO
  3052.  
  3053. ALTER TABLE RIDW.H_WK_RESOURCE_UTIL_METRICS ADD CONSTRAINT H_WRESUTILMET_FK2 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID) ON DELETE CASCADE
  3054. GO
  3055.  
  3056. ALTER TABLE RIDW.H_MO_RESOURCE_UTIL_METRICS ADD CONSTRAINT H_MRESUTILMET_FK1 FOREIGN KEY (F_RESUTIL_MET_ID) REFERENCES RIDW.F_MO_RESOURCE_UTIL_METRICS (F_RESUTIL_MET_ID) ON DELETE CASCADE
  3057. GO
  3058.  
  3059. ALTER TABLE RIDW.H_MO_RESOURCE_UTIL_METRICS ADD CONSTRAINT H_MRESUTILMET_FK2 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID) ON DELETE CASCADE
  3060. GO
  3061.  
  3062. ALTER TABLE RIDW.H_RISK_METRICS ADD CONSTRAINT H_RISKMET_FK1 FOREIGN KEY (F_RISKMET_ID) REFERENCES RIDW.F_RISK_METRICS (F_RISKMET_ID) ON DELETE CASCADE
  3063. GO
  3064.  
  3065. ALTER TABLE RIDW.H_RISK_METRICS ADD CONSTRAINT H_RISKMET_FK2 FOREIGN KEY (RISK_ID) REFERENCES RIDW.D_RISK (RISK_ID) ON DELETE CASCADE
  3066. GO
  3067.  
  3068. ALTER TABLE RIDW.F_TASK_ITER_VARIANCE_METRICS ADD CONSTRAINT FTSKITVARMET_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  3069. GO
  3070.  
  3071. ALTER TABLE RIDW.F_TASK_ITER_VARIANCE_METRICS ADD CONSTRAINT FTSKITVARMET_FK2 FOREIGN KEY (BASELINE_ID) REFERENCES RIDW.D_BASELINE (BASELINE_ID)
  3072. GO
  3073.  
  3074. ALTER TABLE RIDW.F_TASK_ITER_VARIANCE_METRICS ADD CONSTRAINT FTSKITVARMET_FK3 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION (ITERATION_ID)
  3075. GO
  3076.  
  3077. ALTER TABLE RIDW.F_TASK_ITER_VARIANCE_METRICS ADD CONSTRAINT FTSKITVARMET_FK4 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  3078. GO
  3079.  
  3080. ALTER TABLE RIDW.F_TASK_PROJ_VARIANCE_METRICS ADD CONSTRAINT FTSKPRJVARMET_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  3081. GO
  3082.  
  3083. ALTER TABLE RIDW.F_TASK_PROJ_VARIANCE_METRICS ADD CONSTRAINT FTSKPRJVARMET_FK2 FOREIGN KEY (BASELINE_ID) REFERENCES RIDW.D_BASELINE (BASELINE_ID)
  3084. GO
  3085.  
  3086. ALTER TABLE RIDW.F_TASK_PROJ_VARIANCE_METRICS ADD CONSTRAINT FTSKPRJVARMET_FK3 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  3087. GO
  3088.  
  3089. ALTER TABLE RIDW.F_C_TASK_ITE_VARIANCE_METRICS ADD CONSTRAINT FCTSKITVARMET_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  3090. GO
  3091.  
  3092. ALTER TABLE RIDW.F_C_TASK_ITE_VARIANCE_METRICS ADD CONSTRAINT FCTSKITVARMET_FK2 FOREIGN KEY (BASELINE_ID) REFERENCES RIDW.D_BASELINE (BASELINE_ID)
  3093. GO
  3094.  
  3095. ALTER TABLE RIDW.F_C_TASK_ITE_VARIANCE_METRICS ADD CONSTRAINT FCTSKITVARMET_FK3 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION (ITERATION_ID)
  3096. GO
  3097.  
  3098. ALTER TABLE RIDW.F_C_TASK_ITE_VARIANCE_METRICS ADD CONSTRAINT FCTSKITVARMET_FK4 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  3099. GO
  3100.  
  3101. ALTER TABLE RIDW.F_C_TASK_PRO_VARIANCE_METRICS ADD CONSTRAINT FCTSKPRVARMET_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  3102. GO
  3103.  
  3104. ALTER TABLE RIDW.F_C_TASK_PRO_VARIANCE_METRICS ADD CONSTRAINT FCTSKPRVARMET_FK2 FOREIGN KEY (BASELINE_ID) REFERENCES RIDW.D_BASELINE (BASELINE_ID)
  3105. GO
  3106.  
  3107. ALTER TABLE RIDW.F_C_TASK_PRO_VARIANCE_METRICS ADD CONSTRAINT FCTSKPRVARMET_FK3 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  3108. GO
  3109.  
  3110. ALTER TABLE RIDW.H_TASK_ITER_VARIANCE_METRICS ADD CONSTRAINT HTSKITVARMET_FK1 FOREIGN KEY (F_TASKVAR_MET_ID) REFERENCES RIDW.F_TASK_ITER_VARIANCE_METRICS (F_TASKVAR_MET_ID) ON DELETE CASCADE
  3111. GO
  3112.  
  3113. ALTER TABLE RIDW.H_TASK_ITER_VARIANCE_METRICS ADD CONSTRAINT HTSKITVARMET_FK2 FOREIGN KEY (TASK_ID) REFERENCES RIDW.D_TASK (TASK_ID) ON DELETE CASCADE
  3114. GO
  3115.  
  3116. ALTER TABLE RIDW.H_TASK_PROJ_VARIANCE_METRICS ADD CONSTRAINT HTSKPRJVARME_FK1 FOREIGN KEY (F_TASKVAR_MET_ID) REFERENCES RIDW.F_TASK_PROJ_VARIANCE_METRICS (F_TASKVAR_MET_ID) ON DELETE CASCADE
  3117. GO
  3118.  
  3119. ALTER TABLE RIDW.H_TASK_PROJ_VARIANCE_METRICS ADD CONSTRAINT HTSKPRJVARME_FK2 FOREIGN KEY (TASK_ID) REFERENCES RIDW.D_TASK (TASK_ID) ON DELETE CASCADE
  3120. GO
  3121.  
  3122. ALTER TABLE RIDW.F_WK_SCPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_WSCPRDSMET_FK1 FOREIGN KEY (WEEK_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  3123. GO
  3124.  
  3125. ALTER TABLE RIDW.F_WK_SCPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_WSCPRDSMET_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  3126. GO
  3127.  
  3128. ALTER TABLE RIDW.F_WK_SCPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_WSCPRDSMET_FK3 FOREIGN KEY (CITY_ID) REFERENCES RIDW.D_CITY (CITY_ID)
  3129. GO
  3130.  
  3131. ALTER TABLE RIDW.F_WK_SCPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_WSCPRDSMET_FK4 FOREIGN KEY (ORGANIZATION_ID) REFERENCES RIDW.D_ORGANIZATION (ORGANIZATION_ID)
  3132. GO
  3133.  
  3134. ALTER TABLE RIDW.F_WK_SCPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_WSCPRDSMET_FK5 FOREIGN KEY (SKILL_ID) REFERENCES RIDW.D_SKILL (SKILL_ID)
  3135. GO
  3136.  
  3137. ALTER TABLE RIDW.F_WK_SCPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_WSCPRDSMET_FK6 FOREIGN KEY (COMPETENCY_ID) REFERENCES RIDW.D_COMPETENCY (COMPETENCY_ID)
  3138. GO
  3139.  
  3140. ALTER TABLE RIDW.H_WK_SCPROJ_RESDEMSUP_METRICS ADD CONSTRAINT H_WSCPRDSMET_FK1 FOREIGN KEY (F_PROJDS_MET_ID) REFERENCES RIDW.F_WK_SCPROJ_RESDEMSUP_METRICS (F_PROJDS_MET_ID) ON DELETE CASCADE
  3141. GO
  3142.  
  3143. ALTER TABLE RIDW.H_WK_SCPROJ_RESDEMSUP_METRICS ADD CONSTRAINT H_WSCPRDSMET_FK2 FOREIGN KEY (PROJECT_ALLOCATION_ID) REFERENCES RIDW.D_PROJECT_ALLOCATION (PROJECT_ALLOCATION_ID) ON DELETE CASCADE
  3144. GO
  3145.  
  3146. ALTER TABLE RIDW.F_WK_SKPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_WSKPRDSMET_FK1 FOREIGN KEY (WEEK_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  3147. GO
  3148.  
  3149. ALTER TABLE RIDW.F_WK_SKPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_WSKPRDSMET_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  3150. GO
  3151.  
  3152. ALTER TABLE RIDW.F_WK_SKPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_WSKPRDSMET_FK3 FOREIGN KEY (CITY_ID) REFERENCES RIDW.D_CITY (CITY_ID)
  3153. GO
  3154.  
  3155. ALTER TABLE RIDW.F_WK_SKPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_WSKPRDSMET_FK4 FOREIGN KEY (ORGANIZATION_ID) REFERENCES RIDW.D_ORGANIZATION (ORGANIZATION_ID)
  3156. GO
  3157.  
  3158. ALTER TABLE RIDW.F_WK_SKPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_WSKPRDSMET_FK5 FOREIGN KEY (SKILL_ID) REFERENCES RIDW.D_SKILL (SKILL_ID)
  3159. GO
  3160.  
  3161. ALTER TABLE RIDW.H_WK_SKPROJ_RESDEMSUP_METRICS ADD CONSTRAINT H_WSKPRDSMET_FK1 FOREIGN KEY (F_PROJDS_MET_ID) REFERENCES RIDW.F_WK_SKPROJ_RESDEMSUP_METRICS (F_PROJDS_MET_ID) ON DELETE CASCADE
  3162. GO
  3163.  
  3164. ALTER TABLE RIDW.H_WK_SKPROJ_RESDEMSUP_METRICS ADD CONSTRAINT H_WSKPRDSMET_FK2 FOREIGN KEY (PROJECT_ALLOCATION_ID) REFERENCES RIDW.D_PROJECT_ALLOCATION (PROJECT_ALLOCATION_ID) ON DELETE CASCADE
  3165. GO
  3166.  
  3167. ALTER TABLE RIDW.F_WK_COPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_WCOPRDSMET_FK1 FOREIGN KEY (WEEK_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  3168. GO
  3169.  
  3170. ALTER TABLE RIDW.F_WK_COPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_WCOPRDSMET_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  3171. GO
  3172.  
  3173. ALTER TABLE RIDW.F_WK_COPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_WCOPRDSMET_FK3 FOREIGN KEY (CITY_ID) REFERENCES RIDW.D_CITY (CITY_ID)
  3174. GO
  3175.  
  3176. ALTER TABLE RIDW.F_WK_COPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_WCOPRDSMET_FK4 FOREIGN KEY (ORGANIZATION_ID) REFERENCES RIDW.D_ORGANIZATION (ORGANIZATION_ID)
  3177. GO
  3178.  
  3179. ALTER TABLE RIDW.F_WK_COPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_WCOPRDSMET_FK5 FOREIGN KEY (COMPETENCY_ID) REFERENCES RIDW.D_COMPETENCY (COMPETENCY_ID)
  3180. GO
  3181.  
  3182. ALTER TABLE RIDW.H_WK_COPROJ_RESDEMSUP_METRICS ADD CONSTRAINT H_WCOPRDSMET_FK1 FOREIGN KEY (F_PROJDS_MET_ID) REFERENCES RIDW.F_WK_COPROJ_RESDEMSUP_METRICS (F_PROJDS_MET_ID) ON DELETE CASCADE
  3183. GO
  3184.  
  3185. ALTER TABLE RIDW.H_WK_COPROJ_RESDEMSUP_METRICS ADD CONSTRAINT H_WCOPRDSMET_FK2 FOREIGN KEY (PROJECT_ALLOCATION_ID) REFERENCES RIDW.D_PROJECT_ALLOCATION (PROJECT_ALLOCATION_ID) ON DELETE CASCADE
  3186. GO
  3187.  
  3188. ALTER TABLE RIDW.F_MO_SCPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_MSCPRDSMET_FK1 FOREIGN KEY (MONTH_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  3189. GO
  3190.  
  3191. ALTER TABLE RIDW.F_MO_SCPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_MSCPRDSMET_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  3192. GO
  3193.  
  3194. ALTER TABLE RIDW.F_MO_SCPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_MSCPRDSMET_FK3 FOREIGN KEY (CITY_ID) REFERENCES RIDW.D_CITY (CITY_ID)
  3195. GO
  3196.  
  3197. ALTER TABLE RIDW.F_MO_SCPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_MSCPRDSMET_FK4 FOREIGN KEY (ORGANIZATION_ID) REFERENCES RIDW.D_ORGANIZATION (ORGANIZATION_ID)
  3198. GO
  3199.  
  3200. ALTER TABLE RIDW.F_MO_SCPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_MSCPRDSMET_FK5 FOREIGN KEY (SKILL_ID) REFERENCES RIDW.D_SKILL (SKILL_ID)
  3201. GO
  3202.  
  3203. ALTER TABLE RIDW.F_MO_SCPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_MSCPRDSMET_FK6 FOREIGN KEY (COMPETENCY_ID) REFERENCES RIDW.D_COMPETENCY (COMPETENCY_ID)
  3204. GO
  3205.  
  3206. ALTER TABLE RIDW.H_MO_SCPROJ_RESDEMSUP_METRICS ADD CONSTRAINT H_MSCPRDSMET_FK1 FOREIGN KEY (F_PROJDS_MET_ID) REFERENCES RIDW.F_MO_SCPROJ_RESDEMSUP_METRICS (F_PROJDS_MET_ID) ON DELETE CASCADE
  3207. GO
  3208.  
  3209. ALTER TABLE RIDW.H_MO_SCPROJ_RESDEMSUP_METRICS ADD CONSTRAINT H_MSCPRDSMET_FK2 FOREIGN KEY (PROJECT_ALLOCATION_ID) REFERENCES RIDW.D_PROJECT_ALLOCATION (PROJECT_ALLOCATION_ID) ON DELETE CASCADE
  3210. GO
  3211.  
  3212. ALTER TABLE RIDW.F_MO_SKPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_MSKPRDSMET_FK1 FOREIGN KEY (MONTH_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  3213. GO
  3214.  
  3215. ALTER TABLE RIDW.F_MO_SKPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_MSKPRDSMET_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  3216. GO
  3217.  
  3218. ALTER TABLE RIDW.F_MO_SKPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_MSKPRDSMET_FK3 FOREIGN KEY (CITY_ID) REFERENCES RIDW.D_CITY (CITY_ID)
  3219. GO
  3220.  
  3221. ALTER TABLE RIDW.F_MO_SKPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_MSKPRDSMET_FK4 FOREIGN KEY (ORGANIZATION_ID) REFERENCES RIDW.D_ORGANIZATION (ORGANIZATION_ID)
  3222. GO
  3223.  
  3224. ALTER TABLE RIDW.F_MO_SKPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_MSKPRDSMET_FK5 FOREIGN KEY (SKILL_ID) REFERENCES RIDW.D_SKILL (SKILL_ID)
  3225. GO
  3226.  
  3227. ALTER TABLE RIDW.H_MO_SKPROJ_RESDEMSUP_METRICS ADD CONSTRAINT H_MSKPRDSMET_FK1 FOREIGN KEY (F_PROJDS_MET_ID) REFERENCES RIDW.F_MO_SKPROJ_RESDEMSUP_METRICS (F_PROJDS_MET_ID) ON DELETE CASCADE
  3228. GO
  3229.  
  3230. ALTER TABLE RIDW.H_MO_SKPROJ_RESDEMSUP_METRICS ADD CONSTRAINT H_MSKPRDSMET_FK2 FOREIGN KEY (PROJECT_ALLOCATION_ID) REFERENCES RIDW.D_PROJECT_ALLOCATION (PROJECT_ALLOCATION_ID) ON DELETE CASCADE
  3231. GO
  3232.  
  3233. ALTER TABLE RIDW.F_MO_COPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_MCOPRDSMET_FK1 FOREIGN KEY (MONTH_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  3234. GO
  3235.  
  3236. ALTER TABLE RIDW.F_MO_COPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_MCOPRDSMET_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  3237. GO
  3238.  
  3239. ALTER TABLE RIDW.F_MO_COPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_MCOPRDSMET_FK3 FOREIGN KEY (CITY_ID) REFERENCES RIDW.D_CITY (CITY_ID)
  3240. GO
  3241.  
  3242. ALTER TABLE RIDW.F_MO_COPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_MCOPRDSMET_FK4 FOREIGN KEY (ORGANIZATION_ID) REFERENCES RIDW.D_ORGANIZATION (ORGANIZATION_ID)
  3243. GO
  3244.  
  3245. ALTER TABLE RIDW.F_MO_COPROJ_RESDEMSUP_METRICS ADD CONSTRAINT F_MCOPRDSMET_FK5 FOREIGN KEY (COMPETENCY_ID) REFERENCES RIDW.D_COMPETENCY (COMPETENCY_ID)
  3246. GO
  3247.  
  3248. ALTER TABLE RIDW.H_MO_COPROJ_RESDEMSUP_METRICS ADD CONSTRAINT H_MCOPRDSMET_FK1 FOREIGN KEY (F_PROJDS_MET_ID) REFERENCES RIDW.F_MO_COPROJ_RESDEMSUP_METRICS (F_PROJDS_MET_ID) ON DELETE CASCADE
  3249. GO
  3250.  
  3251. ALTER TABLE RIDW.H_MO_COPROJ_RESDEMSUP_METRICS ADD CONSTRAINT H_MCOPRDSMET_FK2 FOREIGN KEY (PROJECT_ALLOCATION_ID) REFERENCES RIDW.D_PROJECT_ALLOCATION (PROJECT_ALLOCATION_ID) ON DELETE CASCADE
  3252. GO
  3253.  
  3254. ALTER TABLE RIDW.F_WK_SCRESOURCE_UTIL_METRICS ADD CONSTRAINT F_WSCRESUTMET_FK1 FOREIGN KEY (WEEK_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  3255. GO
  3256.  
  3257. ALTER TABLE RIDW.F_WK_SCRESOURCE_UTIL_METRICS ADD CONSTRAINT F_WSCRESUTMET_FK2 FOREIGN KEY (POOL_ID) REFERENCES RIDW.D_POOL (POOL_ID)
  3258. GO
  3259.  
  3260. ALTER TABLE RIDW.F_WK_SCRESOURCE_UTIL_METRICS ADD CONSTRAINT F_WSCRESUTMET_FK3 FOREIGN KEY (CITY_ID) REFERENCES RIDW.D_CITY (CITY_ID)
  3261. GO
  3262.  
  3263. ALTER TABLE RIDW.F_WK_SCRESOURCE_UTIL_METRICS ADD CONSTRAINT F_WSCRESUTMET_FK4 FOREIGN KEY (ORGANIZATION_ID) REFERENCES RIDW.D_ORGANIZATION (ORGANIZATION_ID)
  3264. GO
  3265.  
  3266. ALTER TABLE RIDW.F_WK_SCRESOURCE_UTIL_METRICS ADD CONSTRAINT F_WSCRESUTMET_FK5 FOREIGN KEY (SKILL_ID) REFERENCES RIDW.D_SKILL (SKILL_ID)
  3267. GO
  3268.  
  3269. ALTER TABLE RIDW.F_WK_SCRESOURCE_UTIL_METRICS ADD CONSTRAINT F_WSCRESUTMET_FK6 FOREIGN KEY (COMPETENCY_ID) REFERENCES RIDW.D_COMPETENCY (COMPETENCY_ID)
  3270. GO
  3271.  
  3272. ALTER TABLE RIDW.H_WK_SCRESOURCE_UTIL_METRICS ADD CONSTRAINT H_WSCRESUTMET_FK1 FOREIGN KEY (F_RESUTIL_MET_ID) REFERENCES RIDW.F_WK_SCRESOURCE_UTIL_METRICS (F_RESUTIL_MET_ID) ON DELETE CASCADE
  3273. GO
  3274.  
  3275. ALTER TABLE RIDW.H_WK_SCRESOURCE_UTIL_METRICS ADD CONSTRAINT H_WSCRESUTMET_FK2 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID) ON DELETE CASCADE
  3276. GO
  3277.  
  3278. ALTER TABLE RIDW.F_WK_SKRESOURCE_UTIL_METRICS ADD CONSTRAINT F_WSKRESUTMET_FK1 FOREIGN KEY (WEEK_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  3279. GO
  3280.  
  3281. ALTER TABLE RIDW.F_WK_SKRESOURCE_UTIL_METRICS ADD CONSTRAINT F_WSKRESUTMET_FK2 FOREIGN KEY (POOL_ID) REFERENCES RIDW.D_POOL (POOL_ID)
  3282. GO
  3283.  
  3284. ALTER TABLE RIDW.F_WK_SKRESOURCE_UTIL_METRICS ADD CONSTRAINT F_WSKRESUTMET_FK3 FOREIGN KEY (CITY_ID) REFERENCES RIDW.D_CITY (CITY_ID)
  3285. GO
  3286.  
  3287. ALTER TABLE RIDW.F_WK_SKRESOURCE_UTIL_METRICS ADD CONSTRAINT F_WSKRESUTMET_FK4 FOREIGN KEY (ORGANIZATION_ID) REFERENCES RIDW.D_ORGANIZATION (ORGANIZATION_ID)
  3288. GO
  3289.  
  3290. ALTER TABLE RIDW.F_WK_SKRESOURCE_UTIL_METRICS ADD CONSTRAINT F_WSKRESUTMET_FK5 FOREIGN KEY (SKILL_ID) REFERENCES RIDW.D_SKILL (SKILL_ID)
  3291. GO
  3292.  
  3293. ALTER TABLE RIDW.H_WK_SKRESOURCE_UTIL_METRICS ADD CONSTRAINT H_WSKRESUTMET_FK1 FOREIGN KEY (F_RESUTIL_MET_ID) REFERENCES RIDW.F_WK_SKRESOURCE_UTIL_METRICS (F_RESUTIL_MET_ID) ON DELETE CASCADE
  3294. GO
  3295.  
  3296. ALTER TABLE RIDW.H_WK_SKRESOURCE_UTIL_METRICS ADD CONSTRAINT H_WSKRESUTMET_FK2 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID) ON DELETE CASCADE
  3297. GO
  3298.  
  3299. ALTER TABLE RIDW.F_WK_CORESOURCE_UTIL_METRICS ADD CONSTRAINT F_WCORESUTMET_FK1 FOREIGN KEY (WEEK_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  3300. GO
  3301.  
  3302. ALTER TABLE RIDW.F_WK_CORESOURCE_UTIL_METRICS ADD CONSTRAINT F_WCORESUTMET_FK2 FOREIGN KEY (POOL_ID) REFERENCES RIDW.D_POOL (POOL_ID)
  3303. GO
  3304.  
  3305. ALTER TABLE RIDW.F_WK_CORESOURCE_UTIL_METRICS ADD CONSTRAINT F_WCORESUTMET_FK3 FOREIGN KEY (CITY_ID) REFERENCES RIDW.D_CITY (CITY_ID)
  3306. GO
  3307.  
  3308. ALTER TABLE RIDW.F_WK_CORESOURCE_UTIL_METRICS ADD CONSTRAINT F_WCORESUTMET_FK4 FOREIGN KEY (ORGANIZATION_ID) REFERENCES RIDW.D_ORGANIZATION (ORGANIZATION_ID)
  3309. GO
  3310.  
  3311. ALTER TABLE RIDW.F_WK_CORESOURCE_UTIL_METRICS ADD CONSTRAINT F_WCORESUTMET_FK5 FOREIGN KEY (COMPETENCY_ID) REFERENCES RIDW.D_COMPETENCY (COMPETENCY_ID)
  3312. GO
  3313.  
  3314. ALTER TABLE RIDW.H_WK_CORESOURCE_UTIL_METRICS ADD CONSTRAINT H_WCORESUTMET_FK1 FOREIGN KEY (F_RESUTIL_MET_ID) REFERENCES RIDW.F_WK_CORESOURCE_UTIL_METRICS (F_RESUTIL_MET_ID) ON DELETE CASCADE
  3315. GO
  3316.  
  3317. ALTER TABLE RIDW.H_WK_CORESOURCE_UTIL_METRICS ADD CONSTRAINT H_WCORESUTMET_FK2 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID) ON DELETE CASCADE
  3318. GO
  3319.  
  3320. ALTER TABLE RIDW.F_MO_SCRESOURCE_UTIL_METRICS ADD CONSTRAINT F_MSCRESUTMET_FK1 FOREIGN KEY (MONTH_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  3321. GO
  3322.  
  3323. ALTER TABLE RIDW.F_MO_SCRESOURCE_UTIL_METRICS ADD CONSTRAINT F_MSCRESUTMET_FK2 FOREIGN KEY (POOL_ID) REFERENCES RIDW.D_POOL (POOL_ID)
  3324. GO
  3325.  
  3326. ALTER TABLE RIDW.F_MO_SCRESOURCE_UTIL_METRICS ADD CONSTRAINT F_MSCRESUTMET_FK3 FOREIGN KEY (CITY_ID) REFERENCES RIDW.D_CITY (CITY_ID)
  3327. GO
  3328.  
  3329. ALTER TABLE RIDW.F_MO_SCRESOURCE_UTIL_METRICS ADD CONSTRAINT F_MSCRESUTMET_FK4 FOREIGN KEY (ORGANIZATION_ID) REFERENCES RIDW.D_ORGANIZATION (ORGANIZATION_ID)
  3330. GO
  3331.  
  3332. ALTER TABLE RIDW.F_MO_SCRESOURCE_UTIL_METRICS ADD CONSTRAINT F_MSCRESUTMET_FK5 FOREIGN KEY (SKILL_ID) REFERENCES RIDW.D_SKILL (SKILL_ID)
  3333. GO
  3334.  
  3335. ALTER TABLE RIDW.F_MO_SCRESOURCE_UTIL_METRICS ADD CONSTRAINT F_MSCRESUTMET_FK6 FOREIGN KEY (COMPETENCY_ID) REFERENCES RIDW.D_COMPETENCY (COMPETENCY_ID)
  3336. GO
  3337.  
  3338. ALTER TABLE RIDW.H_MO_SCRESOURCE_UTIL_METRICS ADD CONSTRAINT H_MSCRESUTMET_FK1 FOREIGN KEY (F_RESUTIL_MET_ID) REFERENCES RIDW.F_MO_SCRESOURCE_UTIL_METRICS (F_RESUTIL_MET_ID) ON DELETE CASCADE
  3339. GO
  3340.  
  3341. ALTER TABLE RIDW.H_MO_SCRESOURCE_UTIL_METRICS ADD CONSTRAINT H_MSCRESUTMET_FK2 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID) ON DELETE CASCADE
  3342. GO
  3343.  
  3344. ALTER TABLE RIDW.F_MO_SKRESOURCE_UTIL_METRICS ADD CONSTRAINT F_MSKRESUTMET_FK1 FOREIGN KEY (MONTH_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  3345. GO
  3346.  
  3347. ALTER TABLE RIDW.F_MO_SKRESOURCE_UTIL_METRICS ADD CONSTRAINT F_MSKRESUTMET_FK2 FOREIGN KEY (POOL_ID) REFERENCES RIDW.D_POOL (POOL_ID)
  3348. GO
  3349.  
  3350. ALTER TABLE RIDW.F_MO_SKRESOURCE_UTIL_METRICS ADD CONSTRAINT F_MSKRESUTMET_FK3 FOREIGN KEY (CITY_ID) REFERENCES RIDW.D_CITY (CITY_ID)
  3351. GO
  3352.  
  3353. ALTER TABLE RIDW.F_MO_SKRESOURCE_UTIL_METRICS ADD CONSTRAINT F_MSKRESUTMET_FK4 FOREIGN KEY (ORGANIZATION_ID) REFERENCES RIDW.D_ORGANIZATION (ORGANIZATION_ID)
  3354. GO
  3355.  
  3356. ALTER TABLE RIDW.F_MO_SKRESOURCE_UTIL_METRICS ADD CONSTRAINT F_MSKRESUTMET_FK5 FOREIGN KEY (SKILL_ID) REFERENCES RIDW.D_SKILL (SKILL_ID)
  3357. GO
  3358.  
  3359. ALTER TABLE RIDW.H_MO_SKRESOURCE_UTIL_METRICS ADD CONSTRAINT H_MSKRESUTMET_FK1 FOREIGN KEY (F_RESUTIL_MET_ID) REFERENCES RIDW.F_MO_SKRESOURCE_UTIL_METRICS (F_RESUTIL_MET_ID) ON DELETE CASCADE
  3360. GO
  3361.  
  3362. ALTER TABLE RIDW.H_MO_SKRESOURCE_UTIL_METRICS ADD CONSTRAINT H_MSKRESUTMET_FK2 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID) ON DELETE CASCADE
  3363. GO
  3364.  
  3365. ALTER TABLE RIDW.F_MO_CORESOURCE_UTIL_METRICS ADD CONSTRAINT F_MCORESUTMET_FK1 FOREIGN KEY (MONTH_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  3366. GO
  3367.  
  3368. ALTER TABLE RIDW.F_MO_CORESOURCE_UTIL_METRICS ADD CONSTRAINT F_MCORESUTMET_FK2 FOREIGN KEY (POOL_ID) REFERENCES RIDW.D_POOL (POOL_ID)
  3369. GO
  3370.  
  3371. ALTER TABLE RIDW.F_MO_CORESOURCE_UTIL_METRICS ADD CONSTRAINT F_MCORESUTMET_FK4 FOREIGN KEY (CITY_ID) REFERENCES RIDW.D_CITY (CITY_ID)
  3372. GO
  3373.  
  3374. ALTER TABLE RIDW.F_MO_CORESOURCE_UTIL_METRICS ADD CONSTRAINT F_MCORESUTMET_FK5 FOREIGN KEY (ORGANIZATION_ID) REFERENCES RIDW.D_ORGANIZATION (ORGANIZATION_ID)
  3375. GO
  3376.  
  3377. ALTER TABLE RIDW.F_MO_CORESOURCE_UTIL_METRICS ADD CONSTRAINT F_MCORESUTMET_FK6 FOREIGN KEY (COMPETENCY_ID) REFERENCES RIDW.D_COMPETENCY (COMPETENCY_ID)
  3378. GO
  3379.  
  3380. ALTER TABLE RIDW.H_MO_CORESOURCE_UTIL_METRICS ADD CONSTRAINT H_MCORESUTMET_FK1 FOREIGN KEY (F_RESUTIL_MET_ID) REFERENCES RIDW.F_MO_CORESOURCE_UTIL_METRICS (F_RESUTIL_MET_ID) ON DELETE CASCADE
  3381. GO
  3382.  
  3383. ALTER TABLE RIDW.H_MO_CORESOURCE_UTIL_METRICS ADD CONSTRAINT H_MCORESUTMET_FK2 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID) ON DELETE CASCADE
  3384. GO
  3385.  
  3386. ALTER TABLE RIDW.H_BUILD_REQU_FAIL ADD CONSTRAINT H_BLD_REQUFAIL_FK1 FOREIGN KEY (BUILD_METRIC_ID) REFERENCES RIDW.F_BUILD_REQU_METRICS (BUILD_METRIC_ID) ON DELETE CASCADE
  3387. GO
  3388.  
  3389. ALTER TABLE RIDW.H_BUILD_REQU_FAIL ADD CONSTRAINT H_BLD_REQUFAIL_FK2 FOREIGN KEY (BUILD_ID) REFERENCES RIDW.D_BUILD (BUILD_ID) ON DELETE CASCADE
  3390. GO
  3391.  
  3392. ALTER TABLE RIDW.H_BUILD_REQU_PASS ADD CONSTRAINT H_BLD_REQUPASS_FK1 FOREIGN KEY (BUILD_METRIC_ID) REFERENCES RIDW.F_BUILD_REQU_METRICS (BUILD_METRIC_ID) ON DELETE CASCADE
  3393. GO
  3394.  
  3395. ALTER TABLE RIDW.H_BUILD_REQU_PASS ADD CONSTRAINT H_BLD_REQUPASS_FK2 FOREIGN KEY (BUILD_ID) REFERENCES RIDW.D_BUILD (BUILD_ID) ON DELETE CASCADE
  3396. GO
  3397.  
  3398. ALTER TABLE RIDW.F_STORY_METRICS ADD CONSTRAINT F_STORY_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  3399. GO
  3400.  
  3401. ALTER TABLE RIDW.F_STORY_METRICS ADD CONSTRAINT F_STORY_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  3402. GO
  3403.  
  3404. ALTER TABLE RIDW.F_STORY_METRICS ADD CONSTRAINT F_STORY_FK3 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION (ITERATION_ID)
  3405. GO
  3406.  
  3407. ALTER TABLE RIDW.F_STORY_METRICS ADD CONSTRAINT F_STORY_FK4 FOREIGN KEY (TEAM_ID) REFERENCES RIDW.D_TEAM (TEAM_ID)
  3408. GO
  3409.  
  3410. ALTER TABLE RIDW.F_STORY_METRICS ADD CONSTRAINT F_STORY_FK5 FOREIGN KEY (OWNER_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID)
  3411. GO
  3412.  
  3413. ALTER TABLE RIDW.F_STORY_METRICS ADD CONSTRAINT F_STORY_FK6 FOREIGN KEY (REQUEST_CLASS_ID) REFERENCES RIDW.D_REQUEST_CLASSIFICATION (REQUEST_CLASS_ID)
  3414. GO
  3415.  
  3416. ALTER TABLE RIDW.F_STORY_METRICS ADD CONSTRAINT F_STORY_FK7 FOREIGN KEY (REQUEST_CATEGORY_ID) REFERENCES RIDW.D_REQUEST_CATEGORY (REQUEST_CATEGORY_ID)
  3417. GO
  3418.  
  3419. ALTER TABLE RIDW.F_STORY_METRICS ADD CONSTRAINT F_STORY_FK8 FOREIGN KEY (REQUEST_TYPE_ID) REFERENCES RIDW.D_REQUEST_TYPE (REQUEST_TYPE_ID)
  3420. GO
  3421.  
  3422. ALTER TABLE RIDW.F_STORY_METRICS ADD CONSTRAINT F_STORY_FK9 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_REQUEST_STATE (STATE_ID)
  3423. GO
  3424.  
  3425. ALTER TABLE RIDW.F_STORY_METRICS ADD CONSTRAINT F_STORY_FK10 FOREIGN KEY (SEVERITY_ID) REFERENCES RIDW.D_REQUEST_SEVERITY (SEVERITY_ID)
  3426. GO
  3427.  
  3428. ALTER TABLE RIDW.F_STORY_METRICS ADD CONSTRAINT F_STORY_FK11 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_REQUEST_PRIORITY (PRIORITY_ID)
  3429. GO
  3430.  
  3431. ALTER TABLE RIDW.F_C_STORY_METRICS ADD CONSTRAINT F_CSTORY_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  3432. GO
  3433.  
  3434. ALTER TABLE RIDW.F_C_STORY_METRICS ADD CONSTRAINT F_CSTORY_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  3435. GO
  3436.  
  3437. ALTER TABLE RIDW.F_C_STORY_METRICS ADD CONSTRAINT F_CSTORY_FK3 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION (ITERATION_ID)
  3438. GO
  3439.  
  3440. ALTER TABLE RIDW.F_C_STORY_METRICS ADD CONSTRAINT F_CSTORY_FK4 FOREIGN KEY (TEAM_ID) REFERENCES RIDW.D_TEAM (TEAM_ID)
  3441. GO
  3442.  
  3443. ALTER TABLE RIDW.F_C_STORY_METRICS ADD CONSTRAINT F_CSTORY_FK5 FOREIGN KEY (OWNER_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID)
  3444. GO
  3445.  
  3446. ALTER TABLE RIDW.F_C_STORY_METRICS ADD CONSTRAINT F_CSTORY_FK6 FOREIGN KEY (REQUEST_CLASS_ID) REFERENCES RIDW.D_REQUEST_CLASSIFICATION (REQUEST_CLASS_ID)
  3447. GO
  3448.  
  3449. ALTER TABLE RIDW.F_C_STORY_METRICS ADD CONSTRAINT F_CSTORY_FK7 FOREIGN KEY (REQUEST_CATEGORY_ID) REFERENCES RIDW.D_REQUEST_CATEGORY (REQUEST_CATEGORY_ID)
  3450. GO
  3451.  
  3452. ALTER TABLE RIDW.F_C_STORY_METRICS ADD CONSTRAINT F_CSTORY_FK8 FOREIGN KEY (REQUEST_TYPE_ID) REFERENCES RIDW.D_REQUEST_TYPE (REQUEST_TYPE_ID)
  3453. GO
  3454.  
  3455. ALTER TABLE RIDW.F_C_STORY_METRICS ADD CONSTRAINT F_CSTORY_FK9 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_REQUEST_STATE (STATE_ID)
  3456. GO
  3457.  
  3458. ALTER TABLE RIDW.F_C_STORY_METRICS ADD CONSTRAINT F_CSTORY_FK10 FOREIGN KEY (SEVERITY_ID) REFERENCES RIDW.D_REQUEST_SEVERITY (SEVERITY_ID)
  3459. GO
  3460.  
  3461. ALTER TABLE RIDW.F_C_STORY_METRICS ADD CONSTRAINT F_CSTORY_FK11 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_REQUEST_PRIORITY (PRIORITY_ID)
  3462. GO
  3463.  
  3464. ALTER TABLE RIDW.H_STORY_METRICS ADD CONSTRAINT HSTORYPOINTS_FK1 FOREIGN KEY (F_STORY_METRIC_ID) REFERENCES RIDW.F_STORY_METRICS (F_STORY_METRIC_ID) ON DELETE CASCADE
  3465. GO
  3466.  
  3467. ALTER TABLE RIDW.H_STORY_METRICS ADD CONSTRAINT HSTORYPOINTS_FK2 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST (REQUEST_ID) ON DELETE CASCADE
  3468. GO
  3469.  
  3470. ALTER TABLE RIDW.F_REQUEST_FAILURE_DT_METRICS ADD CONSTRAINT F_REQFAIL_DTM_FK1 FOREIGN KEY (FAIL_DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  3471. GO
  3472.  
  3473. ALTER TABLE RIDW.F_REQUEST_FAILURE_DT_METRICS ADD CONSTRAINT F_REQFAIL_DTM_FK2 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE (RELEASE_ID)
  3474. GO
  3475.  
  3476. ALTER TABLE RIDW.F_REQUEST_FAILURE_DT_METRICS ADD CONSTRAINT F_REQFAIL_DTM_FK3 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  3477. GO
  3478.  
  3479. ALTER TABLE RIDW.F_REQUEST_FAILURE_DT_METRICS ADD CONSTRAINT F_REQFAIL_DTM_FK4 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT (COMPONENT_ID)
  3480. GO
  3481.  
  3482. ALTER TABLE RIDW.F_REQUEST_FAILURE_DT_METRICS ADD CONSTRAINT F_REQFAIL_DTM_FK5 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION (ITERATION_ID)
  3483. GO
  3484.  
  3485. ALTER TABLE RIDW.F_REQUEST_FAILURE_DT_METRICS ADD CONSTRAINT F_REQFAIL_DTM_FK6 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  3486. GO
  3487.  
  3488. ALTER TABLE RIDW.H_REQUEST_FAILURE_DT_METRICS ADD CONSTRAINT H_REQFAIL_DTM_FK1 FOREIGN KEY (REQFAIL_METRIC_ID) REFERENCES RIDW.F_REQUEST_FAILURE_DT_METRICS (REQFAIL_METRIC_ID) ON DELETE CASCADE
  3489. GO
  3490.  
  3491. ALTER TABLE RIDW.H_REQUEST_FAILURE_DT_METRICS ADD CONSTRAINT H_REQFAIL_DTM_FK2 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST (REQUEST_ID) ON DELETE CASCADE
  3492. GO
  3493.  
  3494. ALTER TABLE RIDW.F_REQUEST_TPLN_FAILDT_METRICS ADD CONSTRAINT F_REQTPLN_FDT_FK1 FOREIGN KEY (FAIL_DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  3495. GO
  3496.  
  3497. ALTER TABLE RIDW.F_REQUEST_TPLN_FAILDT_METRICS ADD CONSTRAINT F_REQTPLN_FDT_FK2 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE (RELEASE_ID)
  3498. GO
  3499.  
  3500. ALTER TABLE RIDW.F_REQUEST_TPLN_FAILDT_METRICS ADD CONSTRAINT F_REQTPLN_FDT_FK3 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  3501. GO
  3502.  
  3503. ALTER TABLE RIDW.F_REQUEST_TPLN_FAILDT_METRICS ADD CONSTRAINT F_REQTPLN_FDT_FK4 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT (COMPONENT_ID)
  3504. GO
  3505.  
  3506. ALTER TABLE RIDW.F_REQUEST_TPLN_FAILDT_METRICS ADD CONSTRAINT F_REQTPLN_FDT_FK5 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION (ITERATION_ID)
  3507. GO
  3508.  
  3509. ALTER TABLE RIDW.F_REQUEST_TPLN_FAILDT_METRICS ADD CONSTRAINT F_REQTPLN_FDT_FK6 FOREIGN KEY (TESTPLAN_ID) REFERENCES RIDW.D_TESTPLAN (TESTPLAN_ID)
  3510. GO
  3511.  
  3512. ALTER TABLE RIDW.F_REQUEST_TPLN_FAILDT_METRICS ADD CONSTRAINT F_REQTPLN_FDT_FK7 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  3513. GO
  3514.  
  3515. ALTER TABLE RIDW.H_REQUEST_TPLN_FAILDT_METRICS ADD CONSTRAINT H_REQTPLN_FDT_FK1 FOREIGN KEY (REQFAIL_METRIC_ID) REFERENCES RIDW.F_REQUEST_TPLN_FAILDT_METRICS (REQFAIL_METRIC_ID) ON DELETE CASCADE
  3516. GO
  3517.  
  3518. ALTER TABLE RIDW.H_REQUEST_TPLN_FAILDT_METRICS ADD CONSTRAINT H_REQTPLN_FDT_FK2 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST (REQUEST_ID) ON DELETE CASCADE
  3519. GO
  3520.  
  3521. ALTER TABLE RIDW.F_REQUEST_REQUI_FAILDT_METRICS ADD CONSTRAINT F_REQREQUI_FDT_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  3522. GO
  3523.  
  3524. ALTER TABLE RIDW.F_REQUEST_REQUI_FAILDT_METRICS ADD CONSTRAINT F_REQREQUI_FDT_FK2 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE (RELEASE_ID)
  3525. GO
  3526.  
  3527. ALTER TABLE RIDW.F_REQUEST_REQUI_FAILDT_METRICS ADD CONSTRAINT F_REQREQUI_FDT_FK3 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  3528. GO
  3529.  
  3530. ALTER TABLE RIDW.F_REQUEST_REQUI_FAILDT_METRICS ADD CONSTRAINT F_REQREQUI_FDT_FK4 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT (COMPONENT_ID)
  3531. GO
  3532.  
  3533. ALTER TABLE RIDW.F_REQUEST_REQUI_FAILDT_METRICS ADD CONSTRAINT F_REQREQUI_FDT_FK5 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION (ITERATION_ID)
  3534. GO
  3535.  
  3536. ALTER TABLE RIDW.F_REQUEST_REQUI_FAILDT_METRICS ADD CONSTRAINT F_REQREQUI_FDT_FK6 FOREIGN KEY (REQUIREMENT_ID) REFERENCES RIDW.D_REQUIREMENT (REQUIREMENT_ID)
  3537. GO
  3538.  
  3539. ALTER TABLE RIDW.F_REQUEST_REQUI_FAILDT_METRICS ADD CONSTRAINT F_REQREQUI_FDT_FK7 FOREIGN KEY (CREATOR_ID) REFERENCES RIDW.D_RESOURCE(RESOURCE_ID)
  3540. GO
  3541.  
  3542. ALTER TABLE RIDW.H_REQUEST_REQUI_FAILDT_METRICS ADD CONSTRAINT H_REQREQUI_FDT_FK1 FOREIGN KEY (REQFAIL_METRIC_ID) REFERENCES RIDW.F_REQUEST_REQUI_FAILDT_METRICS (REQFAIL_METRIC_ID) ON DELETE CASCADE
  3543. GO
  3544.  
  3545. ALTER TABLE RIDW.H_REQUEST_REQUI_FAILDT_METRICS ADD CONSTRAINT H_REQREQUI_FDT_FK2 FOREIGN KEY (REQUEST_ID) REFERENCES RIDW.D_REQUEST (REQUEST_ID) ON DELETE CASCADE
  3546. GO
  3547.  
  3548. ALTER TABLE RIDW.F_REQUIR_MODIF_DT_METRICS ADD CONSTRAINT F_REQMODI_DTM_FK1 FOREIGN KEY (MODIFICATION_DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  3549. GO
  3550.  
  3551. ALTER TABLE RIDW.F_REQUIR_MODIF_DT_METRICS ADD CONSTRAINT F_REQMODI_DTM_FK2 FOREIGN KEY (REQUIREMENT_CLASS_ID) REFERENCES RIDW.D_REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID)
  3552. GO
  3553.  
  3554. ALTER TABLE RIDW.F_REQUIR_MODIF_DT_METRICS ADD CONSTRAINT F_REQMODI_DTM_FK4 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  3555. GO
  3556.  
  3557. ALTER TABLE RIDW.F_REQUIR_MODIF_DT_METRICS ADD CONSTRAINT F_REQMODI_DTM_FK5 FOREIGN KEY (COMPONENT_ID) REFERENCES RIDW.D_COMPONENT (COMPONENT_ID)
  3558. GO
  3559.  
  3560. ALTER TABLE RIDW.F_REQUIR_MODIF_DT_METRICS ADD CONSTRAINT F_REQMODI_DTM_FK6 FOREIGN KEY (ITERATION_ID) REFERENCES RIDW.D_ITERATION (ITERATION_ID)
  3561. GO
  3562.  
  3563. ALTER TABLE RIDW.F_REQUIR_MODIF_DT_METRICS ADD CONSTRAINT F_REQMODI_DTM_FK7 FOREIGN KEY (RELEASE_ID) REFERENCES RIDW.D_RELEASE (RELEASE_ID)
  3564. GO
  3565.  
  3566. ALTER TABLE RIDW.F_REQUIR_MODIF_DT_METRICS ADD CONSTRAINT F_REQMODI_DTM_FK8 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID)
  3567. GO
  3568.  
  3569. ALTER TABLE RIDW.F_REQUIR_MODIF_DT_METRICS ADD CONSTRAINT F_REQMODI_DTM_FK9 FOREIGN KEY (STATE_ID) REFERENCES RIDW.D_REQUIREMENT_STATE (STATE_ID)
  3570. GO
  3571.  
  3572. ALTER TABLE RIDW.F_REQUIR_MODIF_DT_METRICS ADD CONSTRAINT F_REQMODI_DTM_FK10 FOREIGN KEY (STATUS_ID) REFERENCES RIDW.D_STATUS (STATUS_ID)
  3573. GO
  3574.  
  3575. ALTER TABLE RIDW.F_REQUIR_MODIF_DT_METRICS ADD CONSTRAINT F_REQMODI_DTM_FK11 FOREIGN KEY (STABILITY_ID) REFERENCES RIDW.D_STABILITY (STABILITY_ID)
  3576. GO
  3577.  
  3578. ALTER TABLE RIDW.F_REQUIR_MODIF_DT_METRICS ADD CONSTRAINT F_REQMODI_DTM_FK12 FOREIGN KEY (DIFFICULTY_ID) REFERENCES RIDW.D_DIFFICULTY (DIFFICULTY_ID)
  3579. GO
  3580.  
  3581. ALTER TABLE RIDW.F_REQUIR_MODIF_DT_METRICS ADD CONSTRAINT F_REQMODI_DTM_FK13 FOREIGN KEY (PRIORITY_ID) REFERENCES RIDW.D_PRIORITY (PRIORITY_ID)
  3582. GO
  3583.  
  3584. ALTER TABLE RIDW.F_REQUIR_MODIF_DT_METRICS ADD CONSTRAINT F_REQMODI_DTM_FK14 FOREIGN KEY (REQUIREMENT_TYPE_ID) REFERENCES RIDW.D_REQUIREMENT_TYPE (REQUIREMENT_TYPE_ID)
  3585. GO
  3586.  
  3587. ALTER TABLE RIDW.H_REQUIR_MODIF_DT_METRICS ADD CONSTRAINT H_REQMODI_DTM_FK1 FOREIGN KEY (REQ_METRIC_ID) REFERENCES RIDW.F_REQUIR_MODIF_DT_METRICS (REQ_METRIC_ID) ON DELETE CASCADE
  3588. GO
  3589.  
  3590. ALTER TABLE RIDW.H_REQUIR_MODIF_DT_METRICS ADD CONSTRAINT H_REQMODI_DTM_FK2 FOREIGN KEY (REQUIREMENT_ID) REFERENCES RIDW.D_REQUIREMENT (REQUIREMENT_ID) ON DELETE CASCADE
  3591. GO
  3592.  
  3593. ALTER TABLE RIDW.BD_PORTFOLIO ADD CONSTRAINT BD_PORTFOLIO_FK1 FOREIGN KEY (PORTFOLIO_ID) REFERENCES RIDW.D_PORTFOLIO (PORTFOLIO_ID)
  3594. GO
  3595.  
  3596. ALTER TABLE RIDW.BD_PORTFOLIO ADD CONSTRAINT BD_PORTFOLIO_FK2 FOREIGN KEY (PROGRAM_ID) REFERENCES RIDW.D_PROGRAM (PROGRAM_ID)
  3597. GO
  3598.  
  3599. ALTER TABLE RIDW.BD_PORTFOLIO ADD CONSTRAINT BD_PORTFOLIO_FK3 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  3600. GO
  3601.  
  3602. ALTER TABLE RIDW.F_PROJECT_FINANCIAL_METRICS ADD CONSTRAINT F_PRJFINMET_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  3603. GO
  3604.  
  3605. ALTER TABLE RIDW.F_PROJECT_FINANCIAL_METRICS ADD CONSTRAINT F_PRJFINMET_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  3606. GO
  3607.  
  3608. ALTER TABLE RIDW.F_C_PROJECT_FINANCIAL_METRICS ADD CONSTRAINT F_CPRJFINMET_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  3609. GO
  3610.  
  3611. ALTER TABLE RIDW.F_C_PROJECT_FINANCIAL_METRICS ADD CONSTRAINT F_CPRJFINMET_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  3612. GO
  3613.  
  3614. ALTER TABLE RIDW.H_PROJECT_FINANCIAL_METRICS ADD CONSTRAINT H_PRJFINMET_FK1 FOREIGN KEY (F_PROJFIN_METRIC_ID) REFERENCES RIDW.F_PROJECT_FINANCIAL_METRICS (F_PROJFIN_METRIC_ID)
  3615. GO
  3616.  
  3617. ALTER TABLE RIDW.H_PROJECT_FINANCIAL_METRICS ADD CONSTRAINT H_PRJFINMET_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  3618. GO
  3619.  
  3620. ALTER TABLE RIDW.F_TP_PROJECT_FINANCIAL_METRICS ADD CONSTRAINT F_TPPRJFINMET_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE(DATE_ID)
  3621. GO
  3622.  
  3623. ALTER TABLE RIDW.F_TP_PROJECT_FINANCIAL_METRICS ADD CONSTRAINT F_TPPRJFINMET_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  3624. GO
  3625.  
  3626. ALTER TABLE RIDW.H_TP_PROJECT_FINANCIAL_METRICS ADD CONSTRAINT H_TPPRJFINMET_FK1 FOREIGN KEY (F_TPPROJFIN_METRIC_ID) REFERENCES RIDW.F_TP_PROJECT_FINANCIAL_METRICS (F_TPPROJFIN_METRIC_ID)
  3627. GO
  3628.  
  3629. ALTER TABLE RIDW.H_TP_PROJECT_FINANCIAL_METRICS ADD CONSTRAINT H_TPPRJFINMET_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  3630. GO
  3631.  
  3632. ALTER TABLE RIDW.F_ASSET_UTIL_DT_METRICS ADD CONSTRAINT F_ASTUTDT_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  3633. GO
  3634.  
  3635. ALTER TABLE RIDW.F_ASSET_UTIL_DT_METRICS ADD CONSTRAINT F_ASTUTDT_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  3636. GO
  3637.  
  3638. ALTER TABLE RIDW.F_ASSET_UTIL_DT_METRICS ADD CONSTRAINT F_ASTUTDT_FK3 FOREIGN KEY (ACTION_TYPE_ID) REFERENCES RIDW.D_ACTION_TYPE (ACTION_TYPE_ID)
  3639. GO
  3640.  
  3641. ALTER TABLE RIDW.F_ASSET_UTIL_DT_METRICS ADD CONSTRAINT F_ASTUTDT_FK4 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID)
  3642. GO
  3643.  
  3644. ALTER TABLE RIDW.F_ASSET_UTIL_DT_METRICS ADD CONSTRAINT F_ASTUTDT_FK5 FOREIGN KEY (ASSET_ID) REFERENCES RIDW.D_ASSET (ASSET_ID)
  3645. GO
  3646.  
  3647. ALTER TABLE RIDW.F_ASSET_UTIL_DT_METRICS ADD CONSTRAINT F_ASTUTDT_FK6 FOREIGN KEY (ASSET_TYPE_ID) REFERENCES RIDW.D_ASSET_TYPE (ASSET_TYPE_ID)
  3648. GO
  3649.  
  3650. ALTER TABLE RIDW.F_LICENSE_DT_METRICS ADD CONSTRAINT F_LICDTMET_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  3651. GO
  3652.  
  3653. ALTER TABLE RIDW.F_LICENSE_DT_METRICS ADD CONSTRAINT F_LICDTMET_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES RIDW.D_PROJECT (PROJECT_ID)
  3654. GO
  3655.  
  3656. ALTER TABLE RIDW.F_LICENSE_DT_METRICS ADD CONSTRAINT F_LICDTMET_FK3 FOREIGN KEY (ACTION_TYPE_ID) REFERENCES RIDW.D_ACTION_TYPE (ACTION_TYPE_ID)
  3657. GO
  3658.  
  3659. ALTER TABLE RIDW.F_LICENSE_DT_METRICS ADD CONSTRAINT F_LICDTMET_FK4 FOREIGN KEY (RESOURCE_ID) REFERENCES RIDW.D_RESOURCE (RESOURCE_ID)
  3660. GO
  3661.  
  3662. ALTER TABLE RIDW.F_SC_BALLOT_TAB_RESULT_METRICS ADD CONSTRAINT F_BALLTABMET_FK1 FOREIGN KEY (DATE_ID) REFERENCES RIDW.D_DATE (DATE_ID)
  3663. GO
  3664.  
  3665. ALTER TABLE RIDW.F_SC_BALLOT_TAB_RESULT_METRICS ADD CONSTRAINT F_BALLTABMET_FK2 FOREIGN KEY (TEAM_ID) REFERENCES RIDW.D_TEAM (TEAM_ID)
  3666. GO
  3667.  
  3668. ALTER TABLE RIDW.F_SC_BALLOT_TAB_RESULT_METRICS ADD CONSTRAINT F_BALLTABMET_FK3 FOREIGN KEY (BALLOT_TAB_ID) REFERENCES RIDW.D_BALLOT_TAB (BALLOT_TAB_ID)
  3669. GO
  3670.  
  3671. USE [RIDW]
  3672. GO
  3673.  
  3674. CREATE SCHEMA AUTHORIZATION RIDW
  3675. GO
  3676.  
  3677. CREATE VIEW RIDW.VW_TASK_DETAIL (ACTUAL_WORK, ACTUAL_FINISH, ACTUAL_START, PLANNED_WORK, PLANNED_FINISH, PLANNED_START, PRIORITY, TASK_ID, URL, NAME, ACTUAL_COST, ACTUAL_OVT_COST, ACTUAL_OVT_WORK, ACWP, BASELINE_COST, BASELINE_DURATION, BASELINE_FINISH, BASELINE_START, BASELINE_WORK, BCWP, BCWS, CONSTRAINT_DATE, CONSTRAINT_TYPE, DEADLINE, DURATION_VARIANCE, EAC, EARLY_FINISH, EARLY_START, FINISH_VARIANCE, LATE_FINISH, LATE_START, PERCENT_COMPLETE, PERCENT_WORK_COMPLETE, PLANNED_COST, PLANNED_DURATION, PLANNED_OVT_COST, PLANNED_OVT_WORK, REGULAR_WORK, REMAINING_COST, REMAINING_DURATION, REMAINING_OVT_COST, REMAINING_OVT_WORK, REMAINING_WORK, START_VARIANCE, VAC, WBS_CODE, ACTUAL_FINISH_VARIANCE, BASELINE_FINISH_VARIANCE, ACTUAL_WORK_VARIANCE, BASELINE_WORK_VARIANCE, ACTUAL_START_VARIANCE, BASELINE_START_VARIANCE, WORK_VARIANCE, EXTERNAL_KEY1, EXTERNAL_KEY2, REC_DATETIME) AS ( SELECT T.ACTUAL_WORK, T.ACTUAL_FINISH, T.ACTUAL_START, T.PLANNED_WORK, T.PLANNED_FINISH, T.PLANNED_START, TS.PRIORITY, T.TASK_ID,
  3678. TS.URL, TS.NAME, T.ACTUAL_COST,T.ACTUAL_OVT_COST,T.ACTUAL_OVT_WORK,T.ACWP,T.BASELINE_COST,T.BASELINE_DURATION,T.BASELINE_FINISH,T.BASELINE_START, T.BASELINE_WORK,T.BCWP,T.BCWS,T.CONSTRAINT_DATE,T.CONSTRAINT_TYPE,T.DEADLINE,T.DURATION_VARIANCE,T.EAC,T.EARLY_FINISH,T.EARLY_START,T.FINISH_VARIANCE,T. LATE_FINISH,T.LATE_START,T.PERCENT_COMPLETE,T.PERCENT_WORK_COMPLETE,T.PLANNED_COST,T.PLANNED_DURATION,T.PLANNED_OVT_COST,T.PLANNED_OVT_WORK,T.REGULAR_WORK,T. REMAINING_COST,T.REMAINING_DURATION,T.REMAINING_OVT_COST,T.REMAINING_OVT_WORK,T.REMAINING_WORK,T.START_VARIANCE,T.VAC,T.WBS_CODE, T.ACTUAL_FINISH_VARIANCE, T.BASELINE_FINISH_VARIANCE, T.ACTUAL_WORK_VARIANCE, T.BASELINE_WORK_VARIANCE,T.ACTUAL_START_VARIANCE, T.BASELINE_START_VARIANCE, T.WORK_VARIANCE, TS.EXTERNAL_KEY1,TS.EXTERNAL_KEY2, TS.REC_DATETIME FROM RIODS.TASK_DETAIL T JOIN RIODS.TASK TS ON TS.TASK_ID=T.TASK_ID)
  3679. GO
  3680.  
  3681. CREATE VIEW RIDW.D_WEEK (DATE_ID, PERIOD_START_DATE, WEEK_OF_MONTH, WEEK_OF_YEAR, WEEK_NO, MONTH_OF_YEAR, MONTH_NAME, MONTH_NO, QUARTER_OF_YEAR, QUARTER_NO, YEAR_OF) AS (SELECT DATE_ID, PERIOD_START_DATE, WEEK_OF_MONTH, WEEK_OF_YEAR, WEEK_NO, MONTH_OF_YEAR, MONTH_NAME, MONTH_NO, QUARTER_OF_YEAR, QUARTER_NO, YEAR_OF FROM D_DATE WHERE DAY_OF_WEEK=1)
  3682. GO
  3683.  
  3684. CREATE VIEW RIDW.D_WEEK_ISO (DATE_ID, PERIOD_START_DATE, WEEK_OF_MONTH, WEEK_OF_YEAR, WEEK_NO, MONTH_OF_YEAR, MONTH_NAME, MONTH_NO, QUARTER_OF_YEAR, QUARTER_NO, YEAR_OF) AS (SELECT DATE_ID, PERIOD_START_DATE, WEEK_OF_MONTH_ISO, WEEK_OF_YEAR_ISO, WEEK_NO_ISO, MONTH_OF_YEAR, MONTH_NAME, MONTH_NO, QUARTER_OF_YEAR, QUARTER_NO, YEAR_OF FROM D_DATE WHERE DAY_OF_WEEK_ISO=1)
  3685. GO
  3686.  
  3687. CREATE VIEW RIDW.D_MONTH (DATE_ID, PERIOD_START_DATE, MONTH_OF_YEAR, MONTH_NAME, MONTH_NO, QUARTER_OF_YEAR, QUARTER_NO, YEAR_OF) AS (SELECT DATE_ID, PERIOD_START_DATE, MONTH_OF_YEAR, MONTH_NAME, MONTH_NO, QUARTER_OF_YEAR, QUARTER_NO, YEAR_OF FROM D_DATE WHERE DAY_OF_MONTH=1)
  3688. GO
  3689.  
  3690. CREATE VIEW RIDW.D_QUARTER (DATE_ID, PERIOD_START_DATE, QUARTER_OF_YEAR, QUARTER_NO, YEAR_OF) AS (SELECT DATE_ID, PERIOD_START_DATE, QUARTER_OF_YEAR, QUARTER_NO, YEAR_OF FROM D_DATE WHERE MONTH_OF_YEAR IN (1,4,7,10) AND DAY_OF_MONTH=1)
  3691. GO
  3692.  
  3693. CREATE VIEW RIDW.D_YEAR (DATE_ID, PERIOD_START_DATE, YEAR_OF) AS (SELECT DATE_ID, PERIOD_START_DATE, YEAR_OF FROM D_DATE WHERE MONTH_OF_YEAR =1 AND DAY_OF_MONTH=1)
  3694. GO
  3695.  
  3696. CREATE VIEW RIDW.VW_BUILD (BUILD_ID, BUILD_CLASS_ID, BUILD_CLASS_NAME,ITERATION_ID, ITERATION_NAME,TEAM_ID,TEAM_NAME,BUILD_STATE, COMPONENT_ID, COMPONENT_NAME, END_TIME, EXTERNAL_ID, NAME, REFERENCE_ID, START_TIME, STATUS, BUILD_TYPE,URL, BASELINE_ID,BASELINE_NAME,OWNER_ID,OWNER_NAME,PROJECT_ID,PROJECT_NAME,PROJECT_TYPE_ID,PROJECT_TYPE_NAME,CREATION_DATE,WAITING_TIME,BUILDING_TIME,ENGINE,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT B.BUILD_ID, B.BUILD_CLASS_ID, BC.NAME AS BUILD_CLASS_NAME,B.ITERATION_ID, I.NAME AS ITERATION_NAME,B.TEAM_ID,T.NAME AS TEAM_NAME,B.BUILD_STATE, B.COMPONENT_ID,D1.NAME AS COMPONENT_NAME, B.END_TIME, B.EXTERNAL_ID, B.NAME, B.REFERENCE_ID, B.START_TIME, B.STATUS, B.BUILD_TYPE, B.URL, B.BASELINE_ID,BS.NAME AS BASELINE_NAME,B.OWNER_ID,R.FULL_NAME AS OWNER_NAME,B.PROJECT_ID,P.NAME AS PROJECT_NAME,B.PROJECT_TYPE_ID,PT.NAME AS PROJECT_TYPE_NAME,B.CREATION_DATE,B.WAITING_TIME,B.BUILDING_TIME,B.ENGINE,B.EXTERNAL_KEY1,B.EXTERNAL_KEY2, B.REC_DATETIME, B.ISSOFTDELETED
  3697. FROM RIODS.BUILD B JOIN RIODS.BUILD_CLASSIFICATION BC ON BC.BUILD_CLASS_ID =B.BUILD_CLASS_ID JOIN RIODS.ITERATION I ON I.ITERATION_ID=B.ITERATION_ID JOIN RIODS.TEAM T ON T.TEAM_ID=B.TEAM_ID JOIN RIODS.COMPONENT D1 ON D1.COMPONENT_ID=B.COMPONENT_ID JOIN RIODS.PROJECT_BASELINE BS ON BS.BASELINE_ID=B.BASELINE_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID =B.OWNER_ID JOIN RIODS.PROJECT P ON P.PROJECT_ID=B.PROJECT_ID JOIN RIODS.PROJECT_TYPE PT ON PT.PROJECT_TYPE_ID=B.PROJECT_TYPE_ID)
  3698. GO
  3699.  
  3700. CREATE VIEW RIDW.VW_COMPONENT (COMPONENT_ID, EXTERNAL_ID, NAME, PRODUCT_ID, PRODUCT_NAME, PROJECT_ID, PROJECT_NAME, REFERENCE_ID, URL,EXTERNAL_KEY1,EXTERNAL_KEY2,COMPONENT_CLASS_ID,COMPONENT_CLASS_NAME,PARENT_COMPONENT_ID,PARENT_COMPONENT_NAME,REC_DATETIME,ISSOFTDELETED) AS (SELECT C.COMPONENT_ID, C.EXTERNAL_ID, C.NAME, C.PRODUCT_ID, D1.NAME AS PRODUCT_NAME, COALESCE(D.PROJECT_ID,-1) AS PROJECT_ID, D2.NAME AS PROJECT_NAME, C.REFERENCE_ID, C.URL,C.EXTERNAL_KEY1,C.EXTERNAL_KEY2,C.COMPONENT_CLASS_ID,CL.NAME AS COMPONENT_CLASS_NAME,C.PARENT_COMPONENT_ID,CP.NAME AS PARENT_COMPONENT_NAME,C.REC_DATETIME,C.ISSOFTDELETED FROM RIODS.COMPONENT C JOIN RIODS.COMPONENT CP ON CP.COMPONENT_ID=C.PARENT_COMPONENT_ID JOIN RIODS.PRODUCT D1 ON D1.PRODUCT_ID=C.PRODUCT_ID LEFT JOIN RIODS.PROJECT_COMPONENT_LOOKUP D ON D.COMPONENT_ID=C.COMPONENT_ID LEFT JOIN RIODS.PROJECT D2 ON D2.PROJECT_ID=D.PROJECT_ID JOIN RIODS.COMPONENT_CLASSIFICATION CL ON CL.COMPONENT_CLASS_ID=C.COMPONENT_CLASS_ID)
  3701. GO
  3702.  
  3703. CREATE VIEW RIDW.VW_TEAM (EXTERNAL_ID, NAME, REFERENCE_ID, TEAM_ID,PROJECT_ID,PROJECT_NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT C.EXTERNAL_ID, C.NAME, C.REFERENCE_ID, C.TEAM_ID,C.PROJECT_ID,P.NAME AS PROJECT_NAME,C.EXTERNAL_KEY1,C.EXTERNAL_KEY2,C.REC_DATETIME,C.ISSOFTDELETED FROM RIODS.TEAM C JOIN RIODS.PROJECT P ON P.PROJECT_ID=C.PROJECT_ID)
  3704. GO
  3705.  
  3706. CREATE VIEW RIDW.VW_CURRENCY (CURRENCY_ID, DEFAULT_CURRENCY, EXCHANGE_RATE, EXTERNAL_ID, NAME, REFERENCE_ID, URL, VALID_FINISH_DATE, VALID_START_DATE,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT C.CURRENCY_ID, CASE WHEN C.DEFAULT_CURRENCY=1 THEN 'True' ELSE 'False' END AS DEFAULT_CURRENCY, C.EXCHANGE_RATE, C.EXTERNAL_ID, C.NAME, C.REFERENCE_ID, C.URL, C.VALID_FINISH_DATE, C.VALID_START_DATE,C.EXTERNAL_KEY1,C.EXTERNAL_KEY2,C.REC_DATETIME,C.ISSOFTDELETED FROM RIODS.CURRENCY C)
  3707. GO
  3708.  
  3709. CREATE VIEW RIDW.VW_CUSTOMER (COMPANY_NAME, CONTACT_ADDRESS, CONTACT_EMAIL, CONTACT_FAX, CONTACT_PHONE, CUSTOMER_ID, CUST_REFID, EXTERNAL_ID, GEO_LOCATION, NAME, REFERENCE_ID, URL,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT C.COMPANY_NAME, C.CONTACT_ADDRESS, C.CONTACT_EMAIL, C.CONTACT_FAX, C.CONTACT_PHONE, C.CUSTOMER_ID, C.CUST_REFID, C.EXTERNAL_ID, C.GEO_LOCATION, C.NAME, C.REFERENCE_ID, C.URL,C.EXTERNAL_KEY1,C.EXTERNAL_KEY2,C.REC_DATETIME,C.ISSOFTDELETED FROM RIODS.CUSTOMER C)
  3710. GO
  3711.  
  3712. CREATE VIEW RIDW.VW_FACTOR (EXTERNAL_ID, FACTOR_ID, MITIGATION_COST, NAME, REFERENCE_ID, RISK_ID, RISK_NAME, URL,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED,PRIORITY ,DESCRIPTION,WEIGHT,PROBABILITY,PROBABILITY_RANK,MITIGATION_ACTION) AS (SELECT F.EXTERNAL_ID, F.FACTOR_ID, F.MITIGATION_COST, F.NAME, F.REFERENCE_ID, F.RISK_ID, R.NAME AS RISK_NAME, F.URL,F.EXTERNAL_KEY1,F.EXTERNAL_KEY2,F.REC_DATETIME,F.ISSOFTDELETED,F.PRIORITY ,F.DESCRIPTION,WEIGHT,F.PROBABILITY,F.PROBABILITY_RANK,F.MITIGATION_ACTION FROM RIODS.FACTOR F JOIN RIODS.RISK R ON R.RISK_ID=F.RISK_ID)
  3713. GO
  3714.  
  3715. CREATE VIEW RIDW.VW_FILE (EXTERNAL_ID, FILE_CLASS_ID,FILE_ID, NAME, REFERENCE_ID, URL,COMPONENT_ID,COMPONENT_NAME,NUM_SLOC,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT F.EXTERNAL_ID, F.FILE_CLASS_ID,F.FILE_ID, F.NAME, F.REFERENCE_ID, F.URL, F. COMPONENT_ID,C.NAME AS COMPONENT_NAME,F.NUM_SLOC,F.EXTERNAL_KEY1,F.EXTERNAL_KEY2,F.REC_DATETIME,F.ISSOFTDELETED FROM RIODS.[FILE] F JOIN RIODS.COMPONENT C ON C.COMPONENT_ID=F.COMPONENT_ID)
  3716. GO
  3717.  
  3718. CREATE VIEW RIDW.VW_FILE_BASELINE (EXTERNAL_ID, FILE_BASELINE_ID, NAME, REFERENCE_ID, URL,COMPONENT_ID,COMPONENT_NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT F.EXTERNAL_ID, F.FILE_BASELINE_ID, F.NAME, F.REFERENCE_ID, F.URL,F.COMPONENT_ID,C.NAME AS COMPONENT_NAME,F.EXTERNAL_KEY1,F.EXTERNAL_KEY2,F.REC_DATETIME,F.ISSOFTDELETED FROM RIODS.FILE_BASELINE F JOIN RIODS.COMPONENT C ON C.COMPONENT_ID=F.COMPONENT_ID)
  3719. GO
  3720.  
  3721. CREATE VIEW RIDW.VW_FILE_STREAM (EXTERNAL_ID, FILE_STREAM_CLASS_ID,FILE_STREAM_ID, NAME, REFERENCE_ID, URL,PROJECT_ID,PROJECT_NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT F.EXTERNAL_ID, F.FILE_STREAM_CLASS_ID,F.FILE_STREAM_ID,F.NAME, F.REFERENCE_ID, F.URL,F.PROJECT_ID,P.NAME AS PROJECT_NAME,F.EXTERNAL_KEY1,F.EXTERNAL_KEY2,F.REC_DATETIME,F.ISSOFTDELETED FROM RIODS.FILE_STREAM F JOIN RIODS.PROJECT P ON P.PROJECT_ID=F.PROJECT_ID)
  3722. GO
  3723.  
  3724. CREATE VIEW RIDW.VW_RESOURCE (EXTERNAL_ID, FIRST_NAME, FULL_NAME, LAST_NAME, MIDDLE_INITIAL, NAME, RESOURCE_ID, REFERENCE_ID, URL, OVERTIME_RATE,TIME_PER_DAY,POOL_ID,POOL_NAME,RESOURCE_TYPE,STANDARD_RATE,EFFECTIVE_DATE,DISCONTINUE_DATE,EXTERNAL_KEY1,EXTERNAL_KEY2,CITY_ID,CITY_NAME,ORGANIZATION_ID,ORGANIZATION_NAME,REC_DATETIME,ISSOFTDELETED) AS (SELECT P.EXTERNAL_ID, P.FIRST_NAME, P.FULL_NAME, P.LAST_NAME, P.MIDDLE_INITIAL, P.NAME, P.RESOURCE_ID, P.REFERENCE_ID, P.URL, P.OVERTIME_RATE,P.TIME_PER_DAY,P.POOL_ID,PL.NAME AS POOL_NAME,P.RESOURCE_TYPE,P.STANDARD_RATE,P.EFFECTIVE_DATE,P.DISCONTINUE_DATE,P.EXTERNAL_KEY1,P.EXTERNAL_KEY2,P.CITY_ID,C.NAME AS CITY_NAME,P.ORGANIZATION_ID,O.NAME AS ORGANIZATION_NAME,P.REC_DATETIME,P.ISSOFTDELETED FROM RIODS.RESOURCE P JOIN RIODS.POOL PL ON PL.POOL_ID=P.POOL_ID JOIN RIODS.CITY C ON C.CITY_ID=P.CITY_ID JOIN RIODS.ORGANIZATION O ON O.ORGANIZATION_ID=P.ORGANIZATION_ID)
  3725. GO
  3726.  
  3727. CREATE VIEW RIDW.VW_PRODUCT (EXTERNAL_ID, NAME, PRODUCT_ID, REFERENCE_ID, URL,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT P.EXTERNAL_ID, P.NAME, P.PRODUCT_ID, P.REFERENCE_ID, P.URL,P.EXTERNAL_KEY1,P.EXTERNAL_KEY2,P.REC_DATETIME,P.ISSOFTDELETED FROM RIODS.PRODUCT P)
  3728. GO
  3729.  
  3730. CREATE VIEW RIDW.VW_PROJECT (EXTERNAL_ID, NAME, PROJECT_ID, PROGRAM_ID, PROGRAM_NAME, PROJECT_MANAGER, MANAGER_NAME, REFERENCE_ID, URL, END_DATE,START_DATE,PROJECT_CATEGORY_ID,PROJECT_CATEGORY_NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,PROJECT_CLASS_ID,PROJECT_CLASS_NAME,SHIP_DATE,PRIORITY,STATUS,FEASIBILITY,REC_DATETIME,ISSOFTDELETED) AS (SELECT P.EXTERNAL_ID, P.NAME, P.PROJECT_ID, P.PROGRAM_ID, PR.NAME, P.PROJECT_MANAGER,R.FULL_NAME AS MANAGER_NAME, P.REFERENCE_ID, P.URL, P.END_DATE,P.START_DATE,P.PROJECT_CATEGORY_ID,PC.NAME AS PROJECT_CATEGORY_NAME,P.EXTERNAL_KEY1,P.EXTERNAL_KEY2,P.PROJECT_CLASS_ID,PL.NAME AS PROJECT_CLASS_NAME,P.SHIP_DATE,P.PRIORITY,P.STATUS,P.FEASIBILITY,P.REC_DATETIME,P.ISSOFTDELETED FROM RIODS.PROJECT P JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=P.PROJECT_MANAGER JOIN RIODS.PROJECT_CATEGORY PC ON PC.PROJECT_CATEGORY_ID=P.PROJECT_CATEGORY_ID JOIN RIODS.PROJECT_CLASSIFICATION PL ON PL.PROJECT_CLASS_ID=P.PROJECT_CLASS_ID JOIN RIODS.PROGRAM PR ON PR.PROGRAM_ID=P.PROGRAM_ID)
  3731. GO
  3732.  
  3733. CREATE VIEW RIDW.VW_PROJECT_DETAIL (ACTUAL_BUDGET, ACTUAL_FINISH, ACTUAL_START, ACTUAL_VARIANCE, ACWP, BAC, BASELINE_COST, BASELINE_ESTIMATED_COST, BASELINE_ESTIMATED_FINISH, BASELINE_ESTIMATED_START, BASELINE_FINISH, BASELINE_START, BASELINE_VARIANCE, BCWP, BCWS, CURRENCY_ID, CURRENT_BUDGET, EAC, EV_ETC, EV_FLAG, PLANNED_BUDGET, PLANNED_FINISH, PLANNED_START, PROJECT_ID, ACTUAL_DURATION, ACTUAL_WORK, ACTUAL_WORK_VARIANCE, ACTUAL_START_VARIANCE, ACTUAL_FINISH_VARIANCE, ACTUAL_COST, ACTUAL_COST_VARIANCE, BASELINE_DURATION, BASELINE_WORK, BASELINE_WORK_VARIANCE, BASELINE_START_VARIANCE, BASELINE_FINISH_VARIANCE, BASELINE_COST_VARIANCE, PLANNED_COST, COST_VARIANCE, PLANNED_DURATION, PLANNED_WORK, WORK_VARIANCE, START_VARIANCE, FINISH_VARIANCE, DURATION_VARIANCE, PROJECT_NAME, URL, EXTERNAL_KEY1, EXTERNAL_KEY2,PERCENT_COMPLETE,PERCENT_WORK_COMPLETE,BUDGETED_REVENUE,PLANNED_REVENUE,ACTUAL_REVENUE,BUDGETED_COST,NET_PRESENT_VALUE,INTERNAL_RATE_OF_RETURN) AS (SELECT P.ACTUAL_BUDGET, P.ACTUAL_FINISH, P.ACTUAL_START,
  3734. P.ACTUAL_VARIANCE, P.ACWP, P.BAC, P.BASELINE_COST, P.BASELINE_ESTIMATED_COST, P.BASELINE_ESTIMATED_FINISH, P.BASELINE_ESTIMATED_START, P.BASELINE_FINISH, P.BASELINE_START, P.BASELINE_VARIANCE, P.BCWP, P.BCWS, P.CURRENCY_ID, P.CURRENT_BUDGET, P.EAC, P.EV_ETC, P.EV_FLAG, P.PLANNED_BUDGET, P.PLANNED_FINISH, P.PLANNED_START, P.PROJECT_ID,P.ACTUAL_DURATION, P.ACTUAL_WORK, P.ACTUAL_WORK_VARIANCE, P.ACTUAL_START_VARIANCE ,P.ACTUAL_FINISH_VARIANCE, P.ACTUAL_COST ,P.ACTUAL_COST_VARIANCE, P.BASELINE_DURATION ,P.BASELINE_WORK ,P.BASELINE_WORK_VARIANCE ,P.BASELINE_START_VARIANCE , P.BASELINE_FINISH_VARIANCE ,P.BASELINE_COST_VARIANCE,P.PLANNED_COST ,P.COST_VARIANCE,P.PLANNED_DURATION ,P.PLANNED_WORK ,P.WORK_VARIANCE,P.START_VARIANCE , P.FINISH_VARIANCE ,P.DURATION_VARIANCE, R.NAME AS PROJECT_NAME, R.URL,R.EXTERNAL_KEY1,R.EXTERNAL_KEY2,P.PERCENT_COMPLETE,P.PERCENT_WORK_COMPLETE,P.BUDGETED_REVENUE,P.PLANNED_REVENUE,P.ACTUAL_REVENUE,P.BUDGETED_COST,P.NET_PRESENT_VALUE,P.INTERNAL_RATE_OF_RETURN FROM RIODS.PROJECT_DETAIL
  3735. P JOIN RIODS.PROJECT R ON R.PROJECT_ID=P.PROJECT_ID)
  3736. GO
  3737.  
  3738. CREATE VIEW RIDW.VW_PROJECT_CATEGORY (PROJECT_CATEGORY_ID, EXTERNAL_ID, REFERENCE_ID, NAME, PROJECT_ID, PROJECT_NAME, CATEGORY_TYPE, OWNER_ID, MANAGER_NAME, URL,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT PC.PROJECT_CATEGORY_ID, PC.EXTERNAL_ID, PC.REFERENCE_ID, PC.NAME, P.PROJECT_ID, P.NAME AS PROJECT_NAME, PC.CATEGORY_TYPE, PC.OWNER_ID,R.FULL_NAME AS MANAGER_NAME, PC.URL,PC.EXTERNAL_KEY1,PC.EXTERNAL_KEY2,PC.REC_DATETIME,PC.ISSOFTDELETED FROM RIODS.PROJECT_CATEGORY PC JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=PC.OWNER_ID JOIN RIODS.PROJECT P ON P.PROJECT_CATEGORY_ID=PC.PROJECT_CATEGORY_ID)
  3739. GO
  3740.  
  3741. CREATE VIEW RIDW.VW_PHASE (PHASE_ID, NAME, REFERENCE_ID, EXTERNAL_ID, PROJECT_ID, PROJECT_NAME, STATUS, START_DATE, END_DATE, URL,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT PP.PHASE_ID, PP.NAME, PP.REFERENCE_ID, PP.EXTERNAL_ID, PP.PROJECT_ID, P.NAME AS PROJECT_NAME, PP.STATUS, PP.START_DATE, PP.END_DATE , PP.URL,PP.EXTERNAL_KEY1,PP.EXTERNAL_KEY2,PP.REC_DATETIME,PP.ISSOFTDELETED FROM RIODS.PHASE PP JOIN RIODS.PROJECT P ON P.PROJECT_ID=PP.PROJECT_ID)
  3742. GO
  3743.  
  3744. CREATE VIEW RIDW.VW_ITERATION (ITERATION_ID, NAME, REFERENCE_ID, EXTERNAL_ID, ASSETREGISTRY_ID,ASSETREGISTRY_NAME,PROJECT_ID, PROJECT_NAME,PHASE_ID, PHASE_NAME,OWNER_ID,OWNER_NAME,PARENT_ITERATION_ID,PARENT_ITERATION_NAME,TIMELINE_ID,TIMELINE_NAME,STATUS, DESCRIPTION, START_DATE, END_DATE, EXPECTED_START_DATE, EXPECTED_END_DATE,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,EXPECTED_TOTAL_POINTS,EXPECTED_DEFECTS,EXPECTED_VALIDITY_RATE,REC_DATETIME,ISSOFTDELETED) AS (SELECT I.ITERATION_ID, I.NAME, I.REFERENCE_ID, I.EXTERNAL_ID, I.ASSETREGISTRY_ID,A.NAME,I.PROJECT_ID, P.NAME AS PROJECT_NAME,I.PHASE_ID,PH.NAME,I.OWNER_ID,R.FULL_NAME AS OWNER_NAME,I.PARENT_ITERATION_ID,PI.NAME AS PARENT_ITERATION_NAME,I.TIMELINE_ID,T.NAME AS TIMELINE_NAME,I.STATUS,I.DESCRIPTION,I.START_DATE, I.END_DATE , I.EXPECTED_START_DATE, I.EXPECTED_END_DATE,I.URL,I.EXTERNAL_KEY1,I.EXTERNAL_KEY2, I.EXPECTED_TOTAL_POINTS,I.EXPECTED_DEFECTS,I.EXPECTED_VALIDITY_RATE,I.REC_DATETIME,I.ISSOFTDELETED FROM RIODS.ITERATION I JOIN RIODS.PROJECT
  3745. P ON P.PROJECT_ID=I.PROJECT_ID JOIN RIODS.PHASE PH ON PH.PHASE_ID=I.PHASE_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=I.OWNER_ID JOIN RIODS.ASSETREGISTRY A ON A.ASSETREGISTRY_ID=I.ASSETREGISTRY_ID JOIN RIODS.ITERATION PI ON PI.ITERATION_ID=I.PARENT_ITERATION_ID JOIN RIODS.TIMELINE T ON T.TIMELINE_ID=I.TIMELINE_ID)
  3746. GO
  3747.  
  3748. CREATE VIEW RIDW.VW_PROJECT_ROLE (PROJECT_ROLE_ID, NAME, REFERENCE_ID, EXTERNAL_ID, PROJECT_ID, PROJECT_NAME, OWNER_ID, MANAGER_NAME, URL,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT PR.PROJECT_ROLE_ID, PR.NAME, PR.REFERENCE_ID, PR.EXTERNAL_ID, PR.PROJECT_ID, P.NAME AS PROJECT_NAME, PR.OWNER_ID,R.FULL_NAME AS MANAGER_NAME, PR.URL,PR.EXTERNAL_KEY1,PR.EXTERNAL_KEY2,PR.REC_DATETIME,PR.ISSOFTDELETED FROM RIODS.PROJECT_ROLE PR JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=PR.OWNER_ID JOIN RIODS.PROJECT P ON P.PROJECT_ID=PR.PROJECT_ID)
  3749. GO
  3750.  
  3751. CREATE VIEW RIDW.VW_PROJECT_WORKCONFIGURATION (PROJECT_WKCFG_ID, NAME, REFERENCE_ID, EXTERNAL_ID, PROJECT_ID, PROJECT_NAME, RECORD_TYPE, URL,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT PWC.PROJECT_WKCFG_ID, PWC.NAME, PWC.REFERENCE_ID, PWC.EXTERNAL_ID, PWC.PROJECT_ID, P.NAME AS PROJECT_NAME, PWC.RECORD_TYPE, PWC.URL,PWC.EXTERNAL_KEY1,PWC.EXTERNAL_KEY2,PWC.REC_DATETIME,PWC.ISSOFTDELETED FROM RIODS.PROJECT_WORKCONFIGURATION PWC JOIN RIODS.PROJECT P ON P.PROJECT_ID=PWC.PROJECT_ID)
  3752. GO
  3753.  
  3754. CREATE VIEW RIDW.VW_PROJECT_TYPE (PROJECT_TYPE_ID, EXTERNAL_ID, REFERENCE_ID, NAME, PROJECT_ID, PROJECT_NAME, PROJECT_WKCFG_ID, PROJECT_WORKCONFIGURATION_NAME, RECORD_TYPE, URL,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT PT.PROJECT_TYPE_ID, PT.EXTERNAL_ID, PT.REFERENCE_ID, PT.NAME, PT.PROJECT_ID, P.NAME AS PROJECT_NAME, COALESCE(PWC.PROJECT_WKCFG_ID,-1) AS PROJECT_WKCFG_ID, COALESCE(PWC.NAME,'Info not available') AS PROJECT_WORKCONFIGURATION_NAME, PT.RECORD_TYPE, PT.URL,PT.EXTERNAL_KEY1,PT.EXTERNAL_KEY2,PT.REC_DATETIME,PT.ISSOFTDELETED FROM RIODS.PROJECT_TYPE PT JOIN RIODS.PROJECT P ON P.PROJECT_ID=PT.PROJECT_ID LEFT JOIN RIODS.PROJECT_WORKCONFIGURATION PWC ON P.PROJECT_ID=PWC.PROJECT_ID)
  3755. GO
  3756.  
  3757. CREATE VIEW RIDW.VW_ACTIVITY (ACTIVITY_ID, EXTERNAL_ID, REFERENCE_ID, NAME, TASK_ID, TASK_NAME,OWNER_ID, OWNER_FULLNAME, PROFILE_ID, PROFILE_NAME, FAILED_BUILD, VALIDATION_BUILD, NOTEST_BUILD, FILE_STREAM_ID, FILE_STREAM_NAME, RESOLUTION_CODE, CHARGECODE_ID, CHARGECODE_NAME, URL, ACTIVITY_STATE,ACTIVITY_TYPE,CREATION_DATE,PRIORITY,PROJECT_ID,PROJECT_NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,ACTIVITY_CLASS_ID,ACTIVITY_CLASS_NAME,STATUS,RESOLUTION,REC_DATETIME,ISSOFTDELETED) AS (SELECT A.ACTIVITY_ID, A.EXTERNAL_ID, A.REFERENCE_ID, A.NAME, A.TASK_ID, T.NAME AS TASK_NAME,A.OWNER_ID,R.FULL_NAME AS OWNER_FULLNAME, PR.PROFILE_ID, PR.NAME AS PROFILE_NAME, A.FAILED_BUILD, A.VALIDATION_BUILD, A.NOTEST_BUILD, A.FILE_STREAM_ID, S.NAME AS FILE_STREAM_NAME, A.RESOLUTION_CODE, C.CHARGECODE_ID, C.NAME,A.URL, A.ACTIVITY_STATE,A.ACTIVITY_TYPE,A.CREATION_DATE,A.PRIORITY,A.PROJECT_ID,P.NAME AS PROJECT_NAME,A.EXTERNAL_KEY1,A.EXTERNAL_KEY2,A.ACTIVITY_CLASS_ID,AC.NAME AS ACTIVITY_CLASS_NAME,A.STATUS,A.RESOLUTION,A.REC_DATETIME,A.ISSOFTDELETED
  3758. FROM RIODS.ACTIVITY A JOIN RIODS.TASK T ON T.TASK_ID=A.TASK_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=A.OWNER_ID JOIN RIODS.PROFILE PR ON PR.PROFILE_ID=A.PROFILE_ID JOIN RIODS.FILE_STREAM S ON S.FILE_STREAM_ID=A.FILE_STREAM_ID JOIN RIODS.PROJECT P ON P.PROJECT_ID=A.PROJECT_ID JOIN RIODS.ACTIVITY_CLASSIFICATION AC ON AC.ACTIVITY_CLASS_ID=A.ACTIVITY_CLASS_ID JOIN RIODS.CHARGECODE C ON C.CHARGECODE_ID=A.CHARGECODE_ID)
  3759. GO
  3760.  
  3761. CREATE VIEW RIDW.VW_REQUEST_ACTIVITY_LOOKUP (REQUEST_ID,REQUEST_NAME,ACTIVITY_ID,ACTIVITY_NAME) AS (SELECT RA.REQUEST_ID, R.NAME AS REQUEST_NAME,RA.ACTIVITY_ID, A.NAME AS ACTIVITY_NAME FROM RIODS.REQUEST_ACTIVITY_LOOKUP RA JOIN RIODS.REQUEST R ON R.REQUEST_ID =RA.REQUEST_ID JOIN RIODS. ACTIVITY A ON A.ACTIVITY_ID=RA.ACTIVITY_ID)
  3762. GO
  3763.  
  3764. CREATE VIEW RIDW.VW_COMMENT (COMMENT_ID, RESPONSE_COMMENT_ID, REQUEST_ID, REQUEST_NAME, TASK_ID, TASK_NAME, ACTIVITY_ID, ACTIVITY_NAME, OWNER_ID, AUTHOR, CREATION_DATE, URL,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT C.COMMENT_ID, C.RESPONSE_COMMENT_ID, C.REQUEST_ID, CR.NAME AS REQUEST_NAME, C.TASK_ID, T.NAME AS TASK_NAME, C.ACTIVITY_ID, A.NAME AS ACTIVITY_NAME, C.OWNER_ID, R.FULL_NAME AS AUTHOR, C.CREATION_DATE, C.URL,C.EXTERNAL_KEY1,C.EXTERNAL_KEY2,C.REC_DATETIME,C.ISSOFTDELETED FROM RIODS.COMMENT C JOIN RIODS.REQUEST CR ON CR.REQUEST_ID=C.REQUEST_ID JOIN RIODS.TASK T ON T.TASK_ID=C.TASK_ID JOIN RIODS.ACTIVITY A ON A.ACTIVITY_ID=C.ACTIVITY_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=C.OWNER_ID)
  3765. GO
  3766.  
  3767. CREATE VIEW RIDW.VW_RELEASE (AVAILABILITY_DATE, DECOMISSION_DATE, EXTERNAL_ID, ITERATION_ID, ITERATION_NAME, NAME, PRODUCT_ID, PRODUCT_NAME, REFERENCE_ID, RELEASE_ID, URL,EXTERNAL_KEY1,EXTERNAL_KEY2,PROJECT_ID,PROJECT_NAME,REC_DATETIME,ISSOFTDELETED) AS (SELECT R.AVAILABILITY_DATE, R.DECOMISSION_DATE, R.EXTERNAL_ID, R.ITERATION_ID, I.NAME AS ITERATION_NAME, R.NAME, R.PRODUCT_ID, P.NAME AS PRODUCT_NAME, R.REFERENCE_ID, R.RELEASE_ID, R.URL,R.EXTERNAL_KEY1,R.EXTERNAL_KEY2,R.PROJECT_ID,PR.NAME AS PROJECT_NAME,R.REC_DATETIME,R.ISSOFTDELETED FROM RIODS.RELEASE R JOIN RIODS.ITERATION I ON I.ITERATION_ID=R.ITERATION_ID JOIN RIODS.PROJECT PR ON PR.PROJECT_ID=R.PROJECT_ID JOIN RIODS.PRODUCT P ON P.PRODUCT_ID=R.PRODUCT_ID)
  3768. GO
  3769.  
  3770. CREATE VIEW RIDW.VW_REQUEST (ACTIVATE_DATE, ASSIGNED_DATE, CLOSED_DATE, COMPONENT_ID, COMPONENT_NAME, CREATION_DATE, CUSTOMER_PRIORITY, DUPLICATE_DATE, EXTERNAL_ID, FIXEDINRELEASE_ID, FIXED_IN_RELEASE_NAME, IS_BLOCKING, ITERATION_ID, ITERATION_NAME, TEAM_ID, TEAM_NAME, PLANNED_WORK, ACTUAL_WORK, COMMENT_COUNT, SUBSCRIBER_COUNT, STORY_POINTS, TAGS, NAME, PLATFORM, REQUEST_PRIORITY_ID,REQUEST_PRIORITY,REQUEST_PRIORITY_EXTERNAL_ID, PROJECT_ID, PROJECT_NAME, REFERENCE_ID, RELEASE_ID, FOUND_IN_RELEASE_NAME, REQUEST_CLASS_ID, REQUEST_CLASS, REQUEST_ID, OWNER_ID, REQUEST_RESPONSIBLE, REQUEST_SOURCE, REQUEST_STATE_ID,REQUEST_STATE,REQUEST_STATE_EXTERNAL_ID, REQUEST_RESOLUTION_ID,REQUEST_RESOLUTION, REQUEST_RESOLUTION_EXTERNAL_ID,RESOLVED_DATE, REQUEST_SEVERITY_ID, REQUEST_SEVERITY,REQUEST_SEVERITY_EXTERNAL_ID,SLOC_CHANGE, REQUEST_STATUS_ID, REQUEST_STATUS,REQUEST_STATUS_EXTERNAL_ID,SUBMIT_DATE, URL, DUE_DATE,CREATOR_ID,CREATOR_NAME,BUILD_ID,BUILD_NAME,PHASE_ID,PHASE_NAME,PROJECT_CATEGORY_ID, PROJECT_CATEGORY_NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,REQUEST_TYPE_ID,REQUEST_TYPE,REQUEST_TYPE_EXTERNAL_ID,REQUEST_CATEGORY_ID,REQUEST_CATEGORY_NAME,RESOLVER_ID,RESOLVER_NAME,SUMMARY,REC_DATETIME,ISSOFTDELETED)
  3771. AS (SELECT R.ACTIVATE_DATE, R.ASSIGNED_DATE, R.CLOSED_DATE, R.COMPONENT_ID,C.NAME AS COMPONENT_NAME, R.CREATION_DATE, R.CUSTOMER_PRIORITY, R.DUPLICATE_DATE, R.EXTERNAL_ID, R.FIXEDINRELEASE_ID,RL.NAME AS FIXED_IN_RELEASE_NAME, R.IS_BLOCKING, R.ITERATION_ID,I.NAME AS ITERATION_NAME, R.TEAM_ID, T.NAME AS TEAM_NAME, R.PLANNED_WORK, R.ACTUAL_WORK, R.COMMENT_COUNT, R.SUBSCRIBER_COUNT, R.STORY_POINTS, R.TAGS, R.NAME, R.PLATFORM, R.REQUEST_PRIORITY_ID,RP.NAME AS REQUEST_PRIORITY, RP.EXTERNAL_ID AS REQUEST_PRIORITY_EXTERNAL_ID,R.PROJECT_ID, PJ.NAME AS PROJECT_NAME,R.REFERENCE_ID, R.RELEASE_ID, RL2.NAME AS FOUND_IN_RELEASE_NAME, R.REQUEST_CLASS_ID,RQ.NAME AS REQUEST_CLASS, R.REQUEST_ID, R.OWNER_ID,PS.FULL_NAME AS REQUEST_RESPONSIBLE, R.REQUEST_SOURCE, R.REQUEST_STATE_ID, RST.NAME AS REQUEST_STATE,RST.EXTERNAL_ID AS REQUEST_STATE_EXTERNAL_ID,R.REQUEST_RESOLUTION_ID,RRES.NAME AS REQUEST_RESOLUTION, RRES.EXTERNAL_ID AS REQUEST_RESOLUTION_EXTERNAL_ID,R.RESOLVED_DATE, R.REQUEST_SEVERITY_ID, RSEV.NAME AS REQUEST_SEVERITY, RSEV.EXTERNAL_ID
  3772. AS REQUEST_SEVERITY_EXTERNAL_ID,R.SLOC_CHANGE, R.REQUEST_STATUS_ID,RSTU.NAME AS REQUEST_STATUS,RSTU.EXTERNAL_ID AS REQUEST_STATUS_EXTERNAL_ID,R.SUBMIT_DATE, R.URL, R.DUE_DATE,R.CREATOR_ID,RES.FULL_NAME AS CREATOR_NAME,R.BUILD_ID,B.NAME AS BUILD_NAME,R.PHASE_ID,PH.NAME AS PHASE_NAME,R.PROJECT_CATEGORY_ID,PC.NAME AS PROJECT_CATEGORY_NAME,R.EXTERNAL_KEY1,R.EXTERNAL_KEY2,R.REQUEST_TYPE_ID,RT.NAME REQUEST_TYPE,RT.EXTERNAL_ID AS REQUEST_TYPE_EXTERNAL_ID,R.REQUEST_CATEGORY_ID,RC.NAME AS REQUEST_CATEGORY_NAME,R.RESOLVER_ID,RS.FULL_NAME AS RESOLVER_NAME,R.SUMMARY,R.REC_DATETIME,R.ISSOFTDELETED FROM RIODS.REQUEST R JOIN RIODS.ITERATION I ON I.ITERATION_ID=R.ITERATION_ID JOIN RIODS.TEAM T ON T.TEAM_ID=R.TEAM_ID JOIN RIODS.PROJECT PJ ON PJ.PROJECT_ID=R.PROJECT_ID JOIN RIODS.COMPONENT C ON C.COMPONENT_ID=R.COMPONENT_ID JOIN RIODS.RELEASE RL ON RL.RELEASE_ID=R.FIXEDINRELEASE_ID JOIN RIODS.RELEASE RL2 ON RL2.RELEASE_ID=R.RELEASE_ID JOIN RIODS.REQUEST_CLASSIFICATION RQ ON
  3773. RQ.REQUEST_CLASS_ID=R.REQUEST_CLASS_ID JOIN RIODS.REQUEST_CATEGORY RC ON RC.REQUEST_CATEGORY_ID=R.REQUEST_CATEGORY_ID JOIN RIODS.BUILD B ON B.BUILD_ID=R.BUILD_ID JOIN RIODS.PHASE PH ON PH.PHASE_ID=R.PHASE_ID JOIN RIODS.PROJECT_CATEGORY PC ON PC.PROJECT_CATEGORY_ID=R.PROJECT_CATEGORY_ID JOIN RIODS.RESOURCE PS ON PS.RESOURCE_ID=R.OWNER_ID JOIN RIODS.RESOURCE RS ON RS.RESOURCE_ID=R.RESOLVER_ID JOIN RIODS.RESOURCE RES ON RES.RESOURCE_ID=R.CREATOR_ID JOIN RIODS.REQUEST_STATE RST ON RST.REQUEST_STATE_ID=R.REQUEST_STATE_ID JOIN RIODS.REQUEST_STATUS RSTU ON RSTU.REQUEST_STATUS_ID=R.REQUEST_STATUS_ID JOIN RIODS.REQUEST_PRIORITY RP ON RP.REQUEST_PRIORITY_ID=R.REQUEST_PRIORITY_ID JOIN RIODS.REQUEST_RESOLUTION RRES ON RRES.REQUEST_RESOLUTION_ID=R.REQUEST_RESOLUTION_ID JOIN RIODS.REQUEST_SEVERITY RSEV ON RSEV.REQUEST_SEVERITY_ID=R.REQUEST_SEVERITY_ID JOIN RIODS.REQUEST_TYPE RT ON RT.REQUEST_TYPE_ID=R.REQUEST_TYPE_ID)
  3774. GO
  3775.  
  3776. CREATE VIEW RIDW.VW_REQUIREMENT (COMPONENT_ID, COMPONENT_NAME, CREATION_DATE, CUSTOMER_PRIORITY, DIFFICULTY, EXTERNAL_ID, NAME, PLATFORM, PRIORITY, PROJECT_ID, PROJECT_NAME, REFERENCE_ID, RELEASE_ID, RELEASE_NAME, REQUIREMENT_CLASS_ID, REQUIREMENT_CLASS_NAME, REQUIREMENT_ID, OWNER_ID, RESPONSIBLE_NAME, REQUIREMENT_STATE, REVISION_NUMBER, STABILITY, STATUS, URL, ACTUAL_ITERATION_ID,ACTUAL_ITERATION_NAME,PLANNED_ITERATION_ID,PLANNED_ITERATION_NAME,REQUIREMENT_TYPE,REVISION_DATE,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT R.COMPONENT_ID, C.NAME AS COMPONENT_NAME, R.CREATION_DATE, R.CUSTOMER_PRIORITY, R.DIFFICULTY, R.EXTERNAL_ID, R.NAME, R.PLATFORM, R.PRIORITY, R.PROJECT_ID, PJ.NAME AS PROJECT_NAME, R.REFERENCE_ID, R.RELEASE_ID, RL.NAME AS RELEASE_NAME, R.REQUIREMENT_CLASS_ID, RC.NAME AS REQUIREMENT_CLASS_NAME, R.REQUIREMENT_ID, R.OWNER_ID,P.FULL_NAME AS RESPONSIBLE_NAME, R.REQUIREMENT_STATE, R.REVISION_NUMBER, R.STABILITY, R.STATUS, R.URL, R.ACTUAL_ITERATION_ID,AC.NAME AS ACTUAL_ITERATION_NAME,R.PLANNED_ITERATION_ID,PL.NAME
  3777. AS PLANNED_ITERATION_NAME,R.REQUIREMENT_TYPE,R.REVISION_DATE,R.EXTERNAL_KEY1,R.EXTERNAL_KEY2,R.REC_DATETIME,R.ISSOFTDELETED FROM RIODS.REQUIREMENT R JOIN RIODS.COMPONENT C ON C.COMPONENT_ID =R.COMPONENT_ID JOIN RIODS.PROJECT PJ ON PJ.PROJECT_ID=R.PROJECT_ID JOIN RIODS.RELEASE RL ON RL.RELEASE_ID=R.RELEASE_ID JOIN RIODS.REQUIREMENT_CLASSIFICATION RC ON RC.REQUIREMENT_CLASS_ID=R.REQUIREMENT_CLASS_ID JOIN RIODS.RESOURCE P ON P.RESOURCE_ID=R.OWNER_ID JOIN RIODS.ITERATION AC ON AC.ITERATION_ID=R.ACTUAL_ITERATION_ID JOIN RIODS.ITERATION PL ON PL.ITERATION_ID=R.PLANNED_ITERATION_ID)
  3778. GO
  3779.  
  3780. CREATE VIEW RIDW.VW_REQUIREMENT_COLLECTION (REQUIREMENT_COLLECTION_ID, NAME,REFERENCE_ID,EXTERNAL_ID, PROJECT_ID, PROJECT_NAME, RELEASE_ID, RELEASE_NAME, PLANNED_ITERATION_ID, PLANNED_ITERATION_NAME, ACTUAL_ITERATION_ID, ACTUAL_ITERATION_NAME, STATUS, COLLECTION_ORIGIN, COLLECTION_TYPE, COLLECTION_IMPACT, COLLECTION_TARGET, CREATION_DATE, URL, EXTERNAL_KEY1, EXTERNAL_KEY2, SOURCE_ID, REC_DATETIME, ISSOFTDELETED) AS (SELECT RC.REQUIREMENT_COLLECTION_ID, RC.NAME, RC.REFERENCE_ID,RC.EXTERNAL_ID,RC.PROJECT_ID, PJ.NAME AS PROJECT_NAME, RC.RELEASE_ID, RL.NAME AS RELEASE_NAME, RC.PLANNED_ITERATION_ID, PL.NAME AS PLANNED_ITERATION_NAME, RC.ACTUAL_ITERATION_ID, AC.NAME AS ACTUAL_ITERATION_NAME, RC.STATUS, RC.COLLECTION_ORIGIN, RC.COLLECTION_TYPE, RC.COLLECTION_IMPACT, RC.COLLECTION_TARGET, RC.CREATION_DATE, RC.URL, RC.EXTERNAL_KEY1, RC.EXTERNAL_KEY2, RC.SOURCE_ID, RC.REC_DATETIME, RC.ISSOFTDELETED FROM RIODS.REQUIREMENT_COLLECTION RC JOIN RIODS.PROJECT PJ ON PJ.PROJECT_ID=RC.PROJECT_ID JOIN RIODS.RELEASE
  3781. RL ON RL.RELEASE_ID=RC.RELEASE_ID JOIN RIODS.ITERATION AC ON AC.ITERATION_ID=RC.ACTUAL_ITERATION_ID JOIN RIODS.ITERATION PL ON PL.ITERATION_ID=RC.PLANNED_ITERATION_ID)
  3782. GO
  3783.  
  3784. CREATE VIEW RIDW.VW_REQUICOL_REQUIREMENT_LOOKUP (REQUIREMENT_COLLECTION_ID, NAME, REQUIREMENT_ID, REQUIREMENT_NAME) AS ( SELECT RR.REQUIREMENT_COLLECTION_ID, RC.NAME, RR.REQUIREMENT_ID, R.NAME AS REQUIREMENT_NAME FROM RIODS.REQUICOL_REQUIREMENT_LOOKUP RR JOIN RIODS.REQUIREMENT_COLLECTION RC ON RC.REQUIREMENT_COLLECTION_ID=RR.REQUIREMENT_COLLECTION_ID JOIN RIODS.REQUIREMENT R ON R.REQUIREMENT_ID=RR.REQUIREMENT_ID)
  3785. GO
  3786.  
  3787. CREATE VIEW RIDW.VW_REQUICOL_TESTPLAN_LOOKUP (REQUIREMENT_COLLECTION_ID, REQUIREMENT_COLLECTION_NAME, TESTPLAN_ID, TESTPLAN_NAME, LINK_TYPE) AS (SELECT RT.REQUIREMENT_COLLECTION_ID, RC.NAME AS REQUIREMENT_COLLECTION_NAME, RT.TESTPLAN_ID, T.NAME AS TESTPLAN_NAME, RT.LINK_TYPE FROM RIODS.REQUICOL_TESTPLAN_LOOKUP RT JOIN RIODS.REQUIREMENT_COLLECTION RC ON RC.REQUIREMENT_COLLECTION_ID=RT.REQUIREMENT_COLLECTION_ID JOIN RIODS.TESTPLAN T ON T.TESTPLAN_ID=RT.TESTPLAN_ID)
  3788. GO
  3789.  
  3790. CREATE VIEW RIDW.VW_REQUIREMENT_CUSTOMER_LOOKUP (REQUIREMENT_ID, NAME, CUSTOMER_ID, CUSTOMER_NAME) AS ( SELECT R.REQUIREMENT_ID, R1.NAME,R.CUSTOMER_ID,C.NAME AS CUSTOMER_NAME FROM RIODS.REQUIREMENT_CUSTOMER_LOOKUP R JOIN RIODS.REQUIREMENT R1 ON R1.REQUIREMENT_ID=R.REQUIREMENT_ID JOIN RIODS.CUSTOMER C ON C.CUSTOMER_ID=R.CUSTOMER_ID)
  3791. GO
  3792.  
  3793. CREATE VIEW RIDW.VW_TASK (PRIORITY,TASK_TYPE,EXTERNAL_ID, NAME, REFERENCE_ID, TASK_ID, PROJECT_ID, PROJECT_NAME, OWNER_ID, TASK_RESPONSIBLE_NAME, TASK_STATE, URL,EXTERNAL_KEY1,EXTERNAL_KEY2,TASK_CLASS_ID,TASK_CLASS_NAME, ITERATION_ID,ITERATION_NAME,STATUS,RESOLUTION,REC_DATETIME,ISSOFTDELETED) AS ( SELECT T.PRIORITY,T.TASK_TYPE,T.EXTERNAL_ID, T.NAME, T.REFERENCE_ID, T.TASK_ID, T.PROJECT_ID, P.NAME AS PROJECT_NAME, T.OWNER_ID, PR.FULL_NAME AS TASK_RESPONSIBLE_NAME, T.TASK_STATE, T.URL,T.EXTERNAL_KEY1,T.EXTERNAL_KEY2,T.TASK_CLASS_ID,TL.NAME AS TASK_CLASS_NAME,T.ITERATION_ID,I.NAME AS ITERATION_NAME,T.STATUS,T.RESOLUTION,T.REC_DATETIME,T.ISSOFTDELETED FROM RIODS.TASK T JOIN RIODS.PROJECT P ON P.PROJECT_ID=T.PROJECT_ID JOIN RIODS.RESOURCE PR ON PR.RESOURCE_ID=T.OWNER_ID JOIN RIODS.TASK_CLASSIFICATION TL ON TL.TASK_CLASS_ID=T.TASK_CLASS_ID JOIN RIODS.ITERATION I ON I.ITERATION_ID=T.ITERATION_ID)
  3794. GO
  3795.  
  3796. CREATE VIEW RIDW.VW_TASK_BASELINE (BASELINE_ID, NAME, REFERENCE_ID, EXTERNAL_ID, TASK_ID, BASELINE_DATE, PLANNED_START, PLANNED_FINISH, PLANNED_WORK, PLANNED_COST, PLANNED_DURATION, URL, EXTERNAL_KEY1, EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT T.BASELINE_ID, T.NAME, T.REFERENCE_ID, T.EXTERNAL_ID, T.TASK_ID, T.BASELINE_DATE, T.PLANNED_START, T.PLANNED_FINISH, T.PLANNED_WORK, T.PLANNED_COST, T.PLANNED_DURATION, T.URL, T.EXTERNAL_KEY1, T.EXTERNAL_KEY2, T.REC_DATETIME, T.ISSOFTDELETED FROM RIODS.TASK_BASELINE T)
  3797. GO
  3798.  
  3799. CREATE VIEW RIDW.VW_TESTSUITELOG (BUILD_ID, TESTSUITELOG_NAME,END_DATE, EXTERNAL_ID, ITERATION_ID, ITERATION_NAME, REFERENCE_ID, START_DATE, TESTSUITELOG_ID, TESTSUITE_ID, TESTSUITE_NAME, URL, VERDICT,OWNER_ID, OWNER_NAME,TESTPLAN_ID,TESTPLAN_NAME,WEIGHT,POINTS_PASSED,POINTS_FAILED,POINTS_BLOCKED,POINTS_INCONCLUSIVE,POINTS_ATTEMPTED,POINTS_PERMFAILED,POINTS_DEFERRED,EXTERNAL_KEY1,EXTERNAL_KEY2,TESTSUITELOG_CLASS_ID,TESTSUITELOG_CLASS_NAME,TESTSUITE_EXECRECORD_ID,TESTSUITE_EXECRECORD_NAME,REC_DATETIME,ISSOFTDELETED, TESTSUITELOG_STATE,TESTSUITELOG_STATE_ID,TESTSUITELOG_STATE_EXTERNAL_ID,TESTSUITELG_STATE_REFERENCE_ID,TEST_STATUS_ID,TEST_STATUS_NAME,TEST_STATUS_EXTERNAL_ID,TEST_STATUS_REFERENCE_ID,TOTAL_TESTCASE_COUNT,NOTSTARTED_TESTCASE_COUNT) AS (SELECT S.BUILD_ID, S.NAME AS TESTSUITELOG_NAME, S.END_DATE, S.EXTERNAL_ID, S.ITERATION_ID,I.NAME AS ITERATION_NAME, S.REFERENCE_ID, S.START_DATE, S.TESTSUITELOG_ID, S.TESTSUITE_ID, T.NAME AS TESTSUITE_NAME, S.URL, S.VERDICT,S.OWNER_ID,R.FULL_NAME AS OWNER_NAME
  3800. ,S.TESTPLAN_ID,TP.NAME AS TESTPLAN_NAME,S.WEIGHT,S.POINTS_PASSED,S.POINTS_FAILED,S.POINTS_BLOCKED,S.POINTS_INCONCLUSIVE,S.POINTS_ATTEMPTED,S.POINTS_PERMFAILED,S.POINTS_DEFERRED,S.EXTERNAL_KEY1,S.EXTERNAL_KEY2,S.TESTSUITELOG_CLASS_ID,TL.NAME AS TESTSUITELOG_CLASS_NAME,S.TESTSUITE_EXECRECORD_ID,TEX.NAME AS TESTSUITE_EXECRECORD_NAME,S.REC_DATETIME,S.ISSOFTDELETED, TS.NAME AS TESTSUITELOG_STATE,S.TESTSUITELOG_STATE_ID,TS.EXTERNAL_ID AS TESTSUITELOG_STATE_EXTERNAL_ID,TS.REFERENCE_ID AS TESTSUITELG_STATE_REFERENCE_ID,TS.TEST_STATUS_ID,TU.NAME AS TEST_STATUS_NAME,TU.EXTERNAL_ID AS TEST_STATUS_EXTERNAL_ID,TU.REFERENCE_ID AS TEST_STATUS_REFERENCE_ID,S.TOTAL_TESTCASE_COUNT,S.NOTSTARTED_TESTCASE_COUNT FROM RIODS.TESTSUITELOG S JOIN RIODS.ITERATION I ON I.ITERATION_ID=S.ITERATION_ID JOIN RIODS.TESTSUITE T ON T.TESTSUITE_ID=S.TESTSUITE_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=S.OWNER_ID JOIN RIODS.TESTSUITELOG_CLASSIFICATION TL ON TL.TESTSUITELOG_CLASS_ID=S.TESTSUITELOG_CLASS_ID JOIN RIODS.TESTPLAN
  3801. TP ON TP.TESTPLAN_ID=S.TESTPLAN_ID JOIN RIODS.TESTSUITE_EXECUTION_RECORD TEX ON TEX.TESTSUITE_EXECRECORD_ID=S.TESTSUITE_EXECRECORD_ID JOIN RIODS.TESTSUITELOG_STATE TS ON TS.TESTSUITELOG_STATE_ID=S.TESTSUITELOG_STATE_ID JOIN RIODS.TEST_STATUS TU ON TU.TEST_STATUS_ID=TS.TEST_STATUS_ID)
  3802. GO
  3803.  
  3804. CREATE VIEW RIDW.VW_TESTCASE (EXTERNAL_ID,IS_BLOCKING,NAME,REFERENCE_ID,TESTCASE_ID,TESTCASE_STATE,TESTPLAN_ID,TESTPLAN_NAME,URL,OWNER_ID,OWNER_NAME,REGRESSION_TEST,WEIGHT,LAST_UPDATED, COMPONENT_ID,COMPONENT_NAME,TESTCASE_STATE_ID,TESTCASE_STATE_EXTERNAL_ID,TESTCASE_STATE_REFERENCE_ID,TEST_STATUS_ID,TEST_STATUS_NAME,TEST_STATUS_EXTERNAL_ID,TEST_STATUS_REFERENCE_ID,EXTERNAL_KEY1,EXTERNAL_KEY2, TESTCASE_CLASS_ID,TESTCASE_CLASS_NAME,TESTCASE_FOLDER,PROJECT_ID,PROJECT_NAME,TEST_PRIORITY_ID,TEST_PRIORITY_NAME,TEST_PRIORITY_EXTERNAL_ID,TEST_PRIORITY_REFERENCE_ID,ESTIMATE,CREATION_DATE,REC_DATETIME,ISSOFTDELETED) AS (SELECT T.EXTERNAL_ID,T.IS_BLOCKING,T.NAME,T.REFERENCE_ID,T.TESTCASE_ID,TS.NAME AS TESTCASE_STATE,T.TESTPLAN_ID,TP.NAME AS TESTPLAN_NAME, T.URL,T.OWNER_ID,R.FULL_NAME AS OWNER_NAME,T.REGRESSION_TEST, T.WEIGHT,T.LAST_UPDATED,T.COMPONENT_ID,C.NAME AS COMPONENT_NAME,T.TESTCASE_STATE_ID,TS.EXTERNAL_ID AS TESTCASE_STATE_EXTERNAL_ID,TS.REFERENCE_ID AS TESTCASE_STATE_REFERENCE_ID,TS.TEST_STATUS_ID,TU.NAME
  3805. AS TEST_STATUS_NAME, TU.EXTERNAL_ID AS TEST_STATUS_EXTERNAL_ID,TU.REFERENCE_ID AS TEST_STATUS_REFERENCE_ID,T.EXTERNAL_KEY1,T.EXTERNAL_KEY2,T.TESTCASE_CLASS_ID,TL.NAME AS TESTCASE_CLASS_NAME,T.TESTCASE_FOLDER,T.PROJECT_ID,P.NAME AS PROJECT_NAME, T.TEST_PRIORITY_ID,PT.NAME AS TEST_PRIORITY_NAME,PT.EXTERNAL_ID AS TEST_PRIORITY_EXTERNAL_ID,PT.REFERENCE_ID AS TEST_PRIORITY_REFERENCE_ID,T.ESTIMATE,T.CREATION_DATE,T.REC_DATETIME,T.ISSOFTDELETED FROM RIODS.TESTCASE T JOIN RIODS.TESTPLAN TP ON TP.TESTPLAN_ID=T.TESTPLAN_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=T.OWNER_ID JOIN RIODS.COMPONENT C ON C.COMPONENT_ID=T.COMPONENT_ID JOIN RIODS.PROJECT P ON P.PROJECT_ID=T.PROJECT_ID JOIN RIODS.TESTCASE_CLASSIFICATION TL ON TL.TESTCASE_CLASS_ID=T.TESTCASE_CLASS_ID JOIN RIODS.TESTCASE_STATE TS ON TS.TESTCASE_STATE_ID=T.TESTCASE_STATE_ID JOIN RIODS.TEST_STATUS TU ON TU.TEST_STATUS_ID=TS.TEST_STATUS_ID JOIN RIODS.TEST_PRIORITY PT ON PT.TEST_PRIORITY_ID=T.TEST_PRIORITY_ID)
  3806. GO
  3807.  
  3808. CREATE VIEW RIDW.VW_EXECUTION_RESULT (EXECUTION_RESULT_ID, EXECRES_CLASS_ID, EXECRES_CLASS_NAME, NAME, REFERENCE_ID, EXTERNAL_ID, VERDICT, OWNER_ID, OWNER_NAME, BUILD_ID, BUILD_NAME, ITERATION_ID, ITERATION_NAME, TESTTYPE_ID, TESTTYPE_NAME, TESCASE_ID, TESTCASE_NAME, PROJECT_ID, PROJECT_NAME, TESTSCRIPT_ID, TESTSCRIPT_NAME, START_DATE, END_DATE, POINTS_BLOCKED, POINTS_INCONCLUSIVE, MACHINE, POINTS_ATTEMPTED, POINTS_FAILED, POINTS_PASSED, POINTS_PERMFAILED, LAST_UPDATED, CREATION_DATE, SUITE_INDEX, URL, POINTS_DEFERRED, POINTS_TOTAL, EXTERNAL_KEY1, EXTERNAL_KEY2, SOURCE_ID, REC_DATETIME, ISSOFTDELETED, EXECRESULT_STATE,EXECRESULT_STATE_ID,EXECRESULT_STATE_EXTERNAL_ID,EXECRESULT_STATE_REFERENCE_ID,TEST_STATUS_ID,TEST_STATUS_NAME,TEST_STATUS_EXTERNAL_ID,TEST_STATUS_REFERENCE_ID,LAB_RESOURCE_ID,LAB_RESOURCE_NAME) AS (SELECT EX.EXECUTION_RESULT_ID, EX.EXECRES_CLASS_ID, EC.NAME AS EXECRES_CLASS_NAME, EX.NAME, EX.REFERENCE_ID, EX.EXTERNAL_ID, EX.VERDICT, EX.OWNER_ID, R.NAME AS OWNER_NAME, EX.BUILD_ID, B.NAME
  3809. AS BUILD_NAME, EX.ITERATION_ID, I.NAME AS ITERATION_NAME, EX.TESTTYPE_ID, T.NAME AS TESTTYPE_NAME, EX.TESTCASE_ID, T1.NAME AS TESTCASE_NAME, EX.PROJECT_ID, P.NAME AS PROJECT_NAME, EX.TESTSCRIPT_ID, T2.NAME AS TESTSCRIPT_NAME, EX.START_DATE, EX.END_DATE, EX.POINTS_BLOCKED, EX.POINTS_INCONCLUSIVE, EX.MACHINE, EX.POINTS_ATTEMPTED, EX.POINTS_FAILED, EX.POINTS_PASSED, EX.POINTS_PERMFAILED, EX.LAST_UPDATED, EX.CREATION_DATE, EX.SUITE_INDEX, EX.URL,EX.POINTS_DEFERRED,EX.POINTS_TOTAL,EX.EXTERNAL_KEY1, EX.EXTERNAL_KEY2, EX.SOURCE_ID, EX.REC_DATETIME, EX.ISSOFTDELETED, TS.NAME AS EXECRESULT_STATE,EX.EXECRESULT_STATE_ID,TS.EXTERNAL_ID AS EXECRESULT_STATE_EXTERNAL_ID,TS.REFERENCE_ID AS EXECRESULT_STATE_REFERENCE_ID,TS.TEST_STATUS_ID,TU.NAME AS TEST_STATUS_NAME,TU.EXTERNAL_ID AS TEST_STATUS_EXTERNAL_ID,TU.REFERENCE_ID AS TEST_STATUS_REFERENCE_ID, EX.LAB_RESOURCE_ID,L.NAME AS LAB_RESOURCE_NAME FROM RIODS.EXECUTION_RESULT EX JOIN RIODS.BUILD B ON B.BUILD_ID = EX.BUILD_ID JOIN RIODS.EXECRESULT_CLASSIFICATION
  3810. EC ON EC.EXECRES_CLASS_ID = EX.EXECRES_CLASS_ID JOIN RIODS.ITERATION I ON I.ITERATION_ID = EX.ITERATION_ID JOIN RIODS.PROJECT P ON P.PROJECT_ID = EX.PROJECT_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID = EX.OWNER_ID JOIN RIODS.TESTTYPE T ON T.TESTTYPE_ID = EX.TESTTYPE_ID JOIN RIODS.TESTCASE T1 ON T1.TESTCASE_ID = EX.TESTCASE_ID JOIN RIODS.TESTSCRIPT T2 ON T2.TESTSCRIPT_ID = EX.TESTSCRIPT_ID JOIN RIODS.EXECRESULT_STATE TS ON TS.EXECRESULT_STATE_ID=EX.EXECRESULT_STATE_ID JOIN RIODS.TEST_STATUS TU ON TU.TEST_STATUS_ID=TS.TEST_STATUS_ID JOIN RIODS.LAB_RESOURCE L ON L.LAB_RESOURCE_ID=EX.LAB_RESOURCE_ID)
  3811. GO
  3812.  
  3813. CREATE VIEW RIDW.VW_TESTPLAN (EXTERNAL_ID, NAME, REFERENCE_ID, TESTPLAN_ID, TESTPLAN_STATE,PROJECT_ID,PROJECT_NAME,CREATION_DATE,OWNER_ID,OWNER_NAME,LAST_UPDATED,URL,ASSETREGISTRY_ID,ASSETREGISTRY_NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,TESTPLAN_CLASS_ID,TESTPLAN_CLASS_NAME,REC_DATETIME,ISSOFTDELETED, TESTPLAN_STATE_ID,TESTPLAN_STATE_EXTERNAL_ID,TESTPLAN_STATE_REFERENCE_ID,TEST_STATUS_ID,TEST_STATUS_NAME,TEST_STATUS_EXTERNAL_ID,TEST_STATUS_REFERENCE_ID,TEST_PRIORITY_ID,TEST_PRIORITY_NAME,TEST_PRIORITY_EXTERNAL_ID,TEST_PRIORITY_REFERENCE_ID,ESTIMATE) AS (SELECT T.EXTERNAL_ID, T.NAME, T.REFERENCE_ID, T.TESTPLAN_ID, TS.NAME AS TESTPLAN_STATE,T.PROJECT_ID,P.NAME AS PROJECT_NAME,T.CREATION_DATE, T.OWNER_ID,R.FULL_NAME AS OWNER_NAME,T.LAST_UPDATED,T.URL,T.ASSETREGISTRY_ID,A.NAME AS ASSETREGISTRY_NAME,T.EXTERNAL_KEY1,T.EXTERNAL_KEY2,T.TESTPLAN_CLASS_ID,TL.NAME AS TESTPLAN_CLASS_NAME,T.REC_DATETIME,T.ISSOFTDELETED, T.TESTPLAN_STATE_ID,TS.EXTERNAL_ID AS TESTPLAN_STATE_EXTERNAL_ID,TS.REFERENCE_ID TESTPLAN_STATE_REFERENCE_ID,TS.TEST_STATUS_ID,TU.NAME
  3814. AS TEST_STATUS_NAME,TU.EXTERNAL_ID AS TEST_STATUS_EXTERNAL_ID,TU.REFERENCE_ID AS TEST_STATUS_REFERENCE_ID, T.TEST_PRIORITY_ID,PT.NAME AS TEST_PRIORITY_NAME,PT.EXTERNAL_ID AS TEST_PRIORITY_EXTERNAL_ID,PT.REFERENCE_ID AS TEST_PRIORITY_REFERENCE_ID,T.ESTIMATE FROM RIODS.TESTPLAN T JOIN RIODS.PROJECT P ON P.PROJECT_ID=T.PROJECT_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=T.OWNER_ID JOIN RIODS.ASSETREGISTRY A ON A.ASSETREGISTRY_ID=T.ASSETREGISTRY_ID JOIN RIODS.TESTPLAN_CLASSIFICATION TL ON TL.TESTPLAN_CLASS_ID=T.TESTPLAN_CLASS_ID JOIN RIODS.TESTPLAN_STATE TS ON TS.TESTPLAN_STATE_ID=T.TESTPLAN_STATE_ID JOIN RIODS.TEST_STATUS TU ON TU.TEST_STATUS_ID=TS.TEST_STATUS_ID JOIN RIODS.TEST_PRIORITY PT ON PT.TEST_PRIORITY_ID=T.TEST_PRIORITY_ID)
  3815. GO
  3816.  
  3817. CREATE VIEW RIDW.VW_TESTSUITE (EXTERNAL_ID,NAME,REFERENCE_ID,TESTSUITE_ID,TESTSUITE_STATE,URL,LAST_UPDATED,PROJECT_ID,PROJECT_NAME,CREATION_DATE,OWNER_ID,OWNER_NAME,CONFIGURATION_ID, CONFIGURATION_NAME,ASSETREGISTRY_ID,ASSETREGISTRY_NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,TESTSUITE_CLASS_ID,TESTSUITE_CLASS_NAME,TESTSUITE_STATE_ID,TESTSUITE_STATE_EXTERNAL_ID,TESTSUITE_STATE_REFERENCE_ID, TEST_STATUS_ID,TEST_STATUS_NAME,TEST_STATUS_EXTERNAL_ID,TEST_STATUS_REFERENCE_ID,REC_DATETIME,ISSOFTDELETED,DESCRIPTION,ISSEQUENTIAL,CREATOR_ID,CREATOR_NAME,WEIGHT, TEST_PRIORITY_ID,TEST_PRIORITY_NAME,TEST_PRIORITY_EXTERNAL_ID,TEST_PRIORITY_REFERENCE_ID,ESTIMATE) AS (SELECT T.EXTERNAL_ID,T.NAME,T.REFERENCE_ID,T.TESTSUITE_ID,TS.NAME AS TESTSUITE_STATE,T.URL,T.LAST_UPDATED,T.PROJECT_ID,P.NAME AS PROJECT_NAME,T.CREATION_DATE,T.OWNER_ID, R.FULL_NAME AS OWNER_NAME,T.CONFIGURATION_ID,C.NAME AS CONFIGURATION_NAME,T.ASSETREGISTRY_ID,A.NAME AS ASSETREGISTRY_NAME,T.EXTERNAL_KEY1,T.EXTERNAL_KEY2,T.TESTSUITE_CLASS_ID, TL.NAME AS TESTSUITE_CLASS_NAME,T.TESTSUITE_STATE_ID,TS.EXTERNAL_ID
  3818. AS TESTSUITE_STATE_EXTERNAL_ID,TS.REFERENCE_ID AS TESTSUITE_STATE_REFERENCE_ID,TS.TEST_STATUS_ID,TU.NAME AS TEST_STATUS_NAME,TU.EXTERNAL_ID AS TEST_STATUS_EXTERNAL_ID,TU.REFERENCE_ID AS TEST_STATUS_REFERENCE_ID, T.REC_DATETIME,T.ISSOFTDELETED,T.DESCRIPTION,T.ISSEQUENTIAL,T.CREATOR_ID,CT.FULL_NAME AS CREATOR_NAME,T.WEIGHT, T.TEST_PRIORITY_ID,PT.NAME AS TEST_PRIORITY_NAME,PT.EXTERNAL_ID AS TEST_PRIORITY_EXTERNAL_ID,PT.REFERENCE_ID AS TEST_PRIORITY_REFERENCE_ID,T.ESTIMATE FROM RIODS.TESTSUITE T JOIN RIODS.PROJECT P ON P.PROJECT_ID=T.PROJECT_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=T.OWNER_ID JOIN RIODS.RESOURCE CT ON CT.RESOURCE_ID=T.CREATOR_ID JOIN RIODS.CONFIGURATION C ON C.CONFIGURATION_ID =T.CONFIGURATION_ID JOIN RIODS.ASSETREGISTRY A ON A.ASSETREGISTRY_ID=T.ASSETREGISTRY_ID JOIN RIODS.TESTSUITE_CLASSIFICATION TL ON TL.TESTSUITE_CLASS_ID=T.TESTSUITE_CLASS_ID JOIN RIODS.TESTSUITE_STATE TS ON TS.TESTSUITE_STATE_ID=T.TESTSUITE_STATE_ID JOIN RIODS.TEST_STATUS
  3819. TU ON TU.TEST_STATUS_ID=TS.TEST_STATUS_ID JOIN RIODS.TEST_PRIORITY PT ON PT.TEST_PRIORITY_ID=T.TEST_PRIORITY_ID)
  3820. GO
  3821.  
  3822. CREATE VIEW RIDW.VW_EXECWORKITEM_ITER_LOOKUP (EXECWORKITEM_ID, EXECUTION_WORKITEM_NAME, ITERATION_ID, ITERATION_NAME) AS (SELECT CI.EXECWORKITEM_ID, C.NAME AS EXECUTION_WORKITEM_NAME, CI.ITERATION_ID, I.NAME AS ITERATION_NAME FROM RIODS.EXECWORKITEM_ITERATION_LOOKUP CI JOIN RIODS.EXECUTION_WORKITEM C ON C.EXECWORKITEM_ID=CI.EXECWORKITEM_ID JOIN RIODS.ITERATION I ON I.ITERATION_ID=CI.ITERATION_ID)
  3823. GO
  3824.  
  3825. CREATE VIEW RIDW.VW_EXECWORKITEM_TSTSUTE_LOOKUP (EXECWORKITEM_ID, EXECUTION_WORKITEM_NAME, TESTSUITE_ID, TESTSUITE_NAME) AS (SELECT CT.EXECWORKITEM_ID, C.NAME AS EXECUTION_WORKITEM_NAME, CT.TESTSUITE_ID, T.NAME AS TESTSUITE_NAME FROM RIODS.EXECWORKITEM_TESTSUITE_LOOKUP CT JOIN RIODS.EXECUTION_WORKITEM C ON C.EXECWORKITEM_ID=CT.EXECWORKITEM_ID JOIN RIODS.TESTSUITE T ON T.TESTSUITE_ID=CT.TESTSUITE_ID)
  3826. GO
  3827.  
  3828. CREATE VIEW RIDW.VW_REQUEST_CUSTOMER_LOOKUP (CUSTOMER_ID, CUSTOMER_NAME, REQUEST_ID, REQUEST_NAME) AS (SELECT RC.CUSTOMER_ID, C.NAME AS CUSTOMER_NAME, RC.REQUEST_ID, R.NAME AS REQUEST_NAME FROM RIODS.REQUEST_CUSTOMER_LOOKUP RC JOIN RIODS.REQUEST R ON R.REQUEST_ID=RC.REQUEST_ID JOIN RIODS.CUSTOMER C ON C.CUSTOMER_ID=RC.CUSTOMER_ID)
  3829. GO
  3830.  
  3831. CREATE VIEW RIDW.VW_REQUIR_EXECWRKITEM_LOOKUP (EXECWORKITEM_ID, EXECUTION_WORKITEM_NAME, REQUIREMENT_ID, REQUIREMENT_NAME) AS ( SELECT RC.EXECWORKITEM_ID, C.NAME AS EXECUTION_WORKITEM_NAME, RC.REQUIREMENT_ID, R.NAME AS REQUIREMENT_NAME FROM RIODS.REQUIREMENT_EXECWRKITEM_LOOKUP RC JOIN RIODS.REQUIREMENT R ON R.REQUIREMENT_ID=RC.REQUIREMENT_ID JOIN RIODS.EXECUTION_WORKITEM C ON C.EXECWORKITEM_ID=RC.EXECWORKITEM_ID)
  3832. GO
  3833.  
  3834. CREATE VIEW RIDW.VW_REQUIREMENT_REQUEST_LOOKUP (REQUEST_ID, REQUEST_NAME, REQUIREMENT_ID, REQUIREMENT_NAME, LINK_TYPE) AS ( SELECT RC.REQUEST_ID, C.NAME AS REQUEST_NAME, RC.REQUIREMENT_ID, R.NAME AS REQUIREMENT_NAME, RC.LINK_TYPE FROM RIODS.REQUIREMENT_REQUEST_LOOKUP RC JOIN RIODS.REQUIREMENT R ON R.REQUIREMENT_ID=RC.REQUIREMENT_ID JOIN RIODS.REQUEST C ON C.REQUEST_ID=RC.REQUEST_ID)
  3835. GO
  3836.  
  3837. CREATE VIEW RIDW.VW_REQUIREMENT_TESTCASE_LOOKUP (TESTCASE_ID, TESTCASE_NAME, REQUIREMENT_ID, REQUIREMENT_NAME, LINK_TYPE) AS ( SELECT RC.TESTCASE_ID, C.NAME AS TESTCASE_NAME, RC.REQUIREMENT_ID, R.NAME AS REQUIREMENT_NAME, RC.LINK_TYPE FROM RIODS.REQUIREMENT_TESTCASE_LOOKUP RC JOIN RIODS.REQUIREMENT R ON R.REQUIREMENT_ID=RC.REQUIREMENT_ID JOIN RIODS.TESTCASE C ON C.TESTCASE_ID=RC.TESTCASE_ID)
  3838. GO
  3839.  
  3840. CREATE VIEW RIDW.VW_REQUIREMENT_TESTPLAN_LOOKUP (TESTPLAN_ID, TESTPLAN_NAME, REQUIREMENT_ID, REQUIREMENT_NAME) AS ( SELECT RC.TESTPLAN_ID, C.NAME AS TESTPLAN_NAME, RC.REQUIREMENT_ID, R.NAME AS REQUIREMENT_NAME FROM RIODS.REQUIREMENT_TESTPLAN_LOOKUP RC JOIN RIODS.REQUIREMENT R ON R.REQUIREMENT_ID=RC.REQUIREMENT_ID JOIN RIODS.TESTPLAN C ON C.TESTPLAN_ID=RC.TESTPLAN_ID UNION SELECT RT.TESTPLAN_ID, T.NAME AS TESTPLAN_NAME, RRL.REQUIREMENT_ID, R.NAME AS REQUIREMENT_NAME FROM RIODS.REQUICOL_TESTPLAN_LOOKUP RT JOIN RIODS.REQUIREMENT_COLLECTION RC ON RC.REQUIREMENT_COLLECTION_ID=RT.REQUIREMENT_COLLECTION_ID JOIN RIODS.TESTPLAN T ON T.TESTPLAN_ID=RT.TESTPLAN_ID JOIN RIODS.REQUICOL_REQUIREMENT_LOOKUP RRL ON RRL.REQUIREMENT_COLLECTION_ID=RT.REQUIREMENT_COLLECTION_ID JOIN RIODS.REQUIREMENT R ON R.REQUIREMENT_ID=RRL.REQUIREMENT_ID)
  3841. GO
  3842.  
  3843. CREATE VIEW RIDW.VW_REQUIREMENT_TSTSUITE_LOOKUP (TESTSUITE_ID, TESTSUITE_NAME, REQUIREMENT_ID, REQUIREMENT_NAME) AS ( SELECT RC.TESTSUITE_ID, C.NAME AS TESTSUITE_NAME, RC.REQUIREMENT_ID, R.NAME AS REQUIREMENT_NAME FROM RIODS.REQUIREMENT_TESTSUITE_LOOKUP RC JOIN RIODS.REQUIREMENT R ON R.REQUIREMENT_ID=RC.REQUIREMENT_ID JOIN RIODS.TESTSUITE C ON C.TESTSUITE_ID=RC.TESTSUITE_ID)
  3844. GO
  3845.  
  3846. CREATE VIEW RIDW.VW_TESTCASE_ITERATION_LOOKUP (ITERATION_ID, ITERATION_NAME, TESTCASE_ID, TESTCASE_NAME) AS (SELECT RT.ITERATION_ID, I.NAME AS ITERATION_NAME, RT.TESTCASE_ID, T.NAME AS TESTCASE_NAME FROM RIODS.TESTCASE_ITERATION_LOOKUP RT JOIN RIODS.ITERATION I ON I.ITERATION_ID=RT.ITERATION_ID JOIN RIODS.TESTCASE T ON T.TESTCASE_ID=RT.TESTCASE_ID)
  3847. GO
  3848.  
  3849. CREATE VIEW RIDW.VW_EXECRES_REQUEST_LOOKUP (REQUEST_ID, REQUEST_NAME, EXECUTION_RESULT_ID, EXECUTION_RESULT_VERDICT, LINK_TYPE) AS (SELECT TR.REQUEST_ID, I.NAME AS REQUEST_NAME, TR.EXECUTION_RESULT_ID, T.VERDICT AS EXECUTION_RESULT_VERDICT, TR.LINK_TYPE FROM RIODS.EXECRES_REQUEST_LOOKUP TR JOIN RIODS.REQUEST I ON I.REQUEST_ID=TR.REQUEST_ID JOIN RIODS.EXECUTION_RESULT T ON T.EXECUTION_RESULT_ID=TR.EXECUTION_RESULT_ID)
  3850. GO
  3851.  
  3852. CREATE VIEW RIDW.VW_TESTPLAN_ITERATION_LOOKUP (ITERATION_ID, ITERATION_NAME, TESTPLAN_ID, TESTPLAN_NAME) AS (SELECT RT.ITERATION_ID, I.NAME AS ITERATION_NAME, RT.TESTPLAN_ID, T.NAME AS TESTPLAN_NAME FROM RIODS.TESTPLAN_ITERATION_LOOKUP RT JOIN RIODS.ITERATION I ON I.ITERATION_ID=RT.ITERATION_ID JOIN RIODS.TESTPLAN T ON T.TESTPLAN_ID=RT.TESTPLAN_ID)
  3853. GO
  3854.  
  3855. CREATE VIEW RIDW.VW_TESTSUITE_ITERATION_LOOKUP (ITERATION_ID, ITERATION_NAME, TESTSUITE_ID, TESTSUITE_NAME) AS (SELECT RT.ITERATION_ID, I.NAME AS ITERATION_NAME, RT.TESTSUITE_ID, T.NAME AS TESTSUITE_NAME FROM RIODS.TESTSUITE_ITERATION_LOOKUP RT JOIN RIODS.ITERATION I ON I.ITERATION_ID=RT.ITERATION_ID JOIN RIODS.TESTSUITE T ON T.TESTSUITE_ID=RT.TESTSUITE_ID)
  3856. GO
  3857.  
  3858. CREATE VIEW RIDW.VW_TESTSUITELOG_EXECRES_LOOKUP (TESTSUITELOG_ID, TESTSUITELOG_VERDICT, EXECUTION_RESULT_ID, EXECUTION_RESULT_VERDICT) AS (SELECT ST.TESTSUITELOG_ID, S.VERDICT AS TESTSUITELOG_VERDICT, ST.EXECUTION_RESULT_ID, T.VERDICT AS EXECUTION_RESULT_VERDICT FROM RIODS.TESTSUITELOG_EXECRESULT_LOOKUP ST JOIN RIODS.TESTSUITELOG S ON S.TESTSUITELOG_ID=ST.TESTSUITELOG_ID JOIN RIODS.EXECUTION_RESULT T ON T.EXECUTION_RESULT_ID=ST.EXECUTION_RESULT_ID)
  3859. GO
  3860.  
  3861. CREATE VIEW RIDW.VW_TASK_REQUEST_LOOKUP (REQUEST_ID, REQUEST_NAME, TASK_ID, TASK_NAME) AS ( SELECT TR.REQUEST_ID, R.NAME AS REQUEST_NAME, TR.TASK_ID, T.NAME AS TASK_NAME FROM RIODS.TASK_REQUEST_LOOKUP TR JOIN RIODS.REQUEST R ON R.REQUEST_ID=TR.REQUEST_ID JOIN RIODS.TASK T ON T.TASK_ID=TR.TASK_ID)
  3862. GO
  3863.  
  3864. CREATE VIEW RIDW.VW_TASK_REQUIREMENT_LOOKUP (REQUIREMENT_ID, REQUIREMENT_NAME, TASK_ID, TASK_NAME) AS ( SELECT TR.REQUIREMENT_ID, R.NAME AS REQUIREMENT_NAME, TR.TASK_ID, T.NAME AS TASK_NAME FROM RIODS.TASK_REQUIREMENT_LOOKUP TR JOIN RIODS.REQUIREMENT R ON R.REQUIREMENT_ID=TR.REQUIREMENT_ID JOIN RIODS.TASK T ON T.TASK_ID=TR.TASK_ID)
  3865. GO
  3866.  
  3867. CREATE VIEW RIDW.VW_FILE_VERSION (CREATION_DATE, FILE_CLASS_ID,EXTERNAL_ID, FILE_VERSION_ID, NAME, NUM_SLOC, REFERENCE_ID, URL, ACTIVITY_ID,ACTIVITY_NAME,AUTHOR_ID,AUTHOR_NAME,FILE_ID,FILE_NAME,FILE_STREAM_ID,FILE_STREAM_NAME,HASCOMMENT,NUM_SLOC_CHANGED,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS ( SELECT C.CREATION_DATE, C.FILE_CLASS_ID,C.EXTERNAL_ID, C.FILE_VERSION_ID, C.NAME, C.NUM_SLOC, C.REFERENCE_ID, C.URL, C.ACTIVITY_ID,A.NAME AS ACTIVITY_NAME,C.AUTHOR_ID,R.FULL_NAME AS AUTHOR_NAME,C.FILE_ID,F.NAME AS FILE_NAME,C.FILE_STREAM_ID,FS.NAME AS FILE_STREAM_NAME,C.HASCOMMENT,C.NUM_SLOC_CHANGED,C.EXTERNAL_KEY1,C.EXTERNAL_KEY2,C.REC_DATETIME,C.ISSOFTDELETED FROM RIODS.FILE_VERSION C JOIN RIODS.ACTIVITY A ON A.ACTIVITY_ID=C.ACTIVITY_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=C.AUTHOR_ID JOIN RIODS.[FILE] F ON F.FILE_ID=C.FILE_ID JOIN RIODS.FILE_STREAM FS ON FS.FILE_STREAM_ID=C.FILE_STREAM_ID)
  3868. GO
  3869.  
  3870. CREATE VIEW RIDW.VW_PROJECT_BASELINE (BASELINE_ID, EXTERNAL_ID, FILE_STREAM_ID, FILE_NAME, NAME, OWNER_ID, PROJECT_ID, REFERENCE_ID, URL, BASELINE_DATE, PLANNED_START, PLANNED_FINISH, PLANNED_WORK,BASELINE_WORK_COMPLETED, PLANNED_COST,BASELINE_COST_COMPLETED, PLANNED_DURATION, EXTERNAL_KEY1, EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT P.BASELINE_ID, P.EXTERNAL_ID, P.FILE_STREAM_ID,F.NAME AS FILE_NAME, P.NAME, P.OWNER_ID, P.PROJECT_ID, P.REFERENCE_ID, P.URL, P.BASELINE_DATE, P.PLANNED_START, P.PLANNED_FINISH, P.PLANNED_WORK,P.BASELINE_WORK_COMPLETED,P.PLANNED_COST, P.BASELINE_COST_COMPLETED,P.PLANNED_DURATION, P.EXTERNAL_KEY1,P.EXTERNAL_KEY2,P.REC_DATETIME,P.ISSOFTDELETED FROM RIODS.PROJECT_BASELINE P LEFT JOIN RIODS.FILE_STREAM F ON F.FILE_STREAM_ID=P.FILE_STREAM_ID)
  3871. GO
  3872.  
  3873. CREATE VIEW RIDW.VW_ACTIVITY_CLASSIFICATION (ACTIVITY_CLASS_ID,NAME) AS (SELECT ACTIVITY_CLASS_ID,NAME FROM RIODS.ACTIVITY_CLASSIFICATION)
  3874. GO
  3875.  
  3876. CREATE VIEW RIDW.VW_ACTIVITY_DETAIL (ACTIVITY_ID,ACTIVITY_NAME,ACTUAL_COST,ACTUAL_FINISH,ACTUAL_OVT_COST,ACTUAL_OVT_WORK,ACTUAL_START,ACTUAL_WORK,ACWP,BASELINE_COST,BASELINE_FINISH,BASELINE_START,BASELINE_WORK,BCWP,BCWS,DELAY,EAC,EXTERNAL_ID,FINISH_VARIANCE,IS_CONFIRMED,IS_OVERALLOCATED,OWNER_ID,OWNER_NAME,PLANNED_COST,PLANNED_FINISH,PLANNED_OVT_WORK,PLANNED_START,PLANNED_WORK,REFERENCE_ID,REGULAR_WORK,REMAINING_COST,REMAINING_OVT_COST,REMAINING_OVT_WORK,REMAINING_WORK,RESOURCE_TYPE,START_VARIANCE,TASK_ID,TASK_NAME,UNITS,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,PERCENT_COMPLETE,PERCENT_WORK_COMPLETE,PLANNED_DURATION,ACTUAL_DURATION) AS (SELECT A.ACTIVITY_ID,AA.NAME AS ACTIVITY_NAME,A.ACTUAL_COST,A.ACTUAL_FINISH,A.ACTUAL_OVT_COST,A.ACTUAL_OVT_WORK,A.ACTUAL_START,A.ACTUAL_WORK,A.ACWP,A.BASELINE_COST,A.BASELINE_FINISH,A.BASELINE_START,A.BASELINE_WORK,A.BCWP,A.BCWS,A.DELAY,A.EAC,AA.EXTERNAL_ID,A.FINISH_VARIANCE,A.IS_CONFIRMED,A.IS_OVERALLOCATED,AA.OWNER_ID,R.FULL_NAME AS OWNER_NAME,A.PLANNED_COST,A.PLANNED_FINISH,A.PLANNED_OVT_WORK,A.PLANNED_START,A.PLANNED_WORK,AA.REFERENCE_ID,A.REGULAR_WORK,A.REMAINING_COST,A.REMAINING_OVT_COST,A.REMAINING_OVT_WORK,A.REMAINING_WORK,A.RESOURCE_TYPE,A.START_VARIANCE,AA.TASK_ID,T.NAME
  3877. AS TASK_NAME,A.UNITS,AA.URL,AA.EXTERNAL_KEY1,AA.EXTERNAL_KEY2,A.PERCENT_COMPLETE,A.PERCENT_WORK_COMPLETE,A.PLANNED_DURATION,A.ACTUAL_DURATION FROM RIODS.ACTIVITY_DETAIL A JOIN RIODS.ACTIVITY AA ON A.ACTIVITY_ID=AA.ACTIVITY_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=AA.OWNER_ID JOIN RIODS.TASK T ON T.TASK_ID=AA.TASK_ID)
  3878. GO
  3879.  
  3880. CREATE VIEW RIDW.VW_ASSETREGISTRY (ASSETREGISTRY_ID,EXTERNAL_ID,NAME,REFERENCE_ID,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT A.ASSETREGISTRY_ID,A.EXTERNAL_ID,A.NAME,A.REFERENCE_ID,A.URL,A.EXTERNAL_KEY1,A.EXTERNAL_KEY2,A.REC_DATETIME,A.ISSOFTDELETED FROM RIODS.ASSETREGISTRY A)
  3881. GO
  3882.  
  3883. CREATE VIEW RIDW.VW_CONFIGURATION(CONFIGURATION_ID,EXTERNAL_ID,NAME,REFERENCE_ID,URL,LAST_UPDATED,OWNER_ID,OWNER_NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,CONFIGURATION_CLASS_ID,CONFIGURATION_CLASS_NAME,PROJECT_ID,PROJECT_NAME,REC_DATETIME,ISSOFTDELETED) AS (SELECT C.CONFIGURATION_ID,C.EXTERNAL_ID,C.NAME,C.REFERENCE_ID,C.URL,C.LAST_UPDATED,C.OWNER_ID,R.FULL_NAME AS OWNER_NAME,C.EXTERNAL_KEY1,C.EXTERNAL_KEY2,C.CONFIGURATION_CLASS_ID,CL.NAME AS CONFIGURATION_CLASS_NAME,C.PROJECT_ID,P.NAME AS PROJECT_NAME,C.REC_DATETIME,C.ISSOFTDELETED FROM RIODS.CONFIGURATION C JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=C.OWNER_ID JOIN RIODS.PROJECT P ON P.PROJECT_ID=C.PROJECT_ID JOIN RIODS.CONFIGURATION_CLASSIFICATION CL ON CL.CONFIGURATION_CLASS_ID=C.CONFIGURATION_CLASS_ID)
  3884. GO
  3885.  
  3886. CREATE VIEW RIDW.VW_CONFIGURATION_ATTRIBUTE(CONFIGURATION_ATTRIBUTE_ID,EXTERNAL_ID,NAME,REFERENCE_ID,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT CONFIGURATION_ATTRIBUTE_ID,EXTERNAL_ID,NAME,REFERENCE_ID,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED FROM RIODS.CONFIGURATION_ATTRIBUTE)
  3887. GO
  3888.  
  3889. CREATE VIEW RIDW.VW_CONFIGURATION_ATTR_LOOKUP(CONFIGURATION_ATTRIBUTE_ID,CONFIGURATION_ATTRIBUTE_NAME,CONFIGURATION_ID,CONFIGURATION_NAME) AS (SELECT C.CONFIGURATION_ATTRIBUTE_ID,CFA.NAME AS CONFIGURATION_ATTRIBUTE_NAME,C.CONFIGURATION_ID,CF.NAME AS CONFIGURATION_NAME FROM RIODS.CONFIGURATION_ATTRIBUTE_LOOKUP C JOIN RIODS.CONFIGURATION_ATTRIBUTE CFA ON CFA.CONFIGURATION_ATTRIBUTE_ID=C.CONFIGURATION_ATTRIBUTE_ID JOIN RIODS.CONFIGURATION CF ON CF.CONFIGURATION_ID=C.CONFIGURATION_ID)
  3890. GO
  3891.  
  3892. CREATE VIEW RIDW.VW_CONFIG_EXECUTIONRES_LOOKUP(EXECUTION_RESULT_ID,CONFIGURATION_ID,CONFIGURATION_NAME) AS (SELECT C.EXECUTION_RESULT_ID,C.CONFIGURATION_ID,CF.NAME AS CONFIGURATION_NAME FROM RIODS.CONFIG_EXECUTIONRES_LOOKUP C JOIN RIODS.CONFIGURATION CF ON CF.CONFIGURATION_ID=C.CONFIGURATION_ID)
  3893. GO
  3894.  
  3895. CREATE VIEW RIDW.VW_EXECUTION_WORKITEM (EXECWORKITEM_ID,CONFIGURATION_ID,CONFIGURATION_NAME,EXECUTION_WORKITEM_STATE,EXTERNAL_ID,NAME,OWNER_ID,OWNER_NAME,PROJECT_ID,PROJECT_NAME,REFERENCE_ID,TESTCASE_ID,TESTCASE_NAME,TESTTYPE_ID,TESTTYPE_NAME,URL,TESTPLAN_ID,TESTPLAN_NAME,FREQUENCY,REGRESSION,WEIGHT,LAST_UPDATED,CURRENT_RESULT_ID,CURRENT_RESULT_NAME,CURRENT_RESULT_VERDICT,TAGS,EXTERNAL_KEY1,EXTERNAL_KEY2,EXECWORKIT_CLASS_ID,EXECWORKIT_CLASS_NAME,CREATION_DATE,TESTSCRIPT_ID,TESTSCRIPT_NAME, TEST_PRIORITY_ID,PRIORITY,TEST_PRIORITY_EXTERNAL_ID,TEST_PRIORITY_REFERENCE_ID,ESTIMATE,TIMESPENT,REC_DATETIME,ISSOFTDELETED) AS (SELECT C.EXECWORKITEM_ID,C.CONFIGURATION_ID,CF.NAME AS CONFIGURATION_NAME,C.EXECUTION_WORKITEM_STATE,C.EXTERNAL_ID,C.NAME,C.OWNER_ID,R.FULL_NAME AS OWNER_NAME,C.PROJECT_ID,P.NAME AS PROJECT_NAME,C.REFERENCE_ID,C.TESTCASE_ID,T.NAME AS TESTCASE_NAME,C.TESTTYPE_ID,TT.NAME AS TESTTYPE_NAME, C.URL,C.TESTPLAN_ID,TP.NAME AS TESTPLAN_NAME,C.FREQUENCY,C.REGRESSION,C.WEIGHT,C.LAST_UPDATED,C.CURRENT_RESULT_ID,ER.NAME
  3896. AS CURRENT_RESULT_NAME,ER.VERDICT AS CURRENT_RESULT_VERDICT,C.TAGS,C.EXTERNAL_KEY1,C.EXTERNAL_KEY2,C.EXECWORKIT_CLASS_ID,EL.NAME AS EXECWORKIT_CLASS_NAME,C.CREATION_DATE,C.TESTSCRIPT_ID,TS.NAME AS TESTSCRIPT_NAME, C.TEST_PRIORITY_ID,PT.NAME AS PRIORITY,PT.EXTERNAL_ID AS TEST_PRIORITY_EXTERNAL_ID,PT.REFERENCE_ID AS TEST_PRIORITY_REFERENCE_ID,C.ESTIMATE,C.TIMESPENT,C.REC_DATETIME,C.ISSOFTDELETED FROM RIODS.EXECUTION_WORKITEM C JOIN RIODS.CONFIGURATION CF ON CF.CONFIGURATION_ID=C.CONFIGURATION_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=C.OWNER_ID JOIN RIODS.PROJECT P ON P.PROJECT_ID=C.PROJECT_ID JOIN RIODS.TESTCASE T ON T.TESTCASE_ID=C.TESTCASE_ID JOIN RIODS.TESTTYPE TT ON TT.TESTTYPE_ID=C.TESTTYPE_ID JOIN RIODS.TESTPLAN TP ON TP.TESTPLAN_ID=C.TESTPLAN_ID JOIN RIODS.TESTSCRIPT TS ON TS.TESTSCRIPT_ID=C.TESTSCRIPT_ID JOIN RIODS.EXECUTION_RESULT ER ON ER.EXECUTION_RESULT_ID=C.CURRENT_RESULT_ID JOIN RIODS.EXECWORKITEM_CLASSIFICATION EL ON EL.EXECWORKIT_CLASS_ID=C.EXECWORKIT_CLASS_ID
  3897. JOIN RIODS.TEST_PRIORITY PT ON PT.TEST_PRIORITY_ID=C.TEST_PRIORITY_ID)
  3898. GO
  3899.  
  3900. CREATE VIEW RIDW.VW_POOL (EXTERNAL_ID,NAME,POOL_ID,POOL_TYPE,PARENT_POOL_ID, PARENT_POOL_NAME,REFERENCE_ID,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT P.EXTERNAL_ID,P.NAME,P.POOL_ID,P.POOL_TYPE,P.PARENT_POOL_ID, PP.NAME AS PARENT_POOL_NAME,P.REFERENCE_ID,P.URL,P.EXTERNAL_KEY1,P.EXTERNAL_KEY2,P.REC_DATETIME,P.ISSOFTDELETED FROM RIODS.POOL P JOIN RIODS.POOL PP ON PP.POOL_ID=P.PARENT_POOL_ID)
  3901. GO
  3902.  
  3903. CREATE VIEW RIDW.VW_PROJ_BASELN_BASELN_LOOKUP(BASELINE_ID,BASELINE_NAME,COMPBASELINE_ID,COMPBASELINE_NAME) AS (SELECT BL.BASELINE_ID,B.NAME,BL.COMPBASELINE_ID, C.NAME FROM RIODS.PROJ_BASELINE_BASELINE_LOOKUP BL JOIN RIODS.PROJECT_BASELINE B ON B.BASELINE_ID=BL.BASELINE_ID JOIN RIODS.PROJECT_BASELINE C ON C.BASELINE_ID=BL.COMPBASELINE_ID)
  3904. GO
  3905.  
  3906. CREATE VIEW RIDW.VW_PROJECT_CLASSIFICATION (NAME,PROJECT_CLASS_ID) AS (SELECT NAME,PROJECT_CLASS_ID FROM RIODS.PROJECT_CLASSIFICATION)
  3907. GO
  3908.  
  3909. CREATE VIEW RIDW.VW_PROJECT_COMPONENT_LOOKUP(COMPONENT_ID,COMPONENT_NAME,PROJECT_ID,PROJECT_NAME) AS (SELECT CP.COMPONENT_ID,C.NAME AS COMPONENT_NAME,CP.PROJECT_ID,P.NAME AS PROJECT_NAME FROM RIODS.PROJECT_COMPONENT_LOOKUP CP JOIN RIODS.COMPONENT C ON C.COMPONENT_ID=CP.COMPONENT_ID JOIN RIODS.PROJECT P ON P.PROJECT_ID=CP.PROJECT_ID)
  3910. GO
  3911.  
  3912. CREATE VIEW RIDW.VW_PROJECT_HIERARCHY(CHILD_PROJECT_ID,CHILD_PROJECT_NAME,PARENT_PROJECT_ID,PARENT_PROJECT_NAME) AS (SELECT BL.CHILD_PROJECT_ID,B.NAME,BL.PARENT_PROJECT_ID, C.NAME FROM RIODS.PROJECT_HIERARCHY BL JOIN RIODS.PROJECT B ON B.PROJECT_ID=BL.CHILD_PROJECT_ID JOIN RIODS.PROJECT C ON C.PROJECT_ID=BL.PARENT_PROJECT_ID)
  3913. GO
  3914.  
  3915. CREATE VIEW RIDW.VW_PROJECT_WRKCONFIG_HIERARCHY(PARENT_WKCFG_ID,PARENT_WKCFG_NAME,CHILD_WKCFG_ID,CHILD_WKCFG_NAME) AS (SELECT BL.PARENT_WKCFG_ID,B.NAME,BL.CHILD_WKCFG_ID, C.NAME FROM RIODS.PROJECT_WORKCONFIG_HIERARCHY BL JOIN RIODS.PROJECT_WORKCONFIGURATION B ON B.PROJECT_WKCFG_ID=BL.PARENT_WKCFG_ID JOIN RIODS.PROJECT_WORKCONFIGURATION C ON C.PROJECT_WKCFG_ID=BL.CHILD_WKCFG_ID)
  3916. GO
  3917.  
  3918. CREATE VIEW RIDW.VW_PROJECT_ROLE_MEMBER_LOOKUP(PROJECT_ROLE_ID,PROJECT_NAME,RESOURCE_ID,FULL_NAME) AS (SELECT PR.PROJECT_ROLE_ID,P.NAME,PR.RESOURCE_ID,R.FULL_NAME FROM RIODS.PROJECT_ROLE_MEMBER_LOOKUP PR JOIN RIODS.PROJECT_ROLE P ON P.PROJECT_ROLE_ID=PR.PROJECT_ROLE_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=PR.RESOURCE_ID)
  3919. GO
  3920.  
  3921. CREATE VIEW RIDW.VW_REQUEST_CLASSIFICATION (NAME,REQUEST_CLASS_ID) AS (SELECT NAME,REQUEST_CLASS_ID FROM RIODS.REQUEST_CLASSIFICATION)
  3922. GO
  3923.  
  3924. CREATE VIEW RIDW.VW_COMPONENT_CLASSIFICATION (NAME,COMPONENT_CLASS_ID) AS (SELECT NAME,COMPONENT_CLASS_ID FROM RIODS.COMPONENT_CLASSIFICATION)
  3925. GO
  3926.  
  3927. CREATE VIEW RIDW.VW_REQUEST_HIERARCHY (CHILD_REQUEST_ID,CHILD_REQUEST_NAME,PARENT_REQUEST_ID,PARENT_REQUEST_NAME) AS (SELECT RC.CHILD_REQUEST_ID,C.NAME AS CHILD_REQUEST_NAME,RC.PARENT_REQUEST_ID,P.NAME AS PARENT_REQUEST_NAME FROM RIODS.REQUEST_HIERARCHY RC JOIN RIODS.REQUEST C ON C.REQUEST_ID=RC.CHILD_REQUEST_ID JOIN RIODS.REQUEST P ON P.REQUEST_ID=RC.PARENT_REQUEST_ID)
  3928. GO
  3929.  
  3930. CREATE VIEW RIDW.VW_REQUIREMENT_HIERARCHY (PRED_REQUIREMENT_ID,PRED_REQUIREMENT_NAME,SUCC_REQUIREMENT_ID,SUCC_REQUIREMENT_NAME,LINK_TYPE_ID,LINK_TYPE) AS (SELECT RC.PRED_REQUIREMENT_ID,C.NAME AS PRED_REQUIREMENT_NAME,RC.SUCC_REQUIREMENT_ID,P.NAME AS SUCC_REQUIREMENT_NAME,RC.LINK_TYPE_ID, CASE WHEN RC.LINK_TYPE_ID=-1 AND RC.LINK_TYPE IS NOT NULL THEN RC.LINK_TYPE ELSE LT.NAME END FROM RIODS.REQUIREMENT_HIERARCHY RC JOIN RIODS.REQUIREMENT C ON C.REQUIREMENT_ID=RC.PRED_REQUIREMENT_ID JOIN RIODS.REQUIREMENT P ON P.REQUIREMENT_ID=RC.SUCC_REQUIREMENT_ID JOIN RIODS.REQUIREMENT_LINK_TYPE LT ON LT.LINK_TYPE_ID=RC.LINK_TYPE_ID)
  3931. GO
  3932.  
  3933. CREATE VIEW RIDW.VW_REQUIRE_REQUIRE_LOOKUP (CREQUIREMENT_ID,CREQUIREMENT_NAME,REQUIREMENT_ID,REQUIREMENT_NAME) AS (SELECT RR.CREQUIREMENT_ID,C.NAME AS CREQUIREMENT_NAME,RR.REQUIREMENT_ID,R.NAME AS REQUIREMENT_NAME FROM RIODS.REQUIREMENT_REQUIREMENT_LOOKUP RR JOIN RIODS.REQUIREMENT C ON C.REQUIREMENT_ID=RR.CREQUIREMENT_ID JOIN RIODS.REQUIREMENT R ON R.REQUIREMENT_ID=RR.REQUIREMENT_ID)
  3934. GO
  3935.  
  3936. CREATE VIEW RIDW.VW_REQUIREMENT_CLASSIFICATION (NAME,REQUIREMENT_CLASS_ID) AS (SELECT NAME,REQUIREMENT_CLASS_ID FROM RIODS.REQUIREMENT_CLASSIFICATION)
  3937. GO
  3938.  
  3939. CREATE VIEW RIDW.VW_TASK_CLASSIFICATION (NAME,TASK_CLASS_ID) AS (SELECT NAME,TASK_CLASS_ID FROM RIODS.TASK_CLASSIFICATION)
  3940. GO
  3941.  
  3942. CREATE VIEW RIDW.VW_REQUEST_STATE_HISTORY(CHANGE_DATE,DAYS_IN_STATE,REQUEST_ID,REQUEST_NAME,PREV_REQUEST_STATE_ID,PREV_REQUEST_STATE,REQUEST_STATE_ID,REQUEST_STATE,PREV_REQUEST_STATUS_ID,PREV_REQUEST_STATUS,REQUEST_STATUS_ID,REQUEST_STATUS,REQUEST_STATE_HISTORY_ID,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT H.CHANGE_DATE,DAYS_IN_STATE, H.REQUEST_ID,R.NAME AS REQUEST_NAME, H.PREV_REQUEST_STATE_ID,PRST.NAME AS PREV_REQUEST_STATE, H.REQUEST_STATE_ID, RST.NAME AS REQUEST_STATE, H.PREV_REQUEST_STATUS_ID,PRSTU.NAME AS PREV_REQUEST_STATUS, H.REQUEST_STATUS_ID, RSTU.NAME AS REQUEST_STATUS, H.REQUEST_STATE_HISTORY_ID,H.EXTERNAL_KEY1,H.EXTERNAL_KEY2,H.REC_DATETIME,H.ISSOFTDELETED FROM RIODS.REQUEST_STATE_HISTORY H JOIN RIODS.REQUEST R ON R.REQUEST_ID=H.REQUEST_ID JOIN RIODS.REQUEST_STATE PRST ON PRST.REQUEST_STATE_ID=H.PREV_REQUEST_STATE_ID JOIN RIODS.REQUEST_STATE RST ON RST.REQUEST_STATE_ID=H.REQUEST_STATE_ID JOIN RIODS.REQUEST_STATUS PRSTU ON PRSTU.REQUEST_STATUS_ID=H.PREV_REQUEST_STATUS_ID
  3943. JOIN RIODS.REQUEST_STATUS RSTU ON RSTU.REQUEST_STATUS_ID=H.REQUEST_STATUS_ID)
  3944. GO
  3945.  
  3946. CREATE VIEW RIDW.VW_REQUIREMENT_REVISION_HIST(CHANGE_DATE,REQUIREMENT_ID,REQUIREMENT_NAME,REQUIREMENT_REVISION_ID,RESOURCE_ID,FULL_NAME,REVISION_NUMBER,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT H.CHANGE_DATE,H.REQUIREMENT_ID,RE.NAME AS REQUIREMENT_NAME,H.REQUIREMENT_REVISION_ID,H.RESOURCE_ID,R.FULL_NAME,H.REVISION_NUMBER,H.EXTERNAL_KEY1,H.EXTERNAL_KEY2,H.REC_DATETIME,H.ISSOFTDELETED FROM RIODS.REQUIREMENT_REVISION_HISTORY H JOIN RIODS.REQUIREMENT RE ON RE.REQUIREMENT_ID=H.REQUIREMENT_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=H.RESOURCE_ID)
  3947. GO
  3948.  
  3949. CREATE VIEW RIDW.VW_TASK_CATEGORY (CATEGORY_TYPE,NAME,OWNER_ID,FULL_NAME,REFERENCE_ID,TASK_CATEGORY_ID,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT T.CATEGORY_TYPE,T.NAME,T.OWNER_ID,R.FULL_NAME,T.REFERENCE_ID,T.TASK_CATEGORY_ID,T.URL,T.EXTERNAL_KEY1,T.EXTERNAL_KEY2,T.REC_DATETIME,T.ISSOFTDELETED FROM RIODS.TASK_CATEGORY T JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=T.OWNER_ID)
  3950. GO
  3951.  
  3952. CREATE VIEW RIDW.VW_TESTTYPE (NAME,REFERENCE_ID,TESTTYPE_ID,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT NAME,REFERENCE_ID,TESTTYPE_ID,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED FROM RIODS.TESTTYPE)
  3953. GO
  3954.  
  3955. CREATE VIEW RIDW.VW_FILE_BASELINE_ACT_LOOKUP (FILE_BASELINE_ID,FILE_BASELINE_NAME,ACTIVITY_ID,ACTIVITY_NAME) AS (SELECT FB.FILE_BASELINE_ID,F.NAME AS FILE_BASELINE_NAME,FB.ACTIVITY_ID,A.NAME AS ACTIVITY_NAME FROM RIODS.FILE_BASELINE_ACTIVITY_LOOKUP FB JOIN RIODS.FILE_BASELINE F ON F.FILE_BASELINE_ID=FB.FILE_BASELINE_ID JOIN RIODS.ACTIVITY A ON A.ACTIVITY_ID=FB.ACTIVITY_ID)
  3956. GO
  3957.  
  3958. CREATE VIEW RIDW.VW_TEST_CATEGORY (TEST_CATEGORY_ID,NAME,REFERENCE_ID,EXTERNAL_ID,TERM,VALUE,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,REC_DATETIME,ISSOFTDELETED) AS (SELECT TEST_CATEGORY_ID,NAME,REFERENCE_ID,EXTERNAL_ID,TERM,VALUE,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,REC_DATETIME,ISSOFTDELETED FROM RIODS.TEST_CATEGORY)
  3959. GO
  3960.  
  3961. CREATE VIEW RIDW.VW_EXECRES_EXECWKITEM_LOOKUP (EXECUTION_RESULT_ID,EXECUTION_RESULT_NAME, EXECWORKITEM_ID,EXECWORKITEM_NAME) AS (SELECT ERL.EXECUTION_RESULT_ID,ER.NAME AS EXECUTION_RESULT_NAME, ERL.EXECWORKITEM_ID,EW.NAME AS EXECWORKITEM_NAME FROM RIODS.EXECRES_EXECWKITEM_LOOKUP ERL JOIN RIODS.EXECUTION_RESULT ER ON ER.EXECUTION_RESULT_ID=ERL.EXECUTION_RESULT_ID JOIN RIODS.EXECUTION_WORKITEM EW ON EW.EXECWORKITEM_ID=ERL.EXECWORKITEM_ID)
  3962. GO
  3963.  
  3964. CREATE VIEW RIDW.VW_CONFIG_EXECWORKITM_LOOKUP (CONFIGURATION_ID,CONFIGURATION_NAME,EXECWORKITEM_ID,EXECWORKITEM_NAME) AS (SELECT CEL.CONFIGURATION_ID,C.NAME AS CONFIGURATION_NAME,CEL.EXECWORKITEM_ID,E.NAME AS EXECWORKITEM_NAME FROM RIODS.CONFIG_EXECUTIONWORKITM_LOOKUP CEL JOIN RIODS.CONFIGURATION C ON C.CONFIGURATION_ID=CEL.CONFIGURATION_ID JOIN RIODS.EXECUTION_WORKITEM E ON E.EXECWORKITEM_ID=CEL.EXECWORKITEM_ID)
  3965. GO
  3966.  
  3967. CREATE VIEW RIDW.VW_TESTPLAN_CATEGORY_LOOKUP (TESPLAN_ID,TESTPLAN_NAME,TEST_CATEGORY_ID, TEST_CATEGORY_NAME) AS (SELECT TCL.TESTPLAN_ID,T.NAME AS TESTPLAN_NAME,TCL.TEST_CATEGORY_ID,C.NAME AS TEST_CATEGORY_NAME FROM RIODS.TESTPLAN_CATEGORY_LOOKUP TCL JOIN RIODS.TESTPLAN T ON T.TESTPLAN_ID=TCL.TESTPLAN_ID JOIN RIODS.TEST_CATEGORY C ON C.TEST_CATEGORY_ID=TCL.TEST_CATEGORY_ID)
  3968. GO
  3969.  
  3970. CREATE VIEW RIDW.VW_TESTCASE_CATEGORY_LOOKUP (TESTCASE_ID,TESTCASE_NAME,TEST_CATEGORY_ID, TEST_CATEGORY_NAME) AS (SELECT TCL.TESTCASE_ID,T.NAME AS TESTCASE_NAME,TCL.TEST_CATEGORY_ID,C.NAME AS TEST_CATEGORY_NAME FROM RIODS.TESTCASE_CATEGORY_LOOKUP TCL JOIN RIODS.TESTCASE T ON T.TESTCASE_ID=TCL.TESTCASE_ID JOIN RIODS.TEST_CATEGORY C ON C.TEST_CATEGORY_ID=TCL.TEST_CATEGORY_ID)
  3971. GO
  3972.  
  3973. CREATE VIEW RIDW.VW_TESTSUITE_TESTCASE_LOOKUP (TESTCASE_ID,TESTCASE_NAME,TESTSUITE_ID, TESTSUITE_NAME) AS (SELECT TCL.TESTCASE_ID,T.NAME AS TESTCASE_NAME,TCL.TESTSUITE_ID,C.NAME AS TESTSUITE_NAME FROM RIODS.TESTSUITE_TESTCASE_LOOKUP TCL JOIN RIODS.TESTCASE T ON T.TESTCASE_ID=TCL.TESTCASE_ID JOIN RIODS.TESTSUITE C ON C.TESTSUITE_ID=TCL.TESTSUITE_ID)
  3974. GO
  3975.  
  3976. CREATE VIEW RIDW.VW_TESTSUITE_TSUITELOG_LOOKUP (TESTSUITELOG_ID,TESTSUITELOG_NAME,TESTSUITE_ID, TESTSUITE_NAME) AS (SELECT TCL.TESTSUITELOG_ID,T.NAME AS TESTSUITELOG_NAME,TCL.TESTSUITE_ID,C.NAME AS TESTSUITE_NAME FROM RIODS.TESTSUITE_TESTSUITELOG_LOOKUP TCL JOIN RIODS.TESTSUITELOG T ON T.TESTSUITELOG_ID=TCL.TESTSUITELOG_ID JOIN RIODS.TESTSUITE C ON C.TESTSUITE_ID=TCL.TESTSUITE_ID)
  3977. GO
  3978.  
  3979. CREATE VIEW RIDW.VW_TESTPLAN_TESTPLAN_HIERARCHY (PARENT_TESTPLAN_ID,PARENT_TESTPLAN_NAME,CHILD_TESTPLAN_ID,CHILD_TESTPLAN_NAME) AS (SELECT H.PARENT_TESTPLAN_ID,P.NAME AS PARENT_TESTPLAN_NAME, H.CHILD_TESTPLAN_ID,C.NAME AS CHILD_TESTPLAN_NAME FROM RIODS.TESTPLAN_TESTPLAN_HIERARCHY H JOIN RIODS.TESTPLAN P ON P.TESTPLAN_ID=H.PARENT_TESTPLAN_ID JOIN RIODS.TESTPLAN C ON C.TESTPLAN_ID=H.CHILD_TESTPLAN_ID)
  3980. GO
  3981.  
  3982. CREATE VIEW RIDW.VW_TESTPLAN_TESTCASE_LOOKUP (TESTPLAN_ID, TESTPLAN_NAME,TESTCASE_ID, TESTCASE_NAME) AS (SELECT TT.TESTPLAN_ID,TP.NAME AS TESTPLAN_NAME,TT.TESTCASE_ID,TL.NAME AS TESTCASE_NAME FROM RIODS.TESTPLAN_TESTCASE_LOOKUP TT JOIN RIODS.TESTPLAN TP ON TP.TESTPLAN_ID=TT.TESTPLAN_ID JOIN RIODS.TESTCASE TL ON TL.TESTCASE_ID=TT.TESTCASE_ID)
  3983. GO
  3984.  
  3985. CREATE VIEW RIDW.VW_LAB_RESOURCE (LAB_RESOURCE_ID,NAME,SOFTWARE,REFERENCE_ID,LAB_RESOURCE_TYPE,LAB_RESOURCE_NAME,MEMORY, IP_ADDRESS,PRIMARY_MAC_ADDRESS,ADMINISTRATIVE_STATUS,OPERATIONAL_STATUS,HOSTNAME,FULLY_QUALIFIED_DOMAIN_NAME, OS_TYPE,OS_LOCALE,OS_KERNEL_WIDTH,CPU_SPEED,CPU_ARCHITECTURE,CPU_ARCHITECTURE_WIDTH,CPU_MANUFACTURER,CPU_TYPE, DISK_SPACE,RESOURCE_GROUP_ID,RESOURCE_GROUP_NAME,PROJECT_ID, PROJECT_NAME,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT L.LAB_RESOURCE_ID,L.NAME,L.SOFTWARE,L.REFERENCE_ID,L.LAB_RESOURCE_TYPE,L.LAB_RESOURCE_NAME,L.MEMORY, L.IP_ADDRESS,L.PRIMARY_MAC_ADDRESS,L.ADMINISTRATIVE_STATUS,L.OPERATIONAL_STATUS,L.HOSTNAME,L.FULLY_QUALIFIED_DOMAIN_NAME, L.OS_TYPE,L.OS_LOCALE,L.OS_KERNEL_WIDTH,L.CPU_SPEED,L.CPU_ARCHITECTURE,L.CPU_ARCHITECTURE_WIDTH,L.CPU_MANUFACTURER,L.CPU_TYPE, L.DISK_SPACE,L.RESOURCE_GROUP_ID,R.NAME AS RESOURCE_GROUP_NAME,L.PROJECT_ID, P.NAME AS PROJECT_NAME,L.URL,L.EXTERNAL_KEY1,L.EXTERNAL_KEY2,L.REC_DATETIME,L.ISSOFTDELETED FROM RIODS.LAB_RESOURCE
  3986. L JOIN RIODS.PROJECT P ON P.PROJECT_ID=L.PROJECT_ID JOIN RIODS.RESOURCE_GROUP R ON R.RESOURCE_GROUP_ID=L.RESOURCE_GROUP_ID)
  3987. GO
  3988.  
  3989. CREATE VIEW RIDW.VW_RESOURCE_GROUP (RESOURCE_GROUP_ID,NAME,REFERENCE_ID,EXTERNAL_ID,IS_EXPIREABLE,START_DATE,EXPIRATION_DATE,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,PROJECT_ID,PROJECT_NAME,REC_DATETIME,ISSOFTDELETED) AS (SELECT R.RESOURCE_GROUP_ID,R.NAME,R.REFERENCE_ID,R.EXTERNAL_ID,R.IS_EXPIREABLE,R.START_DATE,R.EXPIRATION_DATE,R.URL,R.EXTERNAL_KEY1,R.EXTERNAL_KEY2,R.PROJECT_ID,P.NAME AS PROJECT_NAME,R.REC_DATETIME,R.ISSOFTDELETED FROM RIODS.RESOURCE_GROUP R JOIN RIODS.PROJECT P ON P.PROJECT_ID=R.PROJECT_ID)
  3990. GO
  3991.  
  3992. CREATE VIEW RIDW.VW_RESERVATION (RESERVATION_ID,NAME,REFERENCE_ID,RESERVED_FOR,RESERVED_BY,RESERVE_TO, RESERVE_FROM,LAB_RESOURCE_ID,LAB_RESOURCE_NAME,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,PROJECT_ID,PROJECT_NAME,REC_DATETIME,ISSOFTDELETED) AS (SELECT R.RESERVATION_ID,R.NAME,R.REFERENCE_ID,R.RESERVED_FOR,R.RESERVED_BY,R.RESERVE_TO, R.RESERVE_FROM,R.LAB_RESOURCE_ID,L.LAB_RESOURCE_NAME,R.URL,R.EXTERNAL_KEY1,R.EXTERNAL_KEY2,R.PROJECT_ID,P.NAME AS PROJECT_NAME,R.REC_DATETIME,R.ISSOFTDELETED FROM RIODS.RESERVATION R JOIN RIODS.LAB_RESOURCE L ON L.LAB_RESOURCE_ID=R.LAB_RESOURCE_ID JOIN RIODS.PROJECT P ON P.PROJECT_ID=R.PROJECT_ID)
  3993. GO
  3994.  
  3995. CREATE VIEW RIDW.VWCONFIGURATION_CLASSIFICATION(CONFIGURATION_CLASS_ID,NAME) AS (SELECT CONFIGURATION_CLASS_ID,NAME FROM RIODS.CONFIGURATION_CLASSIFICATION)
  3996. GO
  3997.  
  3998. CREATE VIEW RIDW.VW_EXECRESULT_CLASSIFICATION (EXECRES_CLASS_ID,NAME) AS (SELECT EXECRES_CLASS_ID,NAME FROM RIODS.EXECRESULT_CLASSIFICATION)
  3999. GO
  4000.  
  4001. CREATE VIEW RIDW.VW_EXECWORKITEM_CLASSIFICATION (EXECWORKIT_CLASS_ID,NAME) AS (SELECT EXECWORKIT_CLASS_ID,NAME FROM RIODS.EXECWORKITEM_CLASSIFICATION)
  4002. GO
  4003.  
  4004. CREATE VIEW RIDW.VW_TESTCASE_CLASSIFICATION (TESTCASE_CLASS_ID,NAME) AS (SELECT TESTCASE_CLASS_ID,NAME FROM RIODS.TESTCASE_CLASSIFICATION)
  4005. GO
  4006.  
  4007. CREATE VIEW RIDW.VW_TESTPLAN_CLASSIFICATION (TESTPLAN_CLASS_ID,NAME) AS (SELECT TESTPLAN_CLASS_ID,NAME FROM RIODS.TESTPLAN_CLASSIFICATION)
  4008. GO
  4009.  
  4010. CREATE VIEW RIDW.VW_TESTSUITE_CLASSIFICATION (TESTSUITE_CLASS_ID,NAME) AS (SELECT TESTSUITE_CLASS_ID,NAME FROM RIODS.TESTSUITE_CLASSIFICATION)
  4011. GO
  4012.  
  4013. CREATE VIEW RIDW.VW_TESTSUITELOG_CLASSIFICATION (TESTSUITELOG_CLASS_ID,NAME) AS (SELECT TESTSUITELOG_CLASS_ID,NAME FROM RIODS.TESTSUITELOG_CLASSIFICATION)
  4014. GO
  4015.  
  4016. CREATE VIEW RIDW.VW_REQUEST_CATEGORY (REQUEST_CATEGORY_ID, EXTERNAL_ID, REFERENCE_ID, NAME, PROJECT_ID,PROJECT_NAME,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT RC.REQUEST_CATEGORY_ID, RC.EXTERNAL_ID, RC.REFERENCE_ID, RC.NAME, RC.PROJECT_ID,P.NAME AS PROJECT_NAME,RC.URL,RC.EXTERNAL_KEY1,RC.EXTERNAL_KEY2,RC.REC_DATETIME,RC.ISSOFTDELETED FROM RIODS.REQUEST_CATEGORY RC JOIN RIODS.PROJECT P ON P.PROJECT_ID=RC.PROJECT_ID)
  4017. GO
  4018.  
  4019. CREATE VIEW RIDW.VW_FILE_CLASSIFICATION (FILE_CLASS_ID,NAME) AS (SELECT FILE_CLASS_ID,NAME FROM RIODS.FILE_CLASSIFICATION)
  4020. GO
  4021.  
  4022. CREATE VIEW RIDW.VW_FILE_STREAM_CLASSIFICATION (FILE_STREAM_CLASS_ID,NAME) AS (SELECT FILE_STREAM_CLASS_ID,NAME FROM RIODS.FILE_STREAM_CLASSIFICATION)
  4023. GO
  4024.  
  4025. CREATE VIEW RIDW.VW_BUILD_CLASSIFICATION (BUILD_CLASS_ID,NAME) AS (SELECT BUILD_CLASS_ID,NAME FROM RIODS.BUILD_CLASSIFICATION)
  4026. GO
  4027.  
  4028. CREATE VIEW RIDW.VW_REQUEST_CHANGE_HISTORY (REQCHANGE_HISTORY_ID,REQUEST_CLASS_ID, REQUEST_CLASS_NAME,REQUEST_ID,NAME,PREV_TEAM_ID, TEAM_NAME, PREV_REQUEST_CATEGORY_ID, PREV_REQUEST_CATEGORY_NAME,PREV_ITERATION_ID, PREV_ITERATION_NAME,PREV_OWNER_ID,PREV_OWNER_NAME, CHANGE_DATE,PREV_REQUEST_TYPE_ID,PREV_REQUEST_TYPE,PREV_REQUEST_STATE_ID,PREV_REQUEST_STATE,PREV_REQUEST_STATUS_ID,PREV_REQUEST_STATUS,PREV_REQUEST_PRIORITY_ID,PREV_REQUEST_PRIORITY,PREV_REQUEST_SEVERITY_ID,PREV_REQUEST_SEVERITY,PREV_COMMENT_COUNT,PREV_SUBSCRIBER_COUNT, PREV_TAGS,PREV_PLANNED_WORK,PREV_ACTUAL_WORK,PREV_STORY_POINTS,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,PREV_SUMMARY,REC_DATETIME,ISSOFTDELETED) AS (SELECT H.REQCHANGE_HISTORY_ID,H.REQUEST_CLASS_ID,RC.NAME AS REQUEST_CLASS_NAME,H.REQUEST_ID, R.NAME,H.PREV_TEAM_ID,P.NAME AS TEAM_NAME, H.PREV_REQUEST_CATEGORY_ID, RN.NAME AS PREV_REQUEST_CATEGORY_NAME, H.PREV_ITERATION_ID,I.NAME AS PREV_ITERATION_NAME, H.PREV_OWNER_ID, O.FULL_NAME AS PREV_OWNER_NAME,H.CHANGE_DATE,H.PREV_REQUEST_TYPE_ID,RT.NAME
  4029. AS PREV_REQUEST_TYPE,H.PREV_REQUEST_STATE_ID,PRST.NAME AS PREV_REQUEST_STATE,H.PREV_REQUEST_STATUS_ID,PRSTU.NAME AS PREV_REQUEST_STATUS, H.PREV_REQUEST_PRIORITY_ID,RP.NAME AS PREV_REQUEST_PRIORITY,H.PREV_REQUEST_SEVERITY_ID,RSEV.NAME AS PREV_REQUEST_SEVERITY,H.PREV_COMMENT_COUNT,H.PREV_SUBSCRIBER_COUNT,H.PREV_TAGS,H.PREV_PLANNED_WORK, H.PREV_ACTUAL_WORK,H.PREV_STORY_POINTS,H.URL,H.EXTERNAL_KEY1,H.EXTERNAL_KEY2,H.PREV_SUMMARY,H.REC_DATETIME,H.ISSOFTDELETED FROM RIODS.REQUEST_CHANGE_HISTORY H JOIN RIODS.REQUEST R ON R.REQUEST_ID=H.REQUEST_ID JOIN RIODS.REQUEST_CLASSIFICATION RC ON RC.REQUEST_CLASS_ID=H.REQUEST_CLASS_ID JOIN RIODS.TEAM P ON P.TEAM_ID =H.PREV_TEAM_ID JOIN RIODS.REQUEST_CATEGORY RN ON RN.REQUEST_CATEGORY_ID=H.PREV_REQUEST_CATEGORY_ID JOIN RIODS.ITERATION I ON I.ITERATION_ID=H.PREV_ITERATION_ID JOIN RIODS.RESOURCE O ON O.RESOURCE_ID=H.PREV_OWNER_ID JOIN RIODS.REQUEST_TYPE RT ON RT.REQUEST_TYPE_ID=H.PREV_REQUEST_TYPE_ID JOIN RIODS.REQUEST_STATE
  4030. PRST ON PRST.REQUEST_STATE_ID=H.PREV_REQUEST_STATE_ID JOIN RIODS.REQUEST_STATUS PRSTU ON PRSTU.REQUEST_STATUS_ID=H.PREV_REQUEST_STATUS_ID JOIN RIODS.REQUEST_PRIORITY RP ON RP.REQUEST_PRIORITY_ID=H.PREV_REQUEST_PRIORITY_ID JOIN RIODS.REQUEST_SEVERITY RSEV ON RSEV.REQUEST_SEVERITY_ID=H.PREV_REQUEST_SEVERITY_ID)
  4031. GO
  4032.  
  4033. CREATE VIEW RIDW.VW_BUILD_COMPILATION_RESULT (BUILD_COMPRES_ID,BUILD_ID,NAME,COMPONENT_ID,COMPONENT_NAME,COMPILE_ERROR_COUNT,COMPILE_WARNING_COUNT,EXTERNAL_KEY1,EXTERNAL_KEY2,URL,REC_DATETIME,ISSOFTDELETED) AS SELECT B.BUILD_COMPRES_ID,B.BUILD_ID,BL.NAME,B.COMPONENT_ID,C.NAME AS COMPONENT_NAME,B.COMPILE_ERROR_COUNT,B.COMPILE_WARNING_COUNT,B.EXTERNAL_KEY1,B.EXTERNAL_KEY2,B.URL,B.REC_DATETIME,B.ISSOFTDELETED FROM RIODS.BUILD_COMPILATION_RESULT B JOIN RIODS.COMPONENT C ON C.COMPONENT_ID =B.COMPONENT_ID JOIN RIODS.BUILD BL ON BL.BUILD_ID =B.BUILD_ID
  4034. GO
  4035.  
  4036. CREATE VIEW RIDW.VW_BUILD_UNIT_RESULT (BUILD_UNITRES_ID,BUILD_ID,NAME,COMPONENT_ID,COMPONENT_NAME,UNIT_TEST_COUNT,UNIT_FAILURE_COUNT,UNIT_ERROR_COUNT,EXTERNAL_KEY1,EXTERNAL_KEY2 ,URL,REC_DATETIME,ISSOFTDELETED)AS SELECT B.BUILD_UNITRES_ID,B.BUILD_ID,BL.NAME,B.COMPONENT_ID,C.NAME AS COMPONENT_NAME,B.UNIT_TEST_COUNT,B.UNIT_FAILURE_COUNT,B.UNIT_ERROR_COUNT,B.EXTERNAL_KEY1,B.EXTERNAL_KEY2 ,B.URL,B.REC_DATETIME,B.ISSOFTDELETED FROM RIODS.BUILD_UNIT_RESULT B JOIN RIODS.COMPONENT C ON C.COMPONENT_ID =B.COMPONENT_ID JOIN RIODS.BUILD BL ON BL.BUILD_ID =B.BUILD_ID
  4037. GO
  4038.  
  4039. CREATE VIEW RIDW.VW_BUILD_UNIT_EVENT (BUILD_UNIT_EVENT_ID ,BUILD_ID,NAME,COMPONENT_ID,COMPONENT_NAME,UNIT_EVENT,UNIT_TEST,EXTERNAL_KEY1,EXTERNAL_KEY2 ,URL,REC_DATETIME,ISSOFTDELETED) AS SELECT B.BUILD_UNIT_EVENT_ID ,B.BUILD_ID,BL.NAME,B.COMPONENT_ID,C.NAME AS COMPONENT_NAME,B.UNIT_EVENT,B.UNIT_TEST,B.EXTERNAL_KEY1,B.EXTERNAL_KEY2 ,B.URL,B.REC_DATETIME,B.ISSOFTDELETED FROM RIODS.BUILD_UNIT_EVENT B JOIN RIODS.COMPONENT C ON C.COMPONENT_ID =B.COMPONENT_ID JOIN RIODS.BUILD BL ON BL.BUILD_ID =B.BUILD_ID
  4040. GO
  4041.  
  4042. CREATE VIEW RIDW.VW_UNIT_TEST_RESULT (UNIT_TEST_RESULT_ID ,PROJECT_ID,PROJECT_NAME,TEAM_ID,TEAM_NAME,BUILD_TYPE,COMPONENT_ID,COMPONENT_NAME,UNIT_EVENT,UNIT_TEST,UNIT_COUNT,LAST_RUN_DATE,EXTERNAL_KEY1,EXTERNAL_KEY2 ,URL,REC_DATETIME,ISSOFTDELETED)AS SELECT B.UNIT_TEST_RESULT_ID ,B.PROJECT_ID,P.NAME AS PROJECT_NAME,B.TEAM_ID,T.NAME AS TEAM_NAME,BUILD_TYPE,B.COMPONENT_ID,C.NAME AS COMPONENT_NAME,B.UNIT_EVENT,B.UNIT_TEST,B.UNIT_COUNT,B.LAST_RUN_DATE,B.EXTERNAL_KEY1,B.EXTERNAL_KEY2 ,B.URL,B.REC_DATETIME,B.ISSOFTDELETED FROM RIODS.UNIT_TEST_RESULT B JOIN RIODS.COMPONENT C ON C.COMPONENT_ID =B.COMPONENT_ID JOIN RIODS.TEAM T ON T.TEAM_ID =B.TEAM_ID JOIN RIODS.PROJECT P ON P.PROJECT_ID =B.PROJECT_ID
  4043. GO
  4044.  
  4045. CREATE VIEW RIDW.VW_RISK (RISK_ID,NAME,REFERENCE_ID,EXTERNAL_ID,PROJECT_ID,PROJECT_NAME,REQUIREMENT_ID,REQUIREMENT_NAME,PRIORITY,RISK_STATE,OCCURED_DATETIME , IMPACT,IMPACT_RANK,PROBABILITY,PROBABILITY_RANK,OWNER_ID,OWNER_NAME,RELEASE_ID,RELEASE_NAME,ITERATION_ID,ITERATION_NAME,TARGET_DATE ,CREATION_DATE ,CLOSE_DATE , IMPACT_CATEGORY,CONSEQUENCE_COST,RISK_MANAGEMENT_ACTION,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,PROBABILITY_COST,RISK_SCORE,REC_DATETIME,ISSOFTDELETED) AS (SELECT R.RISK_ID,R.NAME,R.REFERENCE_ID,R.EXTERNAL_ID,R.PROJECT_ID,P.NAME AS PROJECT_NAME,R.REQUIREMENT_ID,RQ.NAME AS REQUIREMENT_NAME,R.PRIORITY,R.RISK_STATE,R.OCCURED_DATETIME ,R.IMPACT, R.IMPACT_RANK,R.PROBABILITY,R.PROBABILITY_RANK,R.OWNER_ID,RE.FULL_NAME AS OWNER_NAME,R.RELEASE_ID,RL.NAME AS RELEASE_NAME,R.ITERATION_ID,I.NAME AS ITERATION_NAME,R.TARGET_DATE ,R.CREATION_DATE ,R.CLOSE_DATE , R.IMPACT_CATEGORY,R.CONSEQUENCE_COST,R.RISK_MANAGEMENT_ACTION,R.URL,R.EXTERNAL_KEY1,R.EXTERNAL_KEY2,R.PROBABILITY_COST,R.RISK_SCORE,R.REC_DATETIME,R.ISSOFTDELETED
  4046. FROM RIODS.RISK R JOIN RIODS.PROJECT P ON P.PROJECT_ID=R.PROJECT_ID JOIN RIODS.REQUIREMENT RQ ON RQ.REQUIREMENT_ID=R.REQUIREMENT_ID JOIN RIODS.RESOURCE RE ON RE.RESOURCE_ID = R.OWNER_ID JOIN RIODS.RELEASE RL ON RL.RELEASE_ID=R.RELEASE_ID JOIN RIODS.ITERATION I ON I.ITERATION_ID =R.ITERATION_ID)
  4047. GO
  4048.  
  4049. CREATE VIEW RIDW.VW_JOB (JOB_ID,REFERENCE_ID,EXTERNAL_ID,NAME,OWNER_ID,OWNER_NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,URL,PROJECT_ID,PROJECT_NAME,REC_DATETIME,ISSOFTDELETED) AS (SELECT J.JOB_ID,J.REFERENCE_ID,J.EXTERNAL_ID,J.NAME,J.OWNER_ID,R.FULL_NAME AS OWNER_NAME,J.EXTERNAL_KEY1,J.EXTERNAL_KEY2,J.URL,J.PROJECT_ID,P.NAME AS PROJECT_NAME,J.REC_DATETIME,J.ISSOFTDELETED FROM RIODS.JOB J JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=J.OWNER_ID JOIN RIODS.PROJECT P ON P.PROJECT_ID=J.PROJECT_ID)
  4050. GO
  4051.  
  4052. CREATE VIEW RIDW.VW_JOB_RESULT (JOB_RESULT_ID,REFERENCE_ID,EXTERNAL_ID,NAME,STATE,VERDICT, START_TIME, END_TIME,DURATION,LAB_RESOURCE_ID,LAB_RESOURCE_NAME,OWNER_ID,OWNER_NAME,JOB_ID,JOB_NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS (SELECT J.JOB_RESULT_ID,J.REFERENCE_ID,J.EXTERNAL_ID,J.NAME,J.STATE,J.VERDICT, J.START_TIME, J.END_TIME,J.DURATION,J.LAB_RESOURCE_ID,L.NAME AS LAB_RESOURCE_NAME,J.OWNER_ID,R.FULL_NAME AS OWNER_NAME,J.JOB_ID,JB.NAME AS JOB_NAME, J.EXTERNAL_KEY1,J.EXTERNAL_KEY2,J.SOURCE_ID,J.URL,J.REC_DATETIME,J.ISSOFTDELETED FROM RIODS.JOB_RESULT J JOIN RIODS.JOB JB ON JB.JOB_ID=J.JOB_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=J.OWNER_ID JOIN RIODS.LAB_RESOURCE L ON L.LAB_RESOURCE_ID=J.LAB_RESOURCE_ID)
  4053. GO
  4054.  
  4055. CREATE VIEW RIDW.VW_ACTIVITY_STATE_HISTORY (ACTIVITY_STATE_HISTORY_ID,ACTIVITY_ID,PREV_ACTIVITY_STATE,ACTIVITY_STATE, CHANGE_DATE,DAYS_IN_STATE,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT ACTIVITY_STATE_HISTORY_ID,ACTIVITY_ID,PREV_ACTIVITY_STATE,ACTIVITY_STATE, CHANGE_DATE,DAYS_IN_STATE,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED FROM RIODS.ACTIVITY_STATE_HISTORY)
  4056. GO
  4057.  
  4058. CREATE VIEW RIDW.VW_TASK_STATE_HISTORY (TASK_STATE_HISTORY_ID,TASK_ID,PREV_TASK_STATE,TASK_STATE, CHANGE_DATE,DAYS_IN_STATE,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT TASK_STATE_HISTORY_ID,TASK_ID,PREV_TASK_STATE,TASK_STATE, CHANGE_DATE,DAYS_IN_STATE,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED FROM RIODS.TASK_STATE_HISTORY)
  4059. GO
  4060.  
  4061. CREATE VIEW RIDW.VW_TESTSCRIPT (TESTSCRIPT_ID, REFERENCE_ID, EXTERNAL_ID, NAME, LAST_UPDATED, TESTSCRIPT_STATE, TYPE, OWNER_ID,OWNER_NAME, PROJECT_ID, PROJECT_NAME, EXTERNAL_KEY1, EXTERNAL_KEY2, SOURCE_ID, URL, REC_DATETIME, ISSOFTDELETED, TESTSCRIPT_STATE_ID,TESTSCRIPT_STATE_EXTERNAL_ID,TESTSCRIPT_STATE_REFERENCE_ID,TEST_STATUS_ID,TEST_STATUS_NAME,TEST_STATUS_EXTERNAL_ID,TEST_STATUS_REFERENCE_ID,CREATION_DATE) AS (SELECT TEST.TESTSCRIPT_ID, TEST.REFERENCE_ID, TEST.EXTERNAL_ID, TEST.NAME, TEST.LAST_UPDATED, TS.NAME AS TESTSCRIPT_STATE, TEST.TYPE, TEST.OWNER_ID, R.NAME AS OWNER_NAME, TEST.PROJECT_ID, P.NAME AS PROJECT_NAME,TEST.EXTERNAL_KEY1, TEST.EXTERNAL_KEY2, TEST.SOURCE_ID, TEST.URL, TEST.REC_DATETIME, TEST.ISSOFTDELETED, TEST.TESTSCRIPT_STATE_ID,TS.EXTERNAL_ID AS TESTSCRIPT_STATE_EXTERNAL_ID,TS.REFERENCE_ID AS TESTSCRIPT_STATE_REFERENCE_ID,TS.TEST_STATUS_ID,TU.NAME AS TEST_STATUS_NAME,TU.EXTERNAL_ID AS TEST_STATUS_EXTERNAL_ID,TU.REFERENCE_ID AS TEST_STATUS_REFERENCE_ID,TEST.CREATION_DATE FROM RIODS.TESTSCRIPT
  4062. TEST JOIN RIODS.RESOURCE R ON R.RESOURCE_ID = TEST.OWNER_ID JOIN RIODS.PROJECT P ON P.PROJECT_ID = TEST.PROJECT_ID JOIN RIODS.TESTSCRIPT_STATE TS ON TS.TESTSCRIPT_STATE_ID=TEST.TESTSCRIPT_STATE_ID JOIN RIODS.TEST_STATUS TU ON TU.TEST_STATUS_ID=TS.TEST_STATUS_ID)
  4063. GO
  4064.  
  4065. CREATE VIEW RIDW.VW_TESTCASE_TESTSCRIPT_LOOKUP (TESTSCRIPT_ID, TESTSCRIPT_NAME, TESTCASE_ID, TESTCASE_NAME) AS (SELECT RT.TESTSCRIPT_ID, I.NAME AS TESTSCRIPT_NAME, RT.TESTCASE_ID, T.NAME AS TESTCASE_NAME FROM RIODS.TESTCASE_TESTSCRIPT_LOOKUP RT JOIN RIODS.TESTSCRIPT I ON I.TESTSCRIPT_ID=RT.TESTSCRIPT_ID JOIN RIODS.TESTCASE T ON T.TESTCASE_ID=RT.TESTCASE_ID)
  4066. GO
  4067.  
  4068. CREATE VIEW RIDW.VW_ITERATION_DETAIL (ITERATION_ID,ITERATION_NAME,ACTUAL_DURATION,ACTUAL_WORK,ACTUAL_WORK_VARIANCE,ACTUAL_START_VARIANCE,ACTUAL_FINISH_VARIANCE,ACTUAL_START,ACTUAL_FINISH, ACTUAL_COST,ACTUAL_COST_VARIANCE,BASELINE_DURATION,BASELINE_WORK,BASELINE_WORK_VARIANCE,BASELINE_FINISH_VARIANCE,BASELINE_START_VARIANCE, BASELINE_COST_VARIANCE,BASELINE_START,BASELINE_FINISH,PLANNED_COST,COST_VARIANCE, PLANNED_DURATION,PLANNED_WORK,WORK_VARIANCE,START_VARIANCE,FINISH_VARIANCE,DURATION_VARIANCE,PLANNED_START,PLANNED_FINISH,PERCENT_COMPLETE,PERCENT_WORK_COMPLETE) AS (SELECT I.ITERATION_ID,IT.NAME AS ITERATION_NAME,I.ACTUAL_DURATION,I.ACTUAL_WORK,I.ACTUAL_WORK_VARIANCE,I.ACTUAL_START_VARIANCE,I.ACTUAL_FINISH_VARIANCE,I.ACTUAL_START,I.ACTUAL_FINISH, I.ACTUAL_COST,I.ACTUAL_COST_VARIANCE,I.BASELINE_DURATION,I.BASELINE_WORK,I.BASELINE_WORK_VARIANCE,I.BASELINE_FINISH_VARIANCE,I.BASELINE_START_VARIANCE, I.BASELINE_COST_VARIANCE,I.BASELINE_START,I.BASELINE_FINISH,I.PLANNED_COST,I.COST_VARIANCE, I.PLANNED_DURATION,I.PLANNED_WORK,I.WORK_VARIANCE,I.START_VARIANCE,I.FINISH_VARIANCE,I.DURATION_VARIANCE,I.PLANNED_START,I.PLANNED_FINISH,I.PERCENT_COMPLETE,I.PERCENT_WORK_COMPLETE
  4069. FROM RIODS.ITERATION_DETAIL I JOIN RIODS.ITERATION IT ON IT.ITERATION_ID=I.ITERATION_ID)
  4070. GO
  4071.  
  4072. CREATE VIEW RIDW.VW_PROGRAM (PROGRAM_ID,NAME,REFERENCE_ID,EXTERNAL_ID,PROGRAM_MANAGER_ID,PROGRAM_MANAGER,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED,SOURCE_ID) AS (SELECT PR.PROGRAM_ID,PR.NAME,PR.REFERENCE_ID,PR.EXTERNAL_ID,PR.PROGRAM_MANAGER AS PROGRAM_MANAGER_ID,R.FULL_NAME AS PROGRAM_MANAGER,PR.URL,PR.EXTERNAL_KEY1,PR.EXTERNAL_KEY2,PR.REC_DATETIME,PR.ISSOFTDELETED,PR.SOURCE_ID FROM RIODS.PROGRAM PR JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=PR.PROGRAM_MANAGER)
  4073. GO
  4074.  
  4075. CREATE VIEW RIDW.VW_PROGRAM_DETAIL (PROGRAM_ID, PROGRAM_NAME,CURRENCY_ID,CURRENCY,ACTUAL_BUDGET,CURRENT_BUDGET,PLANNED_BUDGET,ACTUAL_VARIANCE,PLANNED_START,PLANNED_FINISH,ACWP,BAC, BCWP,BCWS,EAC, EV_ETC,EV_FLAG, ACTUAL_DURATION,ACTUAL_WORK,ACTUAL_WORK_VARIANCE,ACTUAL_START_VARIANCE,ACTUAL_FINISH_VARIANCE,ACTUAL_COST,ACTUAL_START, ACTUAL_FINISH,ACTUAL_COST_VARIANCE,PLANNED_COST, COST_VARIANCE,PLANNED_DURATION, PLANNED_WORK, WORK_VARIANCE,START_VARIANCE,FINISH_VARIANCE,DURATION_VARIANCE,PERCENT_COMPLETE,PERCENT_WORK_COMPLETE,BUDGETED_REVENUE,PLANNED_REVENUE,ACTUAL_REVENUE,BUDGETED_COST,NET_PRESENT_VALUE,INTERNAL_RATE_OF_RETURN) AS (SELECT PR.PROGRAM_ID,P.NAME AS PROGRAM_NAME,PR.CURRENCY_ID,C.NAME AS CURRENCY,PR.ACTUAL_BUDGET,PR.CURRENT_BUDGET,PR.PLANNED_BUDGET,PR.ACTUAL_VARIANCE,PR.PLANNED_START,PR.PLANNED_FINISH,PR.ACWP,PR.BAC,PR.BCWP,PR.BCWS,PR.EAC,PR.EV_ETC,PR.EV_FLAG,PR.ACTUAL_DURATION,PR.ACTUAL_WORK,PR.ACTUAL_WORK_VARIANCE,PR.ACTUAL_START_VARIANCE,PR.ACTUAL_FINISH_VARIANCE,PR.ACTUAL_COST,PR.ACTUAL_START,PR.ACTUAL_FINISH,PR.ACTUAL_COST_VARIANCE,PR.PLANNED_COST,PR.COST_VARIANCE,PR.PLANNED_DURATION,PR.PLANNED_WORK,PR.WORK_VARIANCE,PR.START_VARIANCE,PR.FINISH_VARIANCE,PR.DURATION_VARIANCE,PR.PERCENT_COMPLETE,PR.PERCENT_WORK_COMPLETE,PR.BUDGETED_REVENUE,PR.PLANNED_REVENUE,PR.ACTUAL_REVENUE,PR.BUDGETED_COST,PR.NET_PRESENT_VALUE,PR.INTERNAL_RATE_OF_RETURN
  4076. FROM RIODS.PROGRAM_DETAIL PR JOIN RIODS.PROGRAM P ON P.PROGRAM_ID=PR.PROGRAM_ID JOIN RIODS.CURRENCY C ON C.CURRENCY_ID=PR.CURRENCY_ID)
  4077. GO
  4078.  
  4079. CREATE VIEW RIDW.VW_ITERATION_BASELINE (BASELINE_ID, EXTERNAL_ID, NAME, ITERATION_ID, REFERENCE_ID, URL, BASELINE_DATE, PLANNED_START, PLANNED_FINISH, PLANNED_WORK, BASELINE_WORK_COMPLETED, PLANNED_COST, BASELINE_COST_COMPLETED, PLANNED_DURATION, EXTERNAL_KEY1, EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT P.BASELINE_ID, P.EXTERNAL_ID, P.NAME, P.ITERATION_ID, P.REFERENCE_ID, P.URL, P.BASELINE_DATE, P.PLANNED_START, P.PLANNED_FINISH, P.PLANNED_WORK,P.BASELINE_WORK_COMPLETED,P.PLANNED_COST, P.BASELINE_COST_COMPLETED, P.PLANNED_DURATION, P.EXTERNAL_KEY1,P.EXTERNAL_KEY2,P.REC_DATETIME,P.ISSOFTDELETED FROM RIODS.ITERATION_BASELINE P)
  4080. GO
  4081.  
  4082. CREATE VIEW RIDW.VW_PROJECT_ALLOCATION(PROJECT_ALLOCATION_ID,NAME,REFERENCE_ID,EXTERNAL_ID,PROJECT_ID,PROJECT_NAME,OWNER_ID,OWNER_NAME,PLANNED_START,PLANNED_FINISH,ACTUAL_START,ACTUAL_FINISH,PLANNED_WORK,ACTUAL_WORK,PLANNED_DURATION,ACTUAL_DURATION,PERCENT_COMPLETE,PERCENT_WORK_COMPLETE,ALLOTED_WORK,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,REC_DATETIME,ISSOFTDELETED,PROFILE_ID,PROFILE_NAME,UNITS,SUNDAY_UNITS,MONDAY_UNITS,TUESDAY_UNITS,WEDNESDAY_UNITS,THURSDAY_UNITS,FRIDAY_UNITS,SATURDAY_UNITS) AS (SELECT PA.PROJECT_ALLOCATION_ID,PA.NAME,PA.REFERENCE_ID,PA.EXTERNAL_ID,PA.PROJECT_ID,P.NAME AS PROJECT_NAME,PA.OWNER_ID,R.FULL_NAME AS OWNER_NAME,PA.PLANNED_START,PA.PLANNED_FINISH,PA.ACTUAL_START,PA.ACTUAL_FINISH,PA.PLANNED_WORK,PA.ACTUAL_WORK,PA.PLANNED_DURATION,PA.ACTUAL_DURATION,PA.PERCENT_COMPLETE,PA.PERCENT_WORK_COMPLETE,PA.ALLOTED_WORK,PA.URL,PA.EXTERNAL_KEY1,PA.EXTERNAL_KEY2,PA.SOURCE_ID,PA.REC_DATETIME,PA.ISSOFTDELETED,PA.PROFILE_ID,PF.NAME AS PROFILE_NAME,PA.UNITS,PA.SUNDAY_UNITS,PA.MONDAY_UNITS,PA.TUESDAY_UNITS,PA.WEDNESDAY_UNITS,PA.THURSDAY_UNITS,PA.FRIDAY_UNITS,PA.SATURDAY_UNITS
  4083. FROM RIODS.PROJECT_ALLOCATION PA JOIN RIODS.PROJECT P ON P.PROJECT_ID =PA.PROJECT_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=PA.OWNER_ID JOIN RIODS.PROFILE PF ON PF.PROFILE_ID=PA.PROFILE_ID)
  4084. GO
  4085.  
  4086. CREATE VIEW RIDW.VW_SKILL (EXTERNAL_ID, NAME, SKILL_ID, REFERENCE_ID, URL, EXTERNAL_KEY1, EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT EXTERNAL_ID,NAME,SKILL_ID,REFERENCE_ID,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED FROM RIODS.SKILL)
  4087. GO
  4088.  
  4089. CREATE VIEW RIDW.VW_RESOURCE_SKILL_LOOKUP (SKILL_ID, SKILL_NAME, RESOURCE_ID, RESOURCE_NAME) AS ( SELECT RS.SKILL_ID, S.NAME AS SKILL_NAME, RS.RESOURCE_ID, R.NAME AS RESOURCE_NAME FROM RIODS.RESOURCE_SKILL_LOOKUP RS JOIN RIODS.SKILL S ON RS.SKILL_ID=S.SKILL_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=RS.RESOURCE_ID)
  4090. GO
  4091.  
  4092. CREATE VIEW RIDW.VW_COMPETENCY (EXTERNAL_ID, NAME, COMPETENCY_ID, REFERENCE_ID, URL, EXTERNAL_KEY1, EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT EXTERNAL_ID,NAME,COMPETENCY_ID,REFERENCE_ID,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED FROM RIODS.COMPETENCY)
  4093. GO
  4094.  
  4095. CREATE VIEW RIDW.VW_RESOURCE_COMPETENCY_LOOKUP (COMPETENCY_ID, COMPETENCY_NAME, RESOURCE_ID, RESOURCE_NAME) AS ( SELECT RS.COMPETENCY_ID, S.NAME AS COMPETENCY_NAME, RS.RESOURCE_ID, R.NAME AS RESOURCE_NAME FROM RIODS.RESOURCE_COMPETENCY_LOOKUP RS JOIN RIODS.COMPETENCY S ON RS.COMPETENCY_ID=S.COMPETENCY_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=RS.RESOURCE_ID)
  4096. GO
  4097.  
  4098. CREATE VIEW RIDW.VW_TIMESHEET (TIMESHEET_ID,TIMESHEET_REPORTING_WEEK,REFERENCE_ID,EXTERNAL_ID,ACTIVITY_ID,ACTIVITY_NAME,ADDITIONAL_WORK,BILLABLE_HOURS,NON_BILLABLE_HOURS,APPROVER_ID,APPROVER_NAME,TIMESHEET_STATE, PERCENT_COMPLETE,LAST_APPROVAL_DATE,REGULAR_TIME,OVERTIME,MONDAY_DATE,TUESDAY_DATE,WEDNESDAY_DATE,THURSDAY_DATE,FRIDAY_DATE,SATURDAY_DATE,SUNDAY_DATE,MONDAY_REGULAR_TIME,TUESDAY_REGULAR_TIME,WEDNESDAY_REGULAR_TIME, THURSDAY_REGULAR_TIME,FRIDAY_REGULAR_TIME,SATURDAY_REGULAR_TIME,SUNDAY_REGULAR_TIME,MONDAY_OVT,TUESDAY_OVT,WEDNESDAY_OVT,THURSDAY_OVT,FRIDAY_OVT,SATURDAY_OVT,SUNDAY_OVT,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,REC_DATETIME,ISSOFTDELETED) AS (SELECT TIMESHEET_ID,T.TIMESHEET_REPORTING_WEEK,T.REFERENCE_ID,T.EXTERNAL_ID,T.ACTIVITY_ID,A.NAME AS ACTIVITY_NAME,T.ADDITIONAL_WORK,T.BILLABLE_HOURS,T.NON_BILLABLE_HOURS,T.APPROVER_ID,R.FULL_NAME AS APPROVER_NAME,T.TIMESHEET_STATE, T.PERCENT_COMPLETE,T.LAST_APPROVAL_DATE,T.REGULAR_TIME,T.OVERTIME,T.MONDAY_DATE,T.TUESDAY_DATE,T.WEDNESDAY_DATE,T.THURSDAY_DATE,T.FRIDAY_DATE,T.SATURDAY_DATE,T.SUNDAY_DATE,T.MONDAY_REGULAR_TIME,T.TUESDAY_REGULAR_TIME,T.WEDNESDAY_REGULAR_TIME,
  4099. T.THURSDAY_REGULAR_TIME,T.FRIDAY_REGULAR_TIME,T.SATURDAY_REGULAR_TIME,T.SUNDAY_REGULAR_TIME,T.MONDAY_OVT,T.TUESDAY_OVT,T.WEDNESDAY_OVT,T.THURSDAY_OVT,T.FRIDAY_OVT,T.SATURDAY_OVT,T.SUNDAY_OVT,T.URL,T.EXTERNAL_KEY1,T.EXTERNAL_KEY2,T.SOURCE_ID,T.REC_DATETIME,T.ISSOFTDELETED FROM RIODS.TIMESHEET T JOIN RIODS.ACTIVITY A ON A.ACTIVITY_ID=T.ACTIVITY_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=T.APPROVER_ID)
  4100. GO
  4101.  
  4102. CREATE VIEW RIDW.VW_PROFILE (PROFILE_ID, NAME, REFERENCE_ID, EXTERNAL_ID, RATE, EXPERIENCE_IN_MONTHS, URL, EXTERNAL_KEY1, EXTERNAL_KEY2,CITY_ID,CITY_NAME,ORGANIZATION_ID,ORGANIZATION_NAME,REC_DATETIME,ISSOFTDELETED) AS ( SELECT P.PROFILE_ID, P.NAME, P.REFERENCE_ID, P.EXTERNAL_ID, P.RATE, P.EXPERIENCE_IN_MONTHS, P.URL, P.EXTERNAL_KEY1, P.EXTERNAL_KEY2,P.CITY_ID,C.NAME AS CITY_NAME,P.ORGANIZATION_ID,O.NAME AS ORGANIZATION_NAME,P.REC_DATETIME,P.ISSOFTDELETED FROM RIODS.PROFILE P JOIN RIODS.CITY C ON C.CITY_ID=P.CITY_ID JOIN RIODS.ORGANIZATION O ON O.ORGANIZATION_ID=P.ORGANIZATION_ID)
  4103. GO
  4104.  
  4105. CREATE VIEW RIDW.VW_PROFILE_SKILL_LOOKUP (SKILL_ID, SKILL_NAME, PROFILE_ID, PROFILE_NAME) AS ( SELECT PS.SKILL_ID, S.NAME AS SKILL_NAME, PS.PROFILE_ID, P.NAME AS PROFILE_NAME FROM RIODS.PROFILE_SKILL_LOOKUP PS JOIN RIODS.SKILL S ON PS.SKILL_ID=S.SKILL_ID JOIN RIODS.PROFILE P ON P.PROFILE_ID=PS.PROFILE_ID)
  4106. GO
  4107.  
  4108. CREATE VIEW RIDW.VW_PROFILE_COMPETENCY_LOOKUP (COMPETENCY_ID, COMPETENCY_NAME, PROFILE_ID, PROFILE_NAME) AS ( SELECT PC.COMPETENCY_ID, C.NAME AS COMPETENCY_NAME, PC.PROFILE_ID, P.NAME AS PROFILE_NAME FROM RIODS.PROFILE_COMPETENCY_LOOKUP PC JOIN RIODS.COMPETENCY C ON PC.COMPETENCY_ID=C.COMPETENCY_ID JOIN RIODS.PROFILE P ON P.PROFILE_ID=PC.PROFILE_ID)
  4109. GO
  4110.  
  4111. CREATE VIEW RIDW.VW_TIMECODE (TIMECODE_ID,REFERENCE_ID,EXTERNAL_ID,NAME,PARENT_TIMECODE_ID,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS (SELECT TIMECODE_ID,REFERENCE_ID,EXTERNAL_ID,NAME,PARENT_TIMECODE_ID,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED FROM RIODS.TIMECODE)
  4112. GO
  4113.  
  4114. CREATE VIEW RIDW.VW_CHARGECODE (CHARGECODE_ID,REFERENCE_ID,EXTERNAL_ID,NAME,PARENT_CHARGECODE_ID,CHARGECODE_STATE,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS (SELECT CHARGECODE_ID,REFERENCE_ID,EXTERNAL_ID,NAME,PARENT_CHARGECODE_ID,CHARGECODE_STATE,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED FROM RIODS.CHARGECODE)
  4115. GO
  4116.  
  4117. CREATE VIEW RIDW.VW_TIMESHEET_TIMECODE_LOOKUP (TIMESHEET_ID, TIMESHEET_REPORTING_WEEK, TIMECODE_ID, NAME) AS (SELECT T.TIMESHEET_ID, TS.TIMESHEET_REPORTING_WEEK, T.TIMECODE_ID, TC.NAME FROM RIODS.TIMESHEET_TIMECODE_LOOKUP T JOIN RIODS.TIMESHEET TS ON T.TIMESHEET_ID = TS.TIMESHEET_ID JOIN RIODS.TIMECODE TC ON T.TIMECODE_ID = TC.TIMECODE_ID)
  4118. GO
  4119.  
  4120. CREATE VIEW RIDW.VW_OPERATING_TERRITORY (TERRITORY_ID,REFERENCE_ID,EXTERNAL_ID,NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS (SELECT TERRITORY_ID,REFERENCE_ID,EXTERNAL_ID,NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED FROM RIODS.OPERATING_TERRITORY)
  4121. GO
  4122.  
  4123. CREATE VIEW RIDW.VW_COUNTRY(COUNTRY_ID,REFERENCE_ID,EXTERNAL_ID,NAME,TERRITORY_ID,TERRITORY_NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS (SELECT C.COUNTRY_ID,C.REFERENCE_ID,C.EXTERNAL_ID,C.NAME,C.TERRITORY_ID,T.NAME AS TERRITORY_NAME,C.EXTERNAL_KEY1,C.EXTERNAL_KEY2,C.SOURCE_ID,C.URL,C.REC_DATETIME,C.ISSOFTDELETED FROM RIODS.COUNTRY C JOIN RIODS.OPERATING_TERRITORY T ON T.TERRITORY_ID=C.TERRITORY_ID)
  4124. GO
  4125.  
  4126. CREATE VIEW RIDW.VW_PROVINCE_STATE (PROVINCE_STATE_ID,REFERENCE_ID,EXTERNAL_ID,NAME,COUNTRY_ID,COUNTRY_NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS (SELECT P.PROVINCE_STATE_ID,P.REFERENCE_ID,P.EXTERNAL_ID,P.NAME,P.COUNTRY_ID,C.NAME AS COUNTRY_NAME,P.EXTERNAL_KEY1,P.EXTERNAL_KEY2,P.SOURCE_ID,P.URL,P.REC_DATETIME,P.ISSOFTDELETED FROM RIODS.PROVINCE_STATE P JOIN RIODS.COUNTRY C ON C.COUNTRY_ID=P.COUNTRY_ID)
  4127. GO
  4128.  
  4129. CREATE VIEW RIDW.VW_CITY (CITY_ID,REFERENCE_ID,EXTERNAL_ID,NAME,PROVINCE_STATE_ID,PROVINCE_STATE_NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS (SELECT C.CITY_ID,C.REFERENCE_ID,C.EXTERNAL_ID,C.NAME,C.PROVINCE_STATE_ID,P.NAME AS PROVINCE_STATE_NAME, C.EXTERNAL_KEY1,C.EXTERNAL_KEY2,C.SOURCE_ID,C.URL,C.REC_DATETIME,C.ISSOFTDELETED FROM RIODS.CITY C JOIN RIODS.PROVINCE_STATE P ON P.PROVINCE_STATE_ID=C.PROVINCE_STATE_ID)
  4130. GO
  4131.  
  4132. CREATE VIEW RIDW.VW_ORGANIZATION(ORGANIZATION_ID,REFERENCE_ID,EXTERNAL_ID, NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS (SELECT ORGANIZATION_ID,REFERENCE_ID,EXTERNAL_ID,NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED FROM RIODS.ORGANIZATION)
  4133. GO
  4134.  
  4135. CREATE VIEW RIDW.VW_PORTFOLIO (PORTFOLIO_ID,REFERENCE_ID,EXTERNAL_ID,NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME, ISSOFTDELETED) AS (SELECT PORTFOLIO_ID,REFERENCE_ID,EXTERNAL_ID,NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME, ISSOFTDELETED FROM RIODS.PORTFOLIO)
  4136. GO
  4137.  
  4138. CREATE VIEW RIDW.VW_PORTFOLIO_PROG_PROJ_LOOKUP (PORTFOLIO_ID,PORTFOLIO_NAME,PROGRAM_ID,PROGRAM_NAME,PROJECT_ID,PROJECT_NAME) AS (SELECT P.PORTFOLIO_ID,PR.NAME AS PORTFOLIO_NAME,P.PROGRAM_ID,PG.NAME AS PROGRAM_NAME,P.PROJECT_ID,PJ.NAME AS PROJECT_NAME FROM RIODS.PORTFOLIO_PROG_PROJ_LOOKUP P JOIN RIODS.PORTFOLIO PR ON PR.PORTFOLIO_ID=P.PORTFOLIO_ID JOIN RIODS.PROGRAM PG ON PG.PROGRAM_ID=P.PROGRAM_ID JOIN RIODS.PROJECT PJ ON PJ.PROJECT_ID=P.PROJECT_ID)
  4139. GO
  4140.  
  4141. CREATE VIEW RIDW.VW_REQUEST_TESTCASE_LOOKUP (REQUEST_ID, REQUEST_NAME, TESTCASE_ID, TESTCASE_NAME, LINK_TYPE) AS (SELECT RT.REQUEST_ID, R.NAME AS REQUEST_NAME,RT.TESTCASE_ID, TC.NAME AS TESTCASE_NAME, RT.LINK_TYPE FROM RIODS.REQUEST_TESTCASE_LOOKUP RT JOIN RIODS.REQUEST R ON R.REQUEST_ID =RT.REQUEST_ID JOIN RIODS.TESTCASE TC ON TC.TESTCASE_ID=RT.TESTCASE_ID)
  4142. GO
  4143.  
  4144. CREATE VIEW RIDW.VW_RISK_STATE_HISTORY (RISK_STATE_HISTORY_ID,RISK_ID,RISK_NAME,PREV_RISK_STATE,RISK_STATE,CHANGE_DATE,DAYS_IN_STATE,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,REC_DATETIME,ISSOFTDELETED) AS (SELECT RH.RISK_STATE_HISTORY_ID, RH.RISK_ID, R.NAME AS RISK_NAME, RH.PREV_RISK_STATE, RH.RISK_STATE, RH.CHANGE_DATE, RH.DAYS_IN_STATE, RH.EXTERNAL_KEY1, RH.EXTERNAL_KEY2, RH.SOURCE_ID, RH.REC_DATETIME, RH.ISSOFTDELETED FROM RIODS.RISK_STATE_HISTORY RH JOIN RIODS.RISK R ON R.RISK_ID=RH.RISK_ID)
  4145. GO
  4146.  
  4147. CREATE VIEW RIDW.VW_REQUEST_STATE ( REQUEST_STATE_ID,NAME ,REFERENCE_ID,EXTERNAL_ID,PROJECT_ID,PROJECT_NAME,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,REC_DATETIME,ISSOFTDELETED) AS (SELECT R.REQUEST_STATE_ID,R.NAME,R.REFERENCE_ID,R.EXTERNAL_ID,R.PROJECT_ID,P.NAME AS PROJECT_NAME,R.URL,R.EXTERNAL_KEY1,R.EXTERNAL_KEY2,R.SOURCE_ID,R.REC_DATETIME,R.ISSOFTDELETED FROM RIODS.REQUEST_STATE R JOIN RIODS.PROJECT P ON P.PROJECT_ID=R.PROJECT_ID)
  4148. GO
  4149.  
  4150. CREATE VIEW RIDW.VW_REQUEST_STATUS ( REQUEST_STATUS_ID,NAME ,REFERENCE_ID,EXTERNAL_ID,PROJECT_ID,PROJECT_NAME,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,REC_DATETIME,ISSOFTDELETED) AS (SELECT R.REQUEST_STATUS_ID,R.NAME,R.REFERENCE_ID,R.EXTERNAL_ID,R.PROJECT_ID,P.NAME AS PROJECT_NAME,R.URL,R.EXTERNAL_KEY1,R.EXTERNAL_KEY2,R.SOURCE_ID,R.REC_DATETIME,R.ISSOFTDELETED FROM RIODS.REQUEST_STATUS R JOIN RIODS.PROJECT P ON P.PROJECT_ID=R.PROJECT_ID)
  4151. GO
  4152.  
  4153. CREATE VIEW RIDW.VW_TEAM_ROLE (TEAM_ROLE_ID, NAME, REFERENCE_ID, EXTERNAL_ID, TEAM_ID, TEAM_NAME, OWNER_ID, MANAGER_NAME, URL,EXTERNAL_KEY1,EXTERNAL_KEY2,REC_DATETIME,ISSOFTDELETED) AS (SELECT PR.TEAM_ROLE_ID, PR.NAME, PR.REFERENCE_ID, PR.EXTERNAL_ID, PR.TEAM_ID, P.NAME AS TEAM_NAME, PR.OWNER_ID,R.FULL_NAME AS MANAGER_NAME, PR.URL,PR.EXTERNAL_KEY1,PR.EXTERNAL_KEY2,PR.REC_DATETIME,PR.ISSOFTDELETED FROM RIODS.TEAM_ROLE PR JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=PR.OWNER_ID JOIN RIODS.TEAM P ON P.TEAM_ID=PR.TEAM_ID)
  4154. GO
  4155.  
  4156. CREATE VIEW RIDW.VW_REQUEST_LINK (PRED_REQUEST_ID,PRED_REQUEST_NAME,SUCC_REQUEST_ID,SUCC_REQUEST_NAME,LINK_TYPE) AS (SELECT RC.PRED_REQUEST_ID,C.NAME AS PRED_REQUEST_NAME,RC.SUCC_REQUEST_ID,P.NAME AS SUCC_REQUEST_NAME,RC.LINK_TYPE FROM RIODS.REQUEST_LINK RC JOIN RIODS.REQUEST C ON C.REQUEST_ID=RC.PRED_REQUEST_ID JOIN RIODS.REQUEST P ON P.REQUEST_ID=RC.SUCC_REQUEST_ID)
  4157. GO
  4158.  
  4159. CREATE VIEW RIDW.VW_REQUEST_PRIORITY ( REQUEST_PRIORITY_ID,NAME ,REFERENCE_ID,EXTERNAL_ID,PROJECT_ID,PROJECT_NAME,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,REC_DATETIME,ISSOFTDELETED) AS (SELECT R.REQUEST_PRIORITY_ID,R.NAME,R.REFERENCE_ID,R.EXTERNAL_ID,R.PROJECT_ID,P.NAME AS PROJECT_NAME,R.URL,R.EXTERNAL_KEY1,R.EXTERNAL_KEY2,R.SOURCE_ID,R.REC_DATETIME,R.ISSOFTDELETED FROM RIODS.REQUEST_PRIORITY R JOIN RIODS.PROJECT P ON P.PROJECT_ID=R.PROJECT_ID)
  4160. GO
  4161.  
  4162. CREATE VIEW RIDW.VW_REQUEST_SEVERITY ( REQUEST_SEVERITY_ID,NAME ,REFERENCE_ID,EXTERNAL_ID,PROJECT_ID,PROJECT_NAME,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,REC_DATETIME,ISSOFTDELETED) AS (SELECT R.REQUEST_SEVERITY_ID,R.NAME,R.REFERENCE_ID,R.EXTERNAL_ID,R.PROJECT_ID,P.NAME AS PROJECT_NAME,R.URL,R.EXTERNAL_KEY1,R.EXTERNAL_KEY2,R.SOURCE_ID,R.REC_DATETIME,R.ISSOFTDELETED FROM RIODS.REQUEST_SEVERITY R JOIN RIODS.PROJECT P ON P.PROJECT_ID=R.PROJECT_ID)
  4163. GO
  4164.  
  4165. CREATE VIEW RIDW.VW_REQUEST_RESOLUTION ( REQUEST_RESOLUTION_ID,NAME ,REFERENCE_ID,EXTERNAL_ID,PROJECT_ID,PROJECT_NAME,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,REC_DATETIME,ISSOFTDELETED) AS (SELECT R.REQUEST_RESOLUTION_ID,R.NAME,R.REFERENCE_ID,R.EXTERNAL_ID,R.PROJECT_ID,P.NAME AS PROJECT_NAME,R.URL,R.EXTERNAL_KEY1,R.EXTERNAL_KEY2,R.SOURCE_ID,R.REC_DATETIME,R.ISSOFTDELETED FROM RIODS.REQUEST_RESOLUTION R JOIN RIODS.PROJECT P ON P.PROJECT_ID=R.PROJECT_ID)
  4166. GO
  4167.  
  4168. CREATE VIEW RIDW.VW_REQUEST_TYPE ( REQUEST_TYPE_ID,NAME ,REFERENCE_ID,EXTERNAL_ID,PROJECT_ID,PROJECT_NAME,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,REC_DATETIME,ISSOFTDELETED) AS (SELECT R.REQUEST_TYPE_ID,R.NAME,R.REFERENCE_ID,R.EXTERNAL_ID,R.PROJECT_ID,P.NAME AS PROJECT_NAME,R.URL,R.EXTERNAL_KEY1,R.EXTERNAL_KEY2,R.SOURCE_ID,R.REC_DATETIME,R.ISSOFTDELETED FROM RIODS.REQUEST_TYPE R JOIN RIODS.PROJECT P ON P.PROJECT_ID=R.PROJECT_ID)
  4169. GO
  4170.  
  4171. CREATE VIEW RIDW.VW_ACTION_TYPE (ACTION_TYPE_ID,REFERENCE_ID,EXTERNAL_ID,NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS (SELECT ACTION_TYPE_ID,REFERENCE_ID,EXTERNAL_ID,NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED FROM RIASSET.ACTION_TYPE)
  4172. GO
  4173.  
  4174. CREATE VIEW RIDW.VW_ASSET_TYPE (ASSET_TYPE_ID, REFERENCE_ID,EXTERNAL_ID,NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS (SELECT ASSET_TYPE_ID,REFERENCE_ID,EXTERNAL_ID,NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED FROM RIASSET.ASSET_TYPE)
  4175. GO
  4176.  
  4177. CREATE VIEW RIDW.VW_ASSET (ASSET_ID, REFERENCE_ID,EXTERNAL_ID,NAME,PROJECT_ID,PROJECT_NAME,ASSET_TYPE_ID,ASSET_TYPE_NAME,VERSION,ASSET_STATE,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED,LAST_MODIFIED) AS (SELECT A.ASSET_ID,A.REFERENCE_ID,A.EXTERNAL_ID,A.NAME,A.PROJECT_ID,P.NAME AS PROJECT_NAME,A.ASSET_TYPE_ID,AA.NAME AS ASSET_TYPE_NAME,A.VERSION,A.ASSET_STATE,A.EXTERNAL_KEY1,A.EXTERNAL_KEY2,A.SOURCE_ID,A.URL,A.REC_DATETIME,A.ISSOFTDELETED,A.LAST_MODIFIED FROM RIASSET.ASSET A JOIN RIODS.PROJECT P ON P.PROJECT_ID=A.PROJECT_ID JOIN RIASSET.ASSET_TYPE AA ON AA.ASSET_TYPE_ID=A.ASSET_TYPE_ID)
  4178. GO
  4179.  
  4180. CREATE VIEW RIDW.VW_ASSET_HISTORY (HISTORY_ID,ASSET_ID,ASSET_NAME,ACTION_TYPE_ID,ACTION_TYPE_NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED,RESOURCE_ID,RESOURCE_NAME,ACTION_DATE) AS (SELECT H.HISTORY_ID,H.ASSET_ID,A.NAME AS ASSET_NAME,H.ACTION_TYPE_ID,AC.NAME AS ACTION_TYPE_NAME,H.EXTERNAL_KEY1,H.EXTERNAL_KEY2,H.SOURCE_ID,H.URL,H.REC_DATETIME,H.ISSOFTDELETED,H.RESOURCE_ID,R.FULL_NAME AS RESOURCE_NAME,H.ACTION_DATE FROM RIASSET.ASSET_HISTORY H JOIN RIASSET.ASSET A ON A.ASSET_ID=H.ASSET_ID JOIN RIASSET.ACTION_TYPE AC ON AC.ACTION_TYPE_ID=H.ACTION_TYPE_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=H.RESOURCE_ID)
  4181. GO
  4182.  
  4183. CREATE VIEW RIDW.VW_ASSET_LOOKUP (PRED_ASSET_ID,PRED_ASSET_NAME,SUCC_ASSET_ID,SUCC_ASSET_NAME,LINK_TYPE) AS (SELECT A.PRED_ASSET_ID,P.NAME AS PRED_ASSET_NAME,A.SUCC_ASSET_ID,S.NAME AS SUCC_ASSET_NAME,A.LINK_TYPE FROM RIASSET.ASSET_LOOKUP A JOIN RIASSET.ASSET P ON P.ASSET_ID=A.PRED_ASSET_ID JOIN RIASSET.ASSET S ON S.ASSET_ID=A.SUCC_ASSET_ID)
  4184. GO
  4185.  
  4186. CREATE VIEW RIDW.VW_ASSET_REQUEST_LOOKUP (ASSET_ID,ASSET_NAME,REQUEST_ID,REQUEST_NAME,LINK_TYPE) AS (SELECT A.ASSET_ID,AST.NAME AS ASSET_NAME,A.REQUEST_ID,R.NAME AS REQUEST_NAME,A.LINK_TYPE FROM RIASSET.ASSET_REQUEST_LOOKUP A JOIN RIASSET.ASSET AST ON AST.ASSET_ID=A.ASSET_ID JOIN RIODS.REQUEST R ON R.REQUEST_ID=A.REQUEST_ID)
  4187. GO
  4188.  
  4189. CREATE VIEW RIDW.VW_ASSET_REQUIREMENT_LOOKUP (ASSET_ID,ASSET_NAME,REQUIREMENT_ID,REQUIREMENT_NAME,LINK_TYPE) AS (SELECT A.ASSET_ID,AST.NAME AS ASSET_NAME,A.REQUIREMENT_ID,R.NAME AS REQUIREMENT_NAME,A.LINK_TYPE FROM RIASSET.ASSET_REQUIREMENT_LOOKUP A JOIN RIASSET.ASSET AST ON AST.ASSET_ID=A.ASSET_ID JOIN RIODS.REQUIREMENT R ON R.REQUIREMENT_ID=A.REQUIREMENT_ID)
  4190. GO
  4191.  
  4192. CREATE VIEW RIDW.VW_ASSET_RESOURCE_LOOKUP (ASSET_ID,ASSET_NAME,OWNER_ID,OWNER_NAME) AS (SELECT A.ASSET_ID,AST.NAME AS ASSET_NAME,A.OWNER_ID,R.FULL_NAME AS OWNER_NAME FROM RIASSET.ASSET_RESOURCE_LOOKUP A JOIN RIASSET.ASSET AST ON AST.ASSET_ID=A.ASSET_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=A.OWNER_ID)
  4193. GO
  4194.  
  4195. CREATE VIEW RIDW.VW_ASSET_ROLE (ASSET_ROLE_ID,REFERENCE_ID,EXTERNAL_ID,NAME,PROJECT_ID,PROJECT_NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS (SELECT A.ASSET_ROLE_ID,A.REFERENCE_ID,A.EXTERNAL_ID,A.NAME,A.PROJECT_ID,P.NAME AS PROJECT_NAME,A.EXTERNAL_KEY1,A.EXTERNAL_KEY2,A.SOURCE_ID,A.URL,A.REC_DATETIME,A.ISSOFTDELETED FROM RIASSET.ASSET_ROLE A JOIN RIODS.PROJECT P ON P.PROJECT_ID=A.PROJECT_ID)
  4196. GO
  4197.  
  4198. CREATE VIEW RIDW.VW_ASSET_ROLE_ASSIGN_HISTORY (HISTORY_ID,ASSET_ROLE_ID,ASSET_ROLE_NAME,PROJECT_ID,PROJECT_NAME,TEAM_ID,TEAM_NAME,ASSIGNEE_ID,ASSIGNEE_NAME,ASSIGNER_ID,ASSIGNER_NAME,ACTION_TYPE_ID,ACTION_TYPE_NAME,ASSIGNMENT_DATE,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS (SELECT H.HISTORY_ID,H.ASSET_ROLE_ID,AR.NAME AS ASSET_ROLE_NAME,H.PROJECT_ID,P.NAME AS PROJECT_NAME,H.TEAM_ID,T.NAME AS TEAM_NAME,H.ASSIGNEE_ID,R.FULL_NAME AS ASSIGNEE_NAME,H.ASSIGNER_ID,R2.FULL_NAME AS ASSIGNER_NAME,H.ACTION_TYPE_ID,AC.NAME AS ACTION_TYPE_NAME,H.ASSIGNMENT_DATE,H.EXTERNAL_KEY1,H.EXTERNAL_KEY2,H.SOURCE_ID,H.URL,H.REC_DATETIME,H.ISSOFTDELETED FROM RIASSET.ASSET_ROLE_ASSIGNMENT_HISTORY H JOIN RIASSET.ASSET_ROLE AR ON AR.ASSET_ROLE_ID=H.ASSET_ROLE_ID JOIN RIODS.PROJECT P ON P.PROJECT_ID=H.PROJECT_ID JOIN RIODS.TEAM T ON T.TEAM_ID=H.TEAM_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=H.ASSIGNEE_ID JOIN RIODS.RESOURCE R2 ON R2.RESOURCE_ID=H.ASSIGNER_ID JOIN RIASSET.ACTION_TYPE
  4199. AC ON AC.ACTION_TYPE_ID=H.ACTION_TYPE_ID)
  4200. GO
  4201.  
  4202. CREATE VIEW RIDW.VW_ASSET_ROLE_ENTITLE_LOOKUP (ASSET_ROLE_ID,ASSET_ROLE_NAME,ENTITLEMENT_ID,ENTITLEMENT_NAME) AS (SELECT A.ASSET_ROLE_ID,AR.NAME AS ASSET_ROLE_NAME,A.ENTITLEMENT_ID,E.NAME AS ENTITLEMENT_NAME FROM RIASSET.ASSET_ROLE_ENTITLEMENT_LOOKUP A JOIN RIASSET.ASSET_ROLE AR ON AR.ASSET_ROLE_ID=A.ASSET_ROLE_ID JOIN RIASSET.ENTITLEMENT E ON E.ENTITLEMENT_ID=A.ENTITLEMENT_ID)
  4203. GO
  4204.  
  4205. CREATE VIEW RIDW.VW_ASSET_ROLE_RESOURCE_LOOKUP (ASSET_ROLE_ID,ASSET_ROLE_NAME,RESOURCE_ID,RESOURCE_NAME) AS (SELECT A.ASSET_ROLE_ID,AR.NAME AS ASSET_ROLE_NAME,A.RESOURCE_ID,R.FULL_NAME AS RESOURCE_NAME FROM RIASSET.ASSET_ROLE_RESOURCE_LOOKUP A JOIN RIASSET.ASSET_ROLE AR ON AR.ASSET_ROLE_ID=A.ASSET_ROLE_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=A.RESOURCE_ID)
  4206. GO
  4207.  
  4208. CREATE VIEW RIDW.VW_ASSET_ROLE_TEAM_LOOKUP (ASSET_ROLE_ID,ASSET_ROLE_NAME,TEAM_ID,TEAM_NAME) AS (SELECT A.ASSET_ROLE_ID,AR.NAME AS ASSET_ROLE_NAME,A.TEAM_ID,T.NAME AS TEAM_NAME FROM RIASSET.ASSET_ROLE_TEAM_LOOKUP A JOIN RIASSET.ASSET_ROLE AR ON AR.ASSET_ROLE_ID=A.ASSET_ROLE_ID JOIN RIODS.TEAM T ON T.TEAM_ID=A.TEAM_ID)
  4209. GO
  4210.  
  4211. CREATE VIEW RIDW.VW_ASSET_TESTCASE_LOOKUP (ASSET_ID,ASSET_NAME,TESTCASE_ID,TESTCASE_NAME,LINK_TYPE) AS (SELECT A.ASSET_ID,AST.NAME AS ASSET_NAME,A.TESTCASE_ID,T.NAME AS TESTCASE_NAME,LINK_TYPE FROM RIASSET.ASSET_TESTCASE_LOOKUP A JOIN RIASSET.ASSET AST ON AST.ASSET_ID=A.ASSET_ID JOIN RIODS.TESTCASE T ON T.TESTCASE_ID=A.TESTCASE_ID)
  4212. GO
  4213.  
  4214. CREATE VIEW RIDW.VW_ASSET_TESTPLAN_LOOKUP (ASSET_ID,ASSET_NAME,TESTPLAN_ID,TESTPLAN_NAME,LINK_TYPE) AS (SELECT A.ASSET_ID,AST.NAME AS ASSET_NAME,A.TESTPLAN_ID,T.NAME AS TESTPLAN_NAME,A.LINK_TYPE FROM RIASSET.ASSET_TESTPLAN_LOOKUP A JOIN RIASSET.ASSET AST ON AST.ASSET_ID=A.ASSET_ID JOIN RIODS.TESTPLAN T ON T.TESTPLAN_ID=A.TESTPLAN_ID)
  4215. GO
  4216.  
  4217. CREATE VIEW RIDW.VW_ENTITLEMENT (ENTITLEMENT_ID,REFERENCE_ID,EXTERNAL_ID,NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS (SELECT ENTITLEMENT_ID,REFERENCE_ID,EXTERNAL_ID,NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED FROM RIASSET.ENTITLEMENT)
  4218. GO
  4219.  
  4220. CREATE VIEW RIDW.VW_ENTITLEMENT_HISTORY (HISTORY_ID,ASSET_ROLE_ID,ASSET_ROLE_NAME,ACTION_TYPE_ID,ACTION_TYPE_NAME,CHANGE_DATE,RESOURCE_ID,RESOURCE_NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS (SELECT H.HISTORY_ID,H.ASSET_ROLE_ID,AR.NAME AS ASSET_ROLE_NAME,H.ACTION_TYPE_ID,AC.NAME AS ACTION_TYPE_NAME,H.CHANGE_DATE,H.RESOURCE_ID,R.FULL_NAME AS RESOURCE_NAME,H.EXTERNAL_KEY1,H.EXTERNAL_KEY2,H.SOURCE_ID,H.URL,H.REC_DATETIME,H.ISSOFTDELETED FROM RIASSET.ENTITLEMENT_HISTORY H JOIN RIASSET.ASSET_ROLE AR ON AR.ASSET_ROLE_ID=H.ASSET_ROLE_ID JOIN RIASSET.ACTION_TYPE AC ON AC.ACTION_TYPE_ID=H.ACTION_TYPE_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=H.RESOURCE_ID)
  4221. GO
  4222.  
  4223. CREATE VIEW RIDW.VW_ENTITLEMENT_HISTORY_LOOKUP (HISTORY_ID,ENTITLEMENT_ID,ENTITLEMENT_NAME,ENTITLEMENT_TYPE) AS (SELECT H.HISTORY_ID,H.ENTITLEMENT_ID,E.NAME AS ENTITLEMENT_NAME,H.ENTITLEMENT_TYPE FROM RIASSET.ENTITLEMENT_HISTORY_LOOKUP H JOIN RIASSET.ENTITLEMENT E ON E.ENTITLEMENT_ID=H.ENTITLEMENT_ID)
  4224. GO
  4225.  
  4226. CREATE VIEW RIDW.VW_LICENSE_HISTORY (HISTORY_ID,ASSET_ID,ASSET_NAME,ACTION_TYPE_ID,ACTION_TYPE_NAME,USAGE_DATE,RESOURCE_ID,RESOURCE_NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS (SELECT H.HISTORY_ID,H.ASSET_ID,A.NAME AS ASSET_NAME,H.ACTION_TYPE_ID,AC.NAME AS ACTION_TYPE_NAME,H.USAGE_DATE,H.RESOURCE_ID,R.FULL_NAME AS RESOURCE_NAME,H.EXTERNAL_KEY1,H.EXTERNAL_KEY2,H.SOURCE_ID,H.URL,H.REC_DATETIME,H.ISSOFTDELETED FROM RIASSET.LICENSE_HISTORY H JOIN RIASSET.ASSET A ON A.ASSET_ID=H.ASSET_ID JOIN RIASSET.ACTION_TYPE AC ON AC.ACTION_TYPE_ID=H.ACTION_TYPE_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=H.RESOURCE_ID)
  4227. GO
  4228.  
  4229. CREATE VIEW RIDW.VW_ANSWER (ANSWER_ID,REFERENCE_ID,EXTERNAL_ID,NAME,QUESTION_ID,QUESTION_NAME, BALLOT_ID,BALLOT_NAME,BALLOT_TAB_ID,BALLOT_TAB_NAME,VALUE,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS (SELECT A.ANSWER_ID,A.REFERENCE_ID,A.EXTERNAL_ID,A.NAME,A.QUESTION_ID,Q.NAME AS QUESTION_NAME,A.BALLOT_ID,B.NAME AS BALLOT_NAME,A.BALLOT_TAB_ID,BA.NAME AS BALLOT_TAB_NAME,A.VALUE,A.EXTERNAL_KEY1,A.EXTERNAL_KEY2,A.SOURCE_ID,A.URL,A.REC_DATETIME,A.ISSOFTDELETED FROM RISCHK.ANSWER A JOIN RISCHK.QUESTION Q ON Q.QUESTION_ID=A.QUESTION_ID JOIN RISCHK.BALLOT B ON B.BALLOT_ID=A.BALLOT_ID JOIN RISCHK.BALLOT_TAB BA ON BA.BALLOT_TAB_ID=A.BALLOT_TAB_ID)
  4230. GO
  4231.  
  4232. CREATE VIEW RIDW.VW_BALLOT (BALLOT_ID,REFERENCE_ID,EXTERNAL_ID,NAME,SESSION_ID,SESSION_NAME,STATUS,SUBMISSIONTIME,SUBMITTER_ID,SUBMITTER_NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS (SELECT B.BALLOT_ID,B.REFERENCE_ID,B.EXTERNAL_ID,B.NAME,B.SESSION_ID,S.NAME AS SESSION_NAME,B.STATUS,B.SUBMISSIONTIME,B.SUBMITTER_ID,R.FULL_NAME AS SUBMITTER_NAME,B.EXTERNAL_KEY1,B.EXTERNAL_KEY2,B.SOURCE_ID,B.URL,B.REC_DATETIME,B.ISSOFTDELETED FROM RISCHK.BALLOT B JOIN RISCHK.SC_SESSION S ON S.SESSION_ID=B.SESSION_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=B.SUBMITTER_ID)
  4233. GO
  4234.  
  4235. CREATE VIEW RIDW.VW_BALLOTDEF_BALLOT_TAB_LOOKUP (BALLOT_DEFINITION_ID,BALLOT_DEFINITION_NAME,BALLOT_TAB_ID,BALLOT_TAB_NAME) AS (SELECT B.BALLOT_DEFINITION_ID,BD.NAME AS BALLOT_DEFINITION_NAME,B.BALLOT_TAB_ID,BT.NAME AS BALLOT_TAB_NAME FROM RISCHK.BALLOTDEF_BALLOT_TAB_LOOKUP B JOIN RISCHK.BALLOT_DEFINITION BD ON BD.BALLOT_DEFINITION_ID=B.BALLOT_DEFINITION_ID JOIN RISCHK.BALLOT_TAB BT ON BT.BALLOT_TAB_ID=B.BALLOT_TAB_ID)
  4236. GO
  4237.  
  4238. CREATE VIEW RIDW.VW_BALLOT_DEFINITION (BALLOT_DEFINITION_ID,REFERENCE_ID,EXTERNAL_ID,NAME,SCALE_ID,SCALE_NAME,DESCRIPTION,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS (SELECT B.BALLOT_DEFINITION_ID,B.REFERENCE_ID,B.EXTERNAL_ID,B.NAME,B.SCALE_ID,S.NAME AS SCALE_NAME,B.DESCRIPTION,B.EXTERNAL_KEY1,B.EXTERNAL_KEY2,B.SOURCE_ID,B.URL,B.REC_DATETIME,B.ISSOFTDELETED FROM RISCHK.BALLOT_DEFINITION B JOIN RISCHK.SC_SCALE S ON S.SCALE_ID=B.SCALE_ID)
  4239. GO
  4240.  
  4241. CREATE VIEW RIDW.VW_BALLOT_TAB (BALLOT_TAB_ID,REFERENCE_ID,EXTERNAL_ID,NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS (SELECT BALLOT_TAB_ID,REFERENCE_ID,EXTERNAL_ID,NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED FROM RISCHK.BALLOT_TAB)
  4242. GO
  4243.  
  4244. CREATE VIEW RIDW.VW_BALLOT_TAB_QUESTION_LOOKUP (BALLOT_TAB_ID,BALLOT_TAB_NAME,QUESTION_ID,QUESTION_NAME,QUESTION_ORDER) AS (SELECT B.BALLOT_TAB_ID,BT.NAME AS BALLOT_TAB_NAME,B.QUESTION_ID,Q.NAME AS QUESTION_NAME,B.QUESTION_ORDER FROM RISCHK.BALLOT_TAB_QUESTION_LOOKUP B JOIN RISCHK.BALLOT_TAB BT ON BT.BALLOT_TAB_ID=B.BALLOT_TAB_ID JOIN RISCHK.QUESTION Q ON Q.QUESTION_ID=B.QUESTION_ID)
  4245. GO
  4246.  
  4247. CREATE VIEW RIDW.VW_QUESTION (QUESTION_ID,REFERENCE_ID,EXTERNAL_ID,NAME,SCALE_ID,DESCRIPTION,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS (SELECT QUESTION_ID,REFERENCE_ID,EXTERNAL_ID,NAME,SCALE_ID,DESCRIPTION,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED FROM RISCHK.QUESTION)
  4248. GO
  4249.  
  4250. CREATE VIEW RIDW.VW_SCSESSION_COFACILIT_LOOKUP (SESSION_ID,SESSION_NAME,FACILITATOR_ID,FACILITATOR_NAME) AS (SELECT S.SESSION_ID,SE.NAME AS SESSION_NAME,S.FACILITATOR_ID,R.FULL_NAME AS FACILITATOR_NAME FROM RISCHK.SCSESSION_COFACILIT_LOOKUP S JOIN RISCHK.SC_SESSION SE ON SE.SESSION_ID=S.SESSION_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=S.FACILITATOR_ID)
  4251. GO
  4252.  
  4253. CREATE VIEW RIDW.VW_SESSION_PARTICIPANT_LOOKUP (SESSION_ID,SESSION_NAME,PARTICIPANT_ID,PARTICIPANT_NAME) AS (SELECT S.SESSION_ID,SE.NAME AS SESSION_NAME,S.PARTICIPANT_ID,R.FULL_NAME AS PARTICIPANT_NAME FROM RISCHK.SCSESSION_PARTICIPANT_LOOKUP S JOIN RISCHK.SC_SESSION SE ON SE.SESSION_ID=S.SESSION_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=S.PARTICIPANT_ID)
  4254. GO
  4255.  
  4256. CREATE VIEW RIDW.VW_SC_BALLOT_TAB_RESULT (RESULT_ID,REFERENCE_ID,EXTERNAL_ID,NAME,SESSION_ID,BALLOT_TAB_ID,BALLOT_TAB_NAME,STANDARD_DEV_VALUE,AVERAGE_VALUE,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS (SELECT R.RESULT_ID,R.REFERENCE_ID,R.EXTERNAL_ID,R.NAME,R.SESSION_ID,R.BALLOT_TAB_ID,BT.NAME AS BALLOT_TAB_NAME,R.STANDARD_DEV_VALUE,R.AVERAGE_VALUE,R.EXTERNAL_KEY1,R.EXTERNAL_KEY2,R.SOURCE_ID,R.URL,R.REC_DATETIME,R.ISSOFTDELETED FROM RISCHK.SC_BALLOT_TAB_RESULT R JOIN RISCHK.BALLOT_TAB BT ON BT.BALLOT_TAB_ID=R.BALLOT_TAB_ID)
  4257. GO
  4258.  
  4259. CREATE VIEW RIDW.VW_SC_SCALE (SCALE_ID,REFERENCE_ID,EXTERNAL_ID,NAME,TRUE_VALUE_DISPLAY,FALSE_VALUE_DISPLAY,INT_START_VALUE,INT_END_VALUE,DEC_START_VALUE,DEC_END_VALUE,PRECISION_VALUE,TALKTHRESHOLDAVG,TALKTHRESHOLDDEV,TYPE,LENGTH,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS (SELECT SCALE_ID,REFERENCE_ID,EXTERNAL_ID,NAME,TRUE_VALUE_DISPLAY,FALSE_VALUE_DISPLAY,INT_START_VALUE,INT_END_VALUE,DEC_START_VALUE,DEC_END_VALUE,PRECISION_VALUE,TALKTHRESHOLDAVG,TALKTHRESHOLDDEV,TYPE,LENGTH,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED FROM RISCHK.SC_SCALE)
  4260. GO
  4261.  
  4262. CREATE VIEW RIDW.VW_SC_SESSION (SESSION_ID,REFERENCE_ID,EXTERNAL_ID,NAME,BALLOT_DEFINITION_ID,BALLOT_DEFINITION_NAME,TEAM_ID,TEAM_NAME,PROJECT_ID,PROJECT_NAME,STATUS,SESSION_DATE,BALLOT_COUNT,BALLOT_SUBMITTED,DESCRIPTION,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS (SELECT S.SESSION_ID,S.REFERENCE_ID,S.EXTERNAL_ID,S.NAME,S.BALLOT_DEFINITION_ID,B.NAME AS BALLOT_DEFINITION_NAME,S.TEAM_ID,T.NAME AS TEAM_NAME,S.PROJECT_ID,P.NAME AS PROJECT_NAME,S.STATUS,S.SESSION_DATE,S.BALLOT_COUNT,S.BALLOT_SUBMITTED,S.DESCRIPTION,S.EXTERNAL_KEY1,S.EXTERNAL_KEY2,S.SOURCE_ID,S.URL,S.REC_DATETIME,S.ISSOFTDELETED FROM RISCHK.SC_SESSION S JOIN RIODS.PROJECT P ON P.PROJECT_ID=S.PROJECT_ID JOIN RIODS.TEAM T ON T.TEAM_ID=S.TEAM_ID JOIN RISCHK.BALLOT_DEFINITION B ON B.BALLOT_DEFINITION_ID=S.BALLOT_DEFINITION_ID)
  4263. GO
  4264.  
  4265. CREATE VIEW RIDW.VW_PROJECT_RESOURCE_LOOKUP(PROJECT_ID,PROJECT_NAME,RESOURCE_ID,RESOURCE_NAME) AS (SELECT PR.PROJECT_ID,P.NAME AS PROJECT_NAME,PR.RESOURCE_ID,CASE WHEN R.REFERENCE_ID IS NOT NULL THEN R.REFERENCE_ID ELSE R.FULL_NAME END AS RESOURCE_NAME FROM RIODS.PROJECT_RESOURCE_LOOKUP PR JOIN RIODS.PROJECT P ON P.PROJECT_ID=PR.PROJECT_ID JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=PR.RESOURCE_ID)
  4266. GO
  4267.  
  4268. CREATE VIEW RIDW.VW_RISK_REQUEST_LOOKUP(RISK_ID,RISK_NAME,REQUEST_ID,REQUEST_NAME) AS (SELECT PR.RISK_ID,P.NAME AS RISK_NAME,PR.REQUEST_ID,R.NAME AS REQUEST_NAME FROM RIODS.RISK_REQUEST_LOOKUP PR JOIN RIODS.RISK P ON P.RISK_ID=PR.RISK_ID JOIN RIODS.REQUEST R ON R.REQUEST_ID=PR.REQUEST_ID)
  4269. GO
  4270.  
  4271. CREATE VIEW RIDW.VW_TESTSUITE_CATEGORY_LOOKUP(TESTSUITE_ID,TESTSUITE_NAME,TEST_CATEGORY_ID,TEST_CATEGORY_NAME) AS (SELECT TC.TESTSUITE_ID,T.NAME AS TESTSUITE_NAME, TC.TEST_CATEGORY_ID,C.NAME AS TEST_CATEGORY_NAME FROM RIODS.TESTSUITE_CATEGORY_LOOKUP TC JOIN RIODS.TESTSUITE T ON T.TESTSUITE_ID=TC.TESTSUITE_ID JOIN RIODS.TEST_CATEGORY C ON C.TEST_CATEGORY_ID=TC.TEST_CATEGORY_ID)
  4272. GO
  4273.  
  4274. CREATE VIEW RIDW.VW_TESTSUITE_TESTPLAN_LOOKUP(TESTSUITE_ID,TESTSUITE_NAME,TESTPLAN_ID,TESTPLAN_NAME) AS (SELECT TC.TESTSUITE_ID,T.NAME AS TESTSUITE_NAME, TC.TESTPLAN_ID,C.NAME AS TESTPLAN_NAME FROM RIODS.TESTSUITE_TESTPLAN_LOOKUP TC JOIN RIODS.TESTSUITE T ON T.TESTSUITE_ID=TC.TESTSUITE_ID JOIN RIODS.TESTPLAN C ON C.TESTPLAN_ID=TC.TESTPLAN_ID)
  4275. GO
  4276.  
  4277. CREATE VIEW RIDW.VW_TESTSUITE_EXECUTION_RECORD (TESTSUITE_EXECRECORD_ID,REFERENCE_ID,EXTERNAL_ID,NAME ,PROJECT_ID,PROJECT_NAME,CREATOR_ID,CREATOR_NAME,OWNER_ID,OWNER_NAME,TESTSUITE_ID,TESTSUITE_NAME,TESTPLAN_ID,TESTPLAN_NAME,ITERATION_ID,ITERATION_NAME,CONFIGURATION_ID,CONFIGURATION_NAME,CURRENT_SUITELOG_ID,CURRENT_SUITELOG_NAME,WEIGHT,CREATION_DATE,LAST_UPDATED,ISSEQUENTIAL, TEST_PRIORITY_ID,TEST_PRIORITY_NAME,TEST_PRIORITY_EXTERNAL_ID,TEST_PRIORITY_REFERENCE_ID,ESTIMATE,TIMESPENT,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS ( SELECT TSER.TESTSUITE_EXECRECORD_ID,TSER.REFERENCE_ID,TSER.EXTERNAL_ID,TSER.NAME ,TSER.PROJECT_ID,P.NAME AS PROJECT_NAME,TSER.CREATOR_ID,R1.FULL_NAME AS CREATOR_NAME,TSER.OWNER_ID,R2.FULL_NAME AS OWNER_NAME,TSER.TESTSUITE_ID,TS.NAME AS TESTSUITE_NAME,TSER.TESTPLAN_ID,TP.NAME AS TESTPLAN_NAME,TSER.ITERATION_ID,I.NAME AS ITERATION_NAME,TSER.CONFIGURATION_ID,C.NAME AS CONFIGURATION_NAME,TSER.CURRENT_SUITELOG_ID,TL.NAME AS CURRENT_SUITELOG_NAME,TSER.WEIGHT,TSER.CREATION_DATE,TSER.LAST_UPDATED,TSER.ISSEQUENTIAL,
  4278. TSER.TEST_PRIORITY_ID,PT.NAME AS TEST_PRIORITY_NAME,PT.EXTERNAL_ID AS TEST_PRIORITY_EXTERNAL_ID,PT.REFERENCE_ID AS TEST_PRIORITY_REFERENCE_ID,TSER.ESTIMATE,TSER.TIMESPENT, TSER.EXTERNAL_KEY1,TSER.EXTERNAL_KEY2,TSER.SOURCE_ID,TSER.URL,TSER.REC_DATETIME,TSER.ISSOFTDELETED FROM RIODS.TESTSUITE_EXECUTION_RECORD TSER JOIN RIODS.RESOURCE R1 ON R1.RESOURCE_ID=TSER.CREATOR_ID JOIN RIODS.RESOURCE R2 ON R2.RESOURCE_ID=TSER.OWNER_ID JOIN RIODS.TESTSUITE TS ON TS.TESTSUITE_ID=TSER.TESTSUITE_ID JOIN RIODS.TESTPLAN TP ON TP.TESTPLAN_ID=TSER.TESTPLAN_ID JOIN RIODS.ITERATION I ON I.ITERATION_ID=TSER.ITERATION_ID JOIN RIODS.CONFIGURATION C ON C.CONFIGURATION_ID=TSER.CONFIGURATION_ID JOIN RIODS.TESTSUITELOG TL ON TL.TESTSUITELOG_ID=TSER.CURRENT_SUITELOG_ID JOIN RIODS.PROJECT P ON P.PROJECT_ID=TSER.PROJECT_ID JOIN RIODS.TEST_PRIORITY PT ON PT.TEST_PRIORITY_ID=TSER.TEST_PRIORITY_ID)
  4279. GO
  4280.  
  4281. CREATE VIEW RIDW.VW_EXECWORKITEM_REQUEST_LOOKUP (EXECWORKITEM_ID, EXECUTION_WORKITEM_NAME, REQUEST_ID, REQUEST_NAME, LINK_TYPE) AS (SELECT CI.EXECWORKITEM_ID, C.NAME AS EXECUTION_WORKITEM_NAME, CI.REQUEST_ID, I.NAME AS REQUEST_NAME, CI.LINK_TYPE FROM RIODS.EXECWORKITEM_REQUEST_LOOKUP CI JOIN RIODS.EXECUTION_WORKITEM C ON C.EXECWORKITEM_ID=CI.EXECWORKITEM_ID JOIN RIODS.REQUEST I ON I.REQUEST_ID=CI.REQUEST_ID)
  4282. GO
  4283.  
  4284. CREATE VIEW RIDW.VW_EXECUTION_STEP_RESULT (EXECUTION_STEP_RESULT_ID,REFERENCE_ID,EXTERNAL_ID,NAME,EXECUTION_RESULT_ID,EXECUTION_RESULT_NAME,STEP_TYPE,DESCRIPTION,EXPECTED_RESULT,ACTUAL_RESULT,RESULT,START_TIME,END_TIME,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS (SELECT E.EXECUTION_STEP_RESULT_ID,E.REFERENCE_ID,E.EXTERNAL_ID,E.NAME,E.EXECUTION_RESULT_ID,S.NAME AS EXECUTION_RESULT_NAME,E.STEP_TYPE,E.DESCRIPTION,E.EXPECTED_RESULT,E.ACTUAL_RESULT,E.RESULT,E.START_TIME,E.END_TIME,E.EXTERNAL_KEY1,E.EXTERNAL_KEY2,E.SOURCE_ID,E.URL,E.REC_DATETIME,E.ISSOFTDELETED FROM RIODS.EXECUTION_STEP_RESULT E JOIN RIODS.EXECUTION_RESULT S ON S.EXECUTION_RESULT_ID=E.EXECUTION_RESULT_ID)
  4285. GO
  4286.  
  4287. CREATE VIEW RIDW.VW_EXECSTEPRES_REQUEST_LOOKUP (EXECUTION_STEP_RESULT_ID, EXECUTION_STEP_RESULT_NAME, REQUEST_ID, REQUEST_NAME, LINK_TYPE) AS (SELECT CI.EXECUTION_STEP_RESULT_ID, C.NAME AS EXECUTION_STEP_RESULT_NAME, CI.REQUEST_ID, I.NAME AS REQUEST_NAME, CI.LINK_TYPE FROM RIODS.EXECSTEPRES_REQUEST_LOOKUP CI JOIN RIODS.EXECUTION_STEP_RESULT C ON C.EXECUTION_STEP_RESULT_ID=CI.EXECUTION_STEP_RESULT_ID JOIN RIODS.REQUEST I ON I.REQUEST_ID=CI.REQUEST_ID)
  4288. GO
  4289.  
  4290. CREATE VIEW RIDW.VW_TESTSUITE_ELEMENT (TESTSUITE_ELEMENT_ID ,REFERENCE_ID,EXTERNAL_ID,NAME,TESTSUITE_ID ,TESTSUITE_NAME,TESTCASE_ID,TESTCASE_NAME,CONFIGURATION_ID,CONFIGURATION_NAME,TESTSCRIPT_ID,TESTSCRIPT_NAME,ELEMENT_INDEX,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED,OWNER_ID,OWNER_NAME) AS (SELECT TE.TESTSUITE_ELEMENT_ID ,TE.REFERENCE_ID,TE.EXTERNAL_ID,TE.NAME,TE.TESTSUITE_ID ,TS.NAME AS TESTSUITE_NAME,TE.TESTCASE_ID,TC.NAME AS TESTCASE_NAME, TE.CONFIGURATION_ID,C.NAME AS CONFIGURATION_NAME,TE.TESTSCRIPT_ID,TR.NAME AS TESTSCRIPT_NAME,TE.ELEMENT_INDEX,TE.EXTERNAL_KEY1,TE.EXTERNAL_KEY2,TE.SOURCE_ID,TE.URL,TE.REC_DATETIME,TE.ISSOFTDELETED, TE.OWNER_ID,R.FULL_NAME AS OWNER_NAME FROM RIODS.TESTSUITE_ELEMENT TE JOIN RIODS.TESTCASE TC ON TC.TESTCASE_ID=TE.TESTCASE_ID JOIN RIODS.CONFIGURATION C ON C.CONFIGURATION_ID=TE.CONFIGURATION_ID JOIN RIODS.TESTSUITE TS ON TS.TESTSUITE_ID=TE.TESTSUITE_ID JOIN RIODS.TESTSCRIPT TR ON TR.TESTSCRIPT_ID=TE.TESTSCRIPT_ID
  4291. JOIN RIODS.RESOURCE R ON R.RESOURCE_ID=TE.OWNER_ID)
  4292. GO
  4293.  
  4294. CREATE VIEW RIDW.VW_REQUIREMENT_LINK_TYPE (LINK_TYPE_ID,REFERENCE_ID,EXTERNAL_ID,NAME,PROJECT_ID,PROJECT_NAME,PRED_REQUIREMENT_LINK_LABEL,SUCC_REQUIREMENT_LINK_LABEL,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS (SELECT L.LINK_TYPE_ID,L.REFERENCE_ID,L.EXTERNAL_ID,L.NAME,L.PROJECT_ID,P.NAME AS PROJECT_NAME,L.PRED_REQUIREMENT_LINK_LABEL,L.SUCC_REQUIREMENT_LINK_LABEL,L.EXTERNAL_KEY1,L.EXTERNAL_KEY2,L.SOURCE_ID,L.URL,L.REC_DATETIME,L.ISSOFTDELETED FROM RIODS.REQUIREMENT_LINK_TYPE L JOIN RIODS.PROJECT P ON P.PROJECT_ID =L.PROJECT_ID)
  4295. GO
  4296.  
  4297. CREATE VIEW RIDW.VW_REQUEST_RELATIONAL_LINK (REQUEST_RELATION_ID, NAME, REFERENCE_ID, EXTERNAL_ID, REQUEST1_ID, REQUEST1_NAME, REQUEST2_ID, REQUEST2_NAME, URL, EXTERNAL_KEY1, EXTERNAL_KEY2, SOURCE_ID, REC_DATETIME, ISSOFTDELETED) AS (SELECT REQU.REQUEST_RELATION_ID, REQU.NAME, REQU.REFERENCE_ID, REQU.EXTERNAL_ID, REQU.REQUEST1_ID, R.NAME AS REQUEST1_NAME, REQU.REQUEST2_ID, R1.NAME AS REQUEST2_NAME, REQU.URL, REQU.EXTERNAL_KEY1, REQU.EXTERNAL_KEY2, REQU.SOURCE_ID, REQU.REC_DATETIME, REQU.ISSOFTDELETED FROM RIODS.REQUEST_RELATIONAL_LINK REQU JOIN RIODS.REQUEST R ON R.REQUEST_ID = REQU.REQUEST1_ID JOIN RIODS.REQUEST R1 ON R1.REQUEST_ID = REQU.REQUEST2_ID)
  4298. GO
  4299.  
  4300. CREATE VIEW RIDW.VW_ASSET_ATTRIBUTE(ASSET_ATTRIBUTE_ID,REFERENCE_ID,EXTERNAL_ID,NAME,ASSET_ID,ASSET_NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS (SELECT A.ASSET_ATTRIBUTE_ID,A.REFERENCE_ID,A.EXTERNAL_ID,A.NAME,A.ASSET_ID,AA.NAME AS ASSET_NAME,A.EXTERNAL_KEY1,A.EXTERNAL_KEY2,A.SOURCE_ID,A.URL,A.REC_DATETIME,A.ISSOFTDELETED FROM RIASSET.ASSET_ATTRIBUTE A JOIN RIASSET.ASSET AA ON AA.ASSET_ID=A.ASSET_ID)
  4301. GO
  4302.  
  4303. CREATE VIEW RIDW.VW_ASSET_ATTRIBUTE_VALUE (ASSET_ATTRIBUTE_VALUE_ID,REFERENCE_ID,EXTERNAL_ID,NAME,ASSET_ATTRIBUTE_ID,ASSET_ATTRIBUTE_NAME,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME,ISSOFTDELETED) AS (SELECT V.ASSET_ATTRIBUTE_VALUE_ID,V.REFERENCE_ID,V.EXTERNAL_ID,V.NAME,V.ASSET_ATTRIBUTE_ID,A.NAME AS ASSET_ATTRIBUTE_NAME,V.EXTERNAL_KEY1,V.EXTERNAL_KEY2,V.SOURCE_ID,V.URL,V.REC_DATETIME,V.ISSOFTDELETED FROM RIASSET.ASSET_ATTRIBUTE_VALUE V JOIN RIASSET.ASSET_ATTRIBUTE A ON A.ASSET_ATTRIBUTE_ID=V.ASSET_ATTRIBUTE_ID)
  4304. GO
  4305.  
  4306. CREATE VIEW RIDW.VW_ASSET_CATEGORY ( ASSET_CATEGORY_ID,REFERENCE_ID,EXTERNAL_ID,NAME,FULL_PATH,ROOT_FLAG,LEAF_FLAG,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME, ISSOFTDELETED) AS (SELECT ASSET_CATEGORY_ID,REFERENCE_ID,EXTERNAL_ID,NAME,FULL_PATH,ROOT_FLAG,LEAF_FLAG,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,URL,REC_DATETIME, ISSOFTDELETED FROM RIASSET.ASSET_CATEGORY)
  4307. GO
  4308.  
  4309. CREATE VIEW RIDW.VW_ASSET_CAT_HIERARCHY (PARENT_CATEGORY_ID,PARENT_CATEGORY_NAME,CHILD_CATEGORY_ID,CHILD_CATEGORY_NAME) AS (SELECT T.PARENT_CATEGORY_ID,P.NAME AS PARENT_CATEGORY_NAME,T.CHILD_CATEGORY_ID,C.NAME AS CHILD_CATEGORY_NAME FROM RIASSET.ASSET_CAT_HIERARCHY T JOIN RIASSET.ASSET_CATEGORY P ON P.ASSET_CATEGORY_ID = T.PARENT_CATEGORY_ID JOIN RIASSET.ASSET_CATEGORY C ON C.ASSET_CATEGORY_ID = T.CHILD_CATEGORY_ID)
  4310. GO
  4311.  
  4312. CREATE VIEW RIDW.VW_ASSET_CAT_ASSET_LOOKUP (ASSET_CATEGORY_ID,ASSET_CATEGORY_NAME,ASSET_ID,ASSET_NAME,FULL_PATH) AS (SELECT A.ASSET_CATEGORY_ID,AA.NAME AS ASSET_CATEGORY_NAME,A.ASSET_ID,ATT.NAME AS ASSET_NAME,A.FULL_PATH FROM RIASSET.ASSET_CAT_ASSET_LOOKUP A JOIN RIASSET.ASSET_CATEGORY AA ON AA.ASSET_CATEGORY_ID=A.ASSET_CATEGORY_ID JOIN RIASSET.ASSET ATT ON ATT.ASSET_ID=A.ASSET_ID)
  4313. GO
  4314.  
  4315. CREATE VIEW RIDW.VW_TESTSCRIPT_CATEGORY_LOOKUP (TESTSCRIPT_ID, TESTSCRIPT_NAME, TEST_CATEGORY_ID, TEST_CATEGORY_NAME) AS (SELECT TEST.TESTSCRIPT_ID, T.NAME AS TESTSCRIPT_NAME, TEST.TEST_CATEGORY_ID, TC.NAME AS TEST_CATEGORY_NAME FROM RIODS.TESTSCRIPT_CATEGORY_LOOKUP TEST JOIN RIODS.TESTSCRIPT T ON T.TESTSCRIPT_ID = TEST.TESTSCRIPT_ID JOIN RIODS.TEST_CATEGORY TC ON TC.TEST_CATEGORY_ID = TEST.TEST_CATEGORY_ID)
  4316. GO
  4317.  
  4318. CREATE VIEW RIDW.VW_EXECWI_CATEGORY_LOOKUP (EXECWORKITEM_ID, EXECWORKITEM_NAME, TEST_CATEGORY_ID, TEST_CATEGORY_NAME) AS (SELECT EX.EXECWORKITEM_ID, EW.NAME AS EXECWORKITEM_NAME, EX.TEST_CATEGORY_ID, TC.NAME AS TEST_CATEGORY_NAME FROM RIODS.EXECWORKITEM_CATEGORY_LOOKUP EX JOIN RIODS.EXECUTION_WORKITEM EW ON EW.EXECWORKITEM_ID = EX.EXECWORKITEM_ID JOIN RIODS.TEST_CATEGORY TC ON TC.TEST_CATEGORY_ID = EX.TEST_CATEGORY_ID)
  4319. GO
  4320.  
  4321. CREATE VIEW RIDW.VW_TSTSUITER_CATEGORY_LOOKUP (TESTSUITE_EXECRECORD_ID, TESTSUITE_EXECRECORD_NAME, TEST_CATEGORY_ID, TEST_CATEGORY_NAME) AS (SELECT TSTS.TESTSUITE_EXECRECORD_ID, TE.NAME AS TESTSUITE_EXECRECORD_NAME, TSTS.TEST_CATEGORY_ID, TC.NAME AS TEST_CATEGORY_NAME FROM RIODS.TSTSUITEXECREC_CATEGORY_LOOKUP TSTS JOIN RIODS.TEST_CATEGORY TC ON TC.TEST_CATEGORY_ID = TSTS.TEST_CATEGORY_ID JOIN RIODS.TESTSUITE_EXECUTION_RECORD TE ON TE.TESTSUITE_EXECRECORD_ID = TSTS.TESTSUITE_EXECRECORD_ID)
  4322. GO
  4323.  
  4324. CREATE VIEW RIDW.VW_EXECRESULT_CATEGORY_LOOKUP (EXECUTION_RESULT_ID, EXECUTION_RESULT_NAME, TEST_CATEGORY_ID, TEST_CATEGORY_NAME) AS (SELECT EX.EXECUTION_RESULT_ID, ER.NAME AS EXECUTION_RESULT_NAME, EX.TEST_CATEGORY_ID, TC.NAME AS TEST_CATEGORY_NAME FROM RIODS.EXECRESULT_CATEGORY_LOOKUP EX JOIN RIODS.EXECUTION_RESULT ER ON ER.EXECUTION_RESULT_ID = EX.EXECUTION_RESULT_ID JOIN RIODS.TEST_CATEGORY TC ON TC.TEST_CATEGORY_ID = EX.TEST_CATEGORY_ID)
  4325. GO
  4326.  
  4327. CREATE VIEW RIDW.VW_TESTSTLOG_CATEGORY_LOOKUP (TESTSUITELOG_ID, TESTSUITELOG_NAME, TEST_CATEGORY_ID, TEST_CATEGORY_NAME) AS (SELECT TEST.TESTSUITELOG_ID, T.NAME AS TESTSUITELOG_NAME, TEST.TEST_CATEGORY_ID, TC.NAME AS TEST_CATEGORY_NAME FROM RIODS.TESTSUITELOG_CATEGORY_LOOKUP TEST JOIN RIODS.TESTSUITELOG T ON T.TESTSUITELOG_ID = TEST.TESTSUITELOG_ID JOIN RIODS.TEST_CATEGORY TC ON TC.TEST_CATEGORY_ID = TEST.TEST_CATEGORY_ID)
  4328. GO
  4329.  
  4330. CREATE VIEW RIDW.VW_REQUEST_TESTPLAN_LOOKUP (REQUEST_ID, REQUEST_NAME, TESTPLAN_ID, TESTPLAN_NAME, LINK_TYPE) AS (SELECT REQU.REQUEST_ID, R.NAME AS REQUEST_NAME, REQU.TESTPLAN_ID, T.NAME AS TESTPLAN_NAME, REQU.LINK_TYPE FROM RIODS.REQUEST_TESTPLAN_LOOKUP REQU JOIN RIODS.REQUEST R ON R.REQUEST_ID = REQU.REQUEST_ID JOIN RIODS.TESTPLAN T ON T.TESTPLAN_ID = REQU.TESTPLAN_ID)
  4331. GO
  4332.  
  4333. CREATE VIEW RIDW.VW_REQUEST_TESTSCRIPT_LOOKUP (REQUEST_ID, REQUEST_NAME, TESTSCRIPT_ID, TESTSCRIPT_NAME, LINK_TYPE) AS (SELECT REQU.REQUEST_ID, R.NAME AS REQUEST_NAME, REQU.TESTSCRIPT_ID, T.NAME AS TESTSCRIPT_NAME, REQU.LINK_TYPE FROM RIODS.REQUEST_TESTSCRIPT_LOOKUP REQU JOIN RIODS.REQUEST R ON R.REQUEST_ID = REQU.REQUEST_ID JOIN RIODS.TESTSCRIPT T ON T.TESTSCRIPT_ID = REQU.TESTSCRIPT_ID)
  4334. GO
  4335.  
  4336. CREATE VIEW RIDW.VW_REQUEST_TESTSUITE_LOOKUP (REQUEST_ID, REQUEST_NAME, TESTSUITE_ID, TESTSUITE_NAME, LINK_TYPE) AS (SELECT REQU.REQUEST_ID, R.NAME AS REQUEST_NAME, REQU.TESTSUITE_ID, T.NAME AS TESTSUITE_NAME, REQU.LINK_TYPE FROM RIODS.REQUEST_TESTSUITE_LOOKUP REQU JOIN RIODS.REQUEST R ON R.REQUEST_ID = REQU.REQUEST_ID JOIN RIODS.TESTSUITE T ON T.TESTSUITE_ID = REQU.TESTSUITE_ID)
  4337. GO
  4338.  
  4339. CREATE VIEW RIDW.VW_REQUEST_TYPE_BINDING (REQUEST_TYPE_BINDING_ID, NAME, REFERENCE_ID, EXTERNAL_ID, PROJECT_ID, PROJECT_NAME, REQUEST_TYPE_ID, REQUEST_TYPE_NAME, URL, EXTERNAL_KEY1, EXTERNAL_KEY2, SOURCE_ID, REC_DATETIME, ISSOFTDELETED) AS (SELECT RT.REQUEST_TYPE_BINDING_ID, RT.NAME, RT.REFERENCE_ID, RT.EXTERNAL_ID, RT.PROJECT_ID, P.NAME AS PROJECT_NAME, RT.REQUEST_TYPE_ID, R.NAME AS REQUEST_TYPE_NAME, RT.URL, RT.EXTERNAL_KEY1, RT.EXTERNAL_KEY2, RT.SOURCE_ID, RT.REC_DATETIME, RT.ISSOFTDELETED FROM RIODS.REQUEST_TYPE_BINDING RT JOIN RIODS.PROJECT P ON P.PROJECT_ID = RT.PROJECT_ID JOIN RIODS.REQUEST_TYPE R ON R.REQUEST_TYPE_ID = RT.REQUEST_TYPE_ID)
  4340. GO
  4341.  
  4342. CREATE VIEW RIDW.VW_REQUIREMT_TESTSCRIPT_LOOKUP(REQUIREMENT_ID,REQUIREMENT_NAME,TESTSCRIPT_ID,TESTSCRIPT_NAME,LINK_TYPE_NAME) AS (SELECT RT.REQUIREMENT_ID,R.NAME AS REQUIREMENT_NAME,RT.TESTSCRIPT_ID,T.NAME AS TESTSCRIPT_NAME,RT.LINK_TYPE_NAME FROM RIODS.REQUIREMENT_TESTSCRIPT_LOOKUP RT JOIN RIODS.REQUIREMENT R ON R.REQUIREMENT_ID=RT.REQUIREMENT_ID JOIN RIODS.TESTSCRIPT T ON T.TESTSCRIPT_ID=RT.TESTSCRIPT_ID)
  4343. GO
  4344.  
  4345. CREATE VIEW RIDW.VW_TEST_STATUS (TEST_STATUS_ID,NAME,REFERENCE_ID,EXTERNAL_ID,PROJECT_ID,PROJECT_NAME,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,REC_DATETIME,ISSOFTDELETED)AS (SELECT T.TEST_STATUS_ID,T.NAME,T.REFERENCE_ID,T.EXTERNAL_ID,T.PROJECT_ID,P.NAME AS PROJECT_NAME,T.URL,T.EXTERNAL_KEY1,T.EXTERNAL_KEY2,T.SOURCE_ID,T.REC_DATETIME,T.ISSOFTDELETED FROM RIODS.TEST_STATUS T JOIN RIODS.PROJECT P ON P.PROJECT_ID =T.PROJECT_ID)
  4346. GO
  4347.  
  4348. CREATE VIEW RIDW.VW_TESTSUITE_STATE (TESTSUITE_STATE_ID,NAME,REFERENCE_ID,EXTERNAL_ID,PROJECT_ID,PROJECT_NAME,TEST_STATUS_ID,TEST_STATUS_NAME,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,REC_DATETIME,ISSOFTDELETED)AS (SELECT T.TESTSUITE_STATE_ID,T.NAME,T.REFERENCE_ID,T.EXTERNAL_ID,T.PROJECT_ID,P.NAME AS PROJECT_NAME,T.TEST_STATUS_ID,TS.NAME AS TEST_STATUS_NAME,T.URL,T.EXTERNAL_KEY1,T.EXTERNAL_KEY2,T.SOURCE_ID,T.REC_DATETIME,T.ISSOFTDELETED FROM RIODS.TESTSUITE_STATE T JOIN RIODS.TEST_STATUS TS ON TS.TEST_STATUS_ID=T.TEST_STATUS_ID JOIN RIODS.PROJECT P ON P.PROJECT_ID =T.PROJECT_ID)
  4349. GO
  4350.  
  4351. CREATE VIEW RIDW.VW_TESTSUITELOG_STATE (TESTSUITELOG_STATE_ID,NAME,REFERENCE_ID,EXTERNAL_ID,PROJECT_ID,PROJECT_NAME,TEST_STATUS_ID,TEST_STATUS_NAME,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,REC_DATETIME,ISSOFTDELETED)AS (SELECT T.TESTSUITELOG_STATE_ID,T.NAME,T.REFERENCE_ID,T.EXTERNAL_ID,T.PROJECT_ID,P.NAME AS PROJECT_NAME,T.TEST_STATUS_ID,TS.NAME AS TEST_STATUS_NAME,T.URL,T.EXTERNAL_KEY1,T.EXTERNAL_KEY2,T.SOURCE_ID,T.REC_DATETIME,T.ISSOFTDELETED FROM RIODS.TESTSUITELOG_STATE T JOIN RIODS.TEST_STATUS TS ON TS.TEST_STATUS_ID=T.TEST_STATUS_ID JOIN RIODS.PROJECT P ON P.PROJECT_ID =T.PROJECT_ID)
  4352. GO
  4353.  
  4354. CREATE VIEW RIDW.VW_EXECRESULT_STATE (EXECRESULT_STATE_ID,NAME,REFERENCE_ID,EXTERNAL_ID,PROJECT_ID,PROJECT_NAME,TEST_STATUS_ID,TEST_STATUS_NAME,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,REC_DATETIME,ISSOFTDELETED)AS (SELECT T.EXECRESULT_STATE_ID,T.NAME,T.REFERENCE_ID,T.EXTERNAL_ID,T.PROJECT_ID,P.NAME AS PROJECT_NAME,T.TEST_STATUS_ID,TS.NAME AS TEST_STATUS_NAME,T.URL,T.EXTERNAL_KEY1,T.EXTERNAL_KEY2,T.SOURCE_ID,T.REC_DATETIME,T.ISSOFTDELETED FROM RIODS.EXECRESULT_STATE T JOIN RIODS.TEST_STATUS TS ON TS.TEST_STATUS_ID=T.TEST_STATUS_ID JOIN RIODS.PROJECT P ON P.PROJECT_ID =T.PROJECT_ID)
  4355. GO
  4356.  
  4357. CREATE VIEW RIDW.VW_TESTCASE_STATE (TESTCASE_STATE_ID,NAME,REFERENCE_ID,EXTERNAL_ID,PROJECT_ID,PROJECT_NAME,TEST_STATUS_ID,TEST_STATUS_NAME,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,REC_DATETIME,ISSOFTDELETED)AS (SELECT T.TESTCASE_STATE_ID,T.NAME,T.REFERENCE_ID,T.EXTERNAL_ID,T.PROJECT_ID,P.NAME AS PROJECT_NAME,T.TEST_STATUS_ID,TS.NAME AS TEST_STATUS_NAME,T.URL,T.EXTERNAL_KEY1,T.EXTERNAL_KEY2,T.SOURCE_ID,T.REC_DATETIME,T.ISSOFTDELETED FROM RIODS.TESTCASE_STATE T JOIN RIODS.TEST_STATUS TS ON TS.TEST_STATUS_ID=T.TEST_STATUS_ID JOIN RIODS.PROJECT P ON P.PROJECT_ID =T.PROJECT_ID)
  4358. GO
  4359.  
  4360. CREATE VIEW RIDW.VW_TESTPLAN_STATE (TESTPLAN_STATE_ID,NAME,REFERENCE_ID,EXTERNAL_ID,PROJECT_ID,PROJECT_NAME,TEST_STATUS_ID,TEST_STATUS_NAME,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,REC_DATETIME,ISSOFTDELETED)AS (SELECT T.TESTPLAN_STATE_ID,T.NAME,T.REFERENCE_ID,T.EXTERNAL_ID,T.PROJECT_ID,P.NAME AS PROJECT_NAME,T.TEST_STATUS_ID,TS.NAME AS TEST_STATUS_NAME,T.URL,T.EXTERNAL_KEY1,T.EXTERNAL_KEY2,T.SOURCE_ID,T.REC_DATETIME,T.ISSOFTDELETED FROM RIODS.TESTPLAN_STATE T JOIN RIODS.TEST_STATUS TS ON TS.TEST_STATUS_ID=T.TEST_STATUS_ID JOIN RIODS.PROJECT P ON P.PROJECT_ID =T.PROJECT_ID)
  4361. GO
  4362.  
  4363. CREATE VIEW RIDW.VW_TESTSCRIPT_STATE (TESTSCRIPT_STATE_ID,NAME,REFERENCE_ID,EXTERNAL_ID,PROJECT_ID,PROJECT_NAME,TEST_STATUS_ID,TEST_STATUS_NAME,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,REC_DATETIME,ISSOFTDELETED)AS (SELECT T.TESTSCRIPT_STATE_ID,T.NAME,T.REFERENCE_ID,T.EXTERNAL_ID,T.PROJECT_ID,P.NAME AS PROJECT_NAME,T.TEST_STATUS_ID,TS.NAME AS TEST_STATUS_NAME,T.URL,T.EXTERNAL_KEY1,T.EXTERNAL_KEY2,T.SOURCE_ID,T.REC_DATETIME,T.ISSOFTDELETED FROM RIODS.TESTSCRIPT_STATE T JOIN RIODS.TEST_STATUS TS ON TS.TEST_STATUS_ID=T.TEST_STATUS_ID JOIN RIODS.PROJECT P ON P.PROJECT_ID =T.PROJECT_ID)
  4364. GO
  4365.  
  4366. CREATE VIEW RIDW.VW_TIMELINE (TIMELINE_ID,NAME,REFERENCE_ID,EXTERNAL_ID,PROJECT_ID,PROJECT_NAME,STATUS,START_DATE,END_DATE,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,REC_DATETIME,ISSOFTDELETED )AS (SELECT T.TIMELINE_ID,T.NAME,T.REFERENCE_ID,T.EXTERNAL_ID,T.PROJECT_ID,P.NAME AS PROJECT_NAME,T.STATUS,T.START_DATE,T.END_DATE,T.URL,T.EXTERNAL_KEY1,T.EXTERNAL_KEY2,T.SOURCE_ID,T.REC_DATETIME,T.ISSOFTDELETED FROM RIODS.TIMELINE T JOIN RIODS.PROJECT P ON P.PROJECT_ID =T.PROJECT_ID)
  4367. GO
  4368.  
  4369. CREATE VIEW RIDW.VW_TEST_PRIORITY (TEST_PRIORITY_ID,NAME,REFERENCE_ID,EXTERNAL_ID,PROJECT_ID,PROJECT_NAME,URL,EXTERNAL_KEY1,EXTERNAL_KEY2,SOURCE_ID,REC_DATETIME,ISSOFTDELETED)AS (SELECT T.TEST_PRIORITY_ID,T.NAME,T.REFERENCE_ID,T.EXTERNAL_ID,T.PROJECT_ID,P.NAME AS PROJECT_NAME,T.URL,T.EXTERNAL_KEY1,T.EXTERNAL_KEY2,T.SOURCE_ID,T.REC_DATETIME,T.ISSOFTDELETED FROM RIODS.TEST_PRIORITY T JOIN RIODS.PROJECT P ON P.PROJECT_ID =T.PROJECT_ID)
  4370. GO
  4371.  
  4372. USE [RIDW]
  4373. GO
  4374.  
  4375. CREATE SCHEMA AUTHORIZATION CONFIG
  4376. GO
  4377.  
  4378. INSERT INTO CONFIG.SYSCONFIG_INFO(INFO_ID,NAME,DISPLAY_NAME,INT_VALUE,CHAR_VALUE) VALUES (1,'DATE_DIM_GRANULARITY','ETL Granularity',null,'D')
  4379. GO
  4380.  
  4381. INSERT INTO CONFIG.SYSCONFIG_INFO(INFO_ID,NAME,DISPLAY_NAME,INT_VALUE,CHAR_VALUE) VALUES (2,'CALENDAR_WEEK_TYPE','Standard Gregorian',null,'G')
  4382. GO
  4383.  
  4384. INSERT INTO CONFIG.SYSCONFIG_INFO(INFO_ID,NAME,DISPLAY_NAME,INT_VALUE,CHAR_VALUE) VALUES (3,'MAPPING_LOCK','Lock Mapping',0,null)
  4385. GO
  4386.  
  4387. INSERT INTO CONFIG.SYSCONFIG_INFO(INFO_ID,NAME,DISPLAY_NAME,INT_VALUE,CHAR_VALUE) VALUES (4,'NF_LOCK','Lock NF',0,null)
  4388. GO
  4389.  
  4390. INSERT INTO CONFIG.SYSCONFIG_INFO(INFO_ID,NAME,DISPLAY_NAME,INT_VALUE,CHAR_VALUE) VALUES (5,'WH_LOCK','Lock Warehouse',0,null)
  4391. GO
  4392.  
  4393. INSERT INTO CONFIG.SYSCONFIG_INFO(INFO_ID,NAME,DISPLAY_NAME,INT_VALUE,CHAR_VALUE) VALUES (6,'VERSION','Insight Warehouse Version',2,'2.0.3')
  4394. GO
  4395.  
  4396. INSERT INTO CONFIG.SYSCONFIG_INFO(INFO_ID,NAME,DISPLAY_NAME,INT_VALUE,CHAR_VALUE) VALUES (9,'DATA_TRUNCATION','Interpreted as do not compute or delete data with dates earlier or equal to the value set',1,'1899-12-31')
  4397. GO
  4398.  
  4399. INSERT INTO CONFIG.SYSCONFIG_INFO(INFO_ID,NAME,DISPLAY_NAME,INT_VALUE,CHAR_VALUE) VALUES (18,'MINOR_VERSION','Insight Warehouse Minor Version',11,'2.0.3 RC1')
  4400. GO
  4401.  
  4402. USE [RIDW]
  4403. GO
  4404.  
  4405. CREATE SCHEMA AUTHORIZATION RIODS
  4406. GO
  4407.  
  4408. INSERT INTO RIODS.TESTCASE_CLASSIFICATION (TESTCASE_CLASS_ID,NAME) VALUES (-1,'Info Not Available')
  4409. GO
  4410.  
  4411. INSERT INTO RIODS.TESTCASE_CLASSIFICATION (TESTCASE_CLASS_ID,NAME) VALUES (1,'CQTM Test Case')
  4412. GO
  4413.  
  4414. INSERT INTO RIODS.TESTCASE_CLASSIFICATION (TESTCASE_CLASS_ID,NAME) VALUES (2,'RQM Test Case')
  4415. GO
  4416.  
  4417. INSERT INTO RIODS.TESTCASE_CLASSIFICATION (TESTCASE_CLASS_ID,NAME) VALUES (3,'TM Test Case')
  4418. GO
  4419.  
  4420. INSERT INTO RIODS.TESTPLAN_CLASSIFICATION (TESTPLAN_CLASS_ID ,NAME) VALUES (-1,'Info Not Available')
  4421. GO
  4422.  
  4423. INSERT INTO RIODS.TESTPLAN_CLASSIFICATION (TESTPLAN_CLASS_ID ,NAME) VALUES (1,'CQTM Test Plan')
  4424. GO
  4425.  
  4426. INSERT INTO RIODS.TESTPLAN_CLASSIFICATION (TESTPLAN_CLASS_ID ,NAME) VALUES (2,'RQM Test Plan')
  4427. GO
  4428.  
  4429. INSERT INTO RIODS.TESTPLAN_CLASSIFICATION (TESTPLAN_CLASS_ID ,NAME) VALUES (3,'TM Test Plan')
  4430. GO
  4431.  
  4432. INSERT INTO RIODS.TESTSUITE_CLASSIFICATION (TESTSUITE_CLASS_ID,NAME) VALUES (-1,'Info Not Available')
  4433. GO
  4434.  
  4435. INSERT INTO RIODS.TESTSUITE_CLASSIFICATION (TESTSUITE_CLASS_ID,NAME) VALUES (1,'CQTM Test Suite')
  4436. GO
  4437.  
  4438. INSERT INTO RIODS.TESTSUITE_CLASSIFICATION (TESTSUITE_CLASS_ID,NAME) VALUES (2,'RQM Test Suite')
  4439. GO
  4440.  
  4441. INSERT INTO RIODS.TESTSUITE_CLASSIFICATION (TESTSUITE_CLASS_ID,NAME) VALUES (3,'TM Test Suite')
  4442. GO
  4443.  
  4444. INSERT INTO RIODS.TESTSUITELOG_CLASSIFICATION (TESTSUITELOG_CLASS_ID,NAME) VALUES (-1,'Info Not Available')
  4445. GO
  4446.  
  4447. INSERT INTO RIODS.TESTSUITELOG_CLASSIFICATION (TESTSUITELOG_CLASS_ID,NAME) VALUES (1,'CQTM Test Suite Log')
  4448. GO
  4449.  
  4450. INSERT INTO RIODS.TESTSUITELOG_CLASSIFICATION (TESTSUITELOG_CLASS_ID,NAME) VALUES (2,'RQM Test Suite Log')
  4451. GO
  4452.  
  4453. INSERT INTO RIODS.TESTSUITELOG_CLASSIFICATION (TESTSUITELOG_CLASS_ID,NAME) VALUES (3,'TM Test Suite Log')
  4454. GO
  4455.  
  4456. INSERT INTO RIODS.EXECRESULT_CLASSIFICATION (EXECRES_CLASS_ID,NAME) VALUES (-1,'Info Not Available')
  4457. GO
  4458.  
  4459. INSERT INTO RIODS.EXECRESULT_CLASSIFICATION (EXECRES_CLASS_ID,NAME) VALUES (1,'CQTM Execution Result')
  4460. GO
  4461.  
  4462. INSERT INTO RIODS.EXECRESULT_CLASSIFICATION (EXECRES_CLASS_ID,NAME) VALUES (2,'RQM Execution Result')
  4463. GO
  4464.  
  4465. INSERT INTO RIODS.EXECRESULT_CLASSIFICATION (EXECRES_CLASS_ID,NAME) VALUES (3,'TM Execution Result')
  4466. GO
  4467.  
  4468. INSERT INTO RIODS.EXECWORKITEM_CLASSIFICATION (EXECWORKIT_CLASS_ID ,NAME) VALUES (-1,'Info Not Available')
  4469. GO
  4470.  
  4471. INSERT INTO RIODS.EXECWORKITEM_CLASSIFICATION (EXECWORKIT_CLASS_ID ,NAME) VALUES (1,'CQTM Execution Work Item')
  4472. GO
  4473.  
  4474. INSERT INTO RIODS.EXECWORKITEM_CLASSIFICATION (EXECWORKIT_CLASS_ID ,NAME) VALUES (2,'RQM Execution Work Item')
  4475. GO
  4476.  
  4477. INSERT INTO RIODS.EXECWORKITEM_CLASSIFICATION (EXECWORKIT_CLASS_ID ,NAME) VALUES (3,'TM Execution Work Item')
  4478. GO
  4479.  
  4480. INSERT INTO RIODS.CONFIGURATION_CLASSIFICATION (CONFIGURATION_CLASS_ID,NAME) VALUES (-1,'Info Not Available')
  4481. GO
  4482.  
  4483. INSERT INTO RIODS.CONFIGURATION_CLASSIFICATION (CONFIGURATION_CLASS_ID,NAME) VALUES (1,'CQTM Configuration')
  4484. GO
  4485.  
  4486. INSERT INTO RIODS.CONFIGURATION_CLASSIFICATION (CONFIGURATION_CLASS_ID,NAME) VALUES (2,'RQM Configuration')
  4487. GO
  4488.  
  4489. INSERT INTO RIODS.CONFIGURATION_CLASSIFICATION (CONFIGURATION_CLASS_ID,NAME) VALUES (3,'TM Configuration')
  4490. GO
  4491.  
  4492. INSERT INTO RIODS.BUILD_CLASSIFICATION (BUILD_CLASS_ID,NAME) VALUES (-1,'Info not available')
  4493. GO
  4494.  
  4495. INSERT INTO RIODS.BUILD_CLASSIFICATION (BUILD_CLASS_ID,NAME) VALUES (1,'CQ Build')
  4496. GO
  4497.  
  4498. INSERT INTO RIODS.BUILD_CLASSIFICATION (BUILD_CLASS_ID,NAME) VALUES (2,'RTC Build')
  4499. GO
  4500.  
  4501. INSERT INTO RIODS.BUILD_CLASSIFICATION (BUILD_CLASS_ID,NAME) VALUES (3,'TM Build')
  4502. GO
  4503.  
  4504. INSERT INTO RIODS.BUILD_CLASSIFICATION (BUILD_CLASS_ID,NAME) VALUES (4,'RQM Build')
  4505. GO
  4506.  
  4507. INSERT INTO RIODS.FILE_CLASSIFICATION (FILE_CLASS_ID,NAME) VALUES (-1,'Info Not Available')
  4508. GO
  4509.  
  4510. INSERT INTO RIODS.FILE_CLASSIFICATION (FILE_CLASS_ID,NAME) VALUES (1,'Clear Case File')
  4511. GO
  4512.  
  4513. INSERT INTO RIODS.FILE_CLASSIFICATION (FILE_CLASS_ID,NAME) VALUES (2,'RTC File')
  4514. GO
  4515.  
  4516. INSERT INTO RIODS.FILE_STREAM_CLASSIFICATION (FILE_STREAM_CLASS_ID,NAME) VALUES (-1,'Info Not Available')
  4517. GO
  4518.  
  4519. INSERT INTO RIODS.FILE_STREAM_CLASSIFICATION (FILE_STREAM_CLASS_ID,NAME) VALUES (1,'Clear Case File Stream')
  4520. GO
  4521.  
  4522. INSERT INTO RIODS.FILE_STREAM_CLASSIFICATION (FILE_STREAM_CLASS_ID,NAME) VALUES (2,'RTC File Stream')
  4523. GO
  4524.  
  4525. INSERT INTO RIODS.CURRENCY (CURRENCY_ID,NAME,EXCHANGE_RATE,VALID_START_DATE,VALID_FINISH_DATE) VALUES(-1,'Info not available',0.00,GETDATE(),GETDATE())
  4526. GO
  4527.  
  4528. INSERT INTO RIODS.OPERATING_TERRITORY (TERRITORY_ID,NAME) VALUES (-1,'Info not available')
  4529. GO
  4530.  
  4531. INSERT INTO RIODS.COUNTRY (COUNTRY_ID,NAME) VALUES (-1,'Info not available')
  4532. GO
  4533.  
  4534. INSERT INTO RIODS.PROVINCE_STATE (PROVINCE_STATE_ID,NAME) VALUES (-1,'Info not available')
  4535. GO
  4536.  
  4537. INSERT INTO RIODS.CITY (CITY_ID,NAME) VALUES (-1,'Info not available')
  4538. GO
  4539.  
  4540. INSERT INTO RIODS.ORGANIZATION (ORGANIZATION_ID,NAME) VALUES (-1,'Info not available')
  4541. GO
  4542.  
  4543. INSERT INTO RIODS.POOL (POOL_ID,NAME) VALUES(-1,'Info not available')
  4544. GO
  4545.  
  4546. INSERT INTO RIODS.RESOURCE (RESOURCE_ID,NAME,FULL_NAME,FIRST_NAME,LAST_NAME,MIDDLE_INITIAL) VALUES(-1,'Info not available','Info not available','Info not available','Info not available','Info not available')
  4547. GO
  4548.  
  4549. INSERT INTO RIODS.PROFILE (PROFILE_ID,NAME) VALUES(-1,'Info not available')
  4550. GO
  4551.  
  4552. INSERT INTO RIODS.SKILL (SKILL_ID,NAME) VALUES(-1,'Info not available')
  4553. GO
  4554.  
  4555. INSERT INTO RIODS.COMPETENCY (COMPETENCY_ID,NAME) VALUES(-1,'Info not available')
  4556. GO
  4557.  
  4558. INSERT INTO RIODS.TASK_CATEGORY (TASK_CATEGORY_ID,NAME) VALUES(-1,'Info not available')
  4559. GO
  4560.  
  4561. INSERT INTO RIODS.PROJECT_CLASSIFICATION (PROJECT_CLASS_ID,NAME) VALUES (-1,'Info not available')
  4562. GO
  4563.  
  4564. INSERT INTO RIODS.PROJECT_CLASSIFICATION (PROJECT_CLASS_ID,NAME) VALUES (1,'Microsoft Project')
  4565. GO
  4566.  
  4567. INSERT INTO RIODS.PROJECT_CLASSIFICATION (PROJECT_CLASS_ID,NAME) VALUES (2,'CQ Project')
  4568. GO
  4569.  
  4570. INSERT INTO RIODS.PROJECT_CLASSIFICATION (PROJECT_CLASS_ID,NAME) VALUES (3,'UCM Project')
  4571. GO
  4572.  
  4573. INSERT INTO RIODS.PROJECT_CLASSIFICATION (PROJECT_CLASS_ID,NAME) VALUES (4,'RTC Project Area')
  4574. GO
  4575.  
  4576. INSERT INTO RIODS.PROJECT_CLASSIFICATION (PROJECT_CLASS_ID,NAME) VALUES (5,'TM Project')
  4577. GO
  4578.  
  4579. INSERT INTO RIODS.PROJECT_CLASSIFICATION (PROJECT_CLASS_ID,NAME) VALUES (6,'ReqPro Project')
  4580. GO
  4581.  
  4582. INSERT INTO RIODS.PROJECT_CLASSIFICATION (PROJECT_CLASS_ID,NAME) VALUES (7,'RQM Project')
  4583. GO
  4584.  
  4585. INSERT INTO RIODS.PROJECT_CLASSIFICATION (PROJECT_CLASS_ID,NAME) VALUES (8,'Project Conductor Project')
  4586. GO
  4587.  
  4588. INSERT INTO RIODS.PROJECT_CLASSIFICATION (PROJECT_CLASS_ID,NAME) VALUES (9,'Focal Point Project')
  4589. GO
  4590.  
  4591. INSERT INTO RIODS.PROJECT_CLASSIFICATION (PROJECT_CLASS_ID,NAME) VALUES (10,'RRC Project')
  4592. GO
  4593.  
  4594. INSERT INTO RIODS.PROJECT_CLASSIFICATION (PROJECT_CLASS_ID,NAME) VALUES (11,'RAM Project')
  4595. GO
  4596.  
  4597. INSERT INTO RIODS.PROJECT_CLASSIFICATION (PROJECT_CLASS_ID,NAME) VALUES (12,'MCIF Self-Check Project')
  4598. GO
  4599.  
  4600. INSERT INTO RIODS.PRODUCT (PRODUCT_ID,NAME) VALUES(-1,'Info not available')
  4601. GO
  4602.  
  4603. INSERT INTO RIODS.ASSETREGISTRY (ASSETREGISTRY_ID,NAME) VALUES(-1,'Info not available')
  4604. GO
  4605.  
  4606. INSERT INTO RIODS.PROJECT_CATEGORY (PROJECT_CATEGORY_ID,NAME) VALUES (-1,'Info not available')
  4607. GO
  4608.  
  4609. INSERT INTO RIODS.TIMELINE (TIMELINE_ID,NAME) VALUES(-1,'Info not available')
  4610. GO
  4611.  
  4612. INSERT INTO RIODS.ITERATION (ITERATION_ID,NAME) VALUES(-1,'Info not available')
  4613. GO
  4614.  
  4615. INSERT INTO RIODS.PROGRAM (PROGRAM_ID,NAME) VALUES (-1,'Info not available')
  4616. GO
  4617.  
  4618. INSERT INTO RIODS.PROJECT (PROJECT_ID,NAME) VALUES (-1,'Others')
  4619. GO
  4620.  
  4621. INSERT INTO RIODS.REQUEST_CATEGORY (REQUEST_CATEGORY_ID,NAME) VALUES (-1,'Info not available')
  4622. GO
  4623.  
  4624. INSERT INTO RIODS.REQUEST_STATE (REQUEST_STATE_ID,NAME) VALUES (-1,'Info not available')
  4625. GO
  4626.  
  4627. INSERT INTO RIODS.REQUEST_STATUS (REQUEST_STATUS_ID,NAME) VALUES (-1,'Info not available')
  4628. GO
  4629.  
  4630. INSERT INTO RIODS.REQUEST_PRIORITY (REQUEST_PRIORITY_ID,NAME) VALUES (-1,'Info not available')
  4631. GO
  4632.  
  4633. INSERT INTO RIODS.REQUEST_SEVERITY (REQUEST_SEVERITY_ID,NAME) VALUES (-1,'Info not available')
  4634. GO
  4635.  
  4636. INSERT INTO RIODS.REQUEST_RESOLUTION (REQUEST_RESOLUTION_ID,NAME) VALUES (-1,'Info not available')
  4637. GO
  4638.  
  4639. INSERT INTO RIODS.REQUEST_TYPE (REQUEST_TYPE_ID,NAME) VALUES (-1,'Info not available')
  4640. GO
  4641.  
  4642. INSERT INTO RIODS.RELEASE (RELEASE_ID,NAME) VALUES(-1,'Info not available')
  4643. GO
  4644.  
  4645. INSERT INTO RIODS.PHASE (PHASE_ID,NAME) VALUES (-1,'Info not available')
  4646. GO
  4647.  
  4648. INSERT INTO RIODS.ACTIVITY_CLASSIFICATION (ACTIVITY_CLASS_ID,NAME) VALUES (-1,'Info not available')
  4649. GO
  4650.  
  4651. INSERT INTO RIODS.ACTIVITY_CLASSIFICATION (ACTIVITY_CLASS_ID,NAME) VALUES (1,'ALM Activity')
  4652. GO
  4653.  
  4654. INSERT INTO RIODS.ACTIVITY_CLASSIFICATION (ACTIVITY_CLASS_ID,NAME) VALUES (2,'UCM Activity')
  4655. GO
  4656.  
  4657. INSERT INTO RIODS.ACTIVITY_CLASSIFICATION (ACTIVITY_CLASS_ID,NAME) VALUES (3,'All UCM Activity')
  4658. GO
  4659.  
  4660. INSERT INTO RIODS.ACTIVITY_CLASSIFICATION (ACTIVITY_CLASS_ID,NAME) VALUES (4,'MSP Assignment')
  4661. GO
  4662.  
  4663. INSERT INTO RIODS.ACTIVITY_CLASSIFICATION (ACTIVITY_CLASS_ID,NAME) VALUES (5,'Change Set')
  4664. GO
  4665.  
  4666. INSERT INTO RIODS.ACTIVITY_CLASSIFICATION (ACTIVITY_CLASS_ID,NAME) VALUES (6,'Project Conductor Assignment')
  4667. GO
  4668.  
  4669. INSERT INTO RIODS.CUSTOMER (CUSTOMER_ID,NAME) VALUES(-1,'Info not available')
  4670. GO
  4671.  
  4672. INSERT INTO RIODS.TEAM (TEAM_ID,NAME)VALUES(-1,'Info not available')
  4673. GO
  4674.  
  4675. INSERT INTO RIODS.PROJECT_ROLE (PROJECT_ROLE_ID,NAME) VALUES (-1,'Info not available')
  4676. GO
  4677.  
  4678. INSERT INTO RIODS.PROJECT_TYPE (PROJECT_TYPE_ID,NAME) VALUES (-1,'Info not available')
  4679. GO
  4680.  
  4681. INSERT INTO RIODS.PROJECT_WORKCONFIGURATION (PROJECT_WKCFG_ID,NAME) VALUES (-1,'Info not available')
  4682. GO
  4683.  
  4684. INSERT INTO RIODS.COMPONENT_CLASSIFICATION (COMPONENT_CLASS_ID,NAME) VALUES(-1,'Info not available')
  4685. GO
  4686.  
  4687. INSERT INTO RIODS.COMPONENT_CLASSIFICATION (COMPONENT_CLASS_ID,NAME) VALUES(1,'CQ Component')
  4688. GO
  4689.  
  4690. INSERT INTO RIODS.COMPONENT_CLASSIFICATION (COMPONENT_CLASS_ID,NAME) VALUES(2,'CC Component')
  4691. GO
  4692.  
  4693. INSERT INTO RIODS.COMPONENT_CLASSIFICATION (COMPONENT_CLASS_ID,NAME) VALUES(3,'RTC Component')
  4694. GO
  4695.  
  4696. INSERT INTO RIODS.COMPONENT (COMPONENT_ID,NAME) VALUES(-1,'Info not available')
  4697. GO
  4698.  
  4699. INSERT INTO RIODS.REQUEST_CLASSIFICATION (REQUEST_CLASS_ID,NAME) VALUES (-1,'No Type')
  4700. GO
  4701.  
  4702. INSERT INTO RIODS.REQUEST_CLASSIFICATION (REQUEST_CLASS_ID,NAME) VALUES (1,'Defect')
  4703. GO
  4704.  
  4705. INSERT INTO RIODS.REQUEST_CLASSIFICATION (REQUEST_CLASS_ID,NAME) VALUES (2,'RFE')
  4706. GO
  4707.  
  4708. INSERT INTO RIODS.REQUEST_CLASSIFICATION (REQUEST_CLASS_ID,NAME) VALUES (3,'Task')
  4709. GO
  4710.  
  4711. INSERT INTO RIODS.REQUEST_CLASSIFICATION (REQUEST_CLASS_ID,NAME) VALUES (4,'ALM Request')
  4712. GO
  4713.  
  4714. INSERT INTO RIODS.REQUEST_CLASSIFICATION (REQUEST_CLASS_ID,NAME) VALUES (5,'Enhancement Request')
  4715. GO
  4716.  
  4717. INSERT INTO RIODS.REQUEST_CLASSIFICATION (REQUEST_CLASS_ID,NAME) VALUES (6,'RQM WorkItem')
  4718. GO
  4719.  
  4720. INSERT INTO RIODS.REQUEST_CLASSIFICATION (REQUEST_CLASS_ID,NAME) VALUES (7,'RTC WorkItem')
  4721. GO
  4722.  
  4723. INSERT INTO RIODS.REQUEST_CLASSIFICATION (REQUEST_CLASS_ID,NAME) VALUES (8,'Focal Point Change Request')
  4724. GO
  4725.  
  4726. INSERT INTO RIODS.FILE_STREAM (FILE_STREAM_ID,NAME,REFERENCE_ID) VALUES (-1,'Info not available','Info not available')
  4727. GO
  4728.  
  4729. INSERT INTO RIODS.PROJECT_BASELINE (BASELINE_ID,NAME) VALUES (-1,'Info not available')
  4730. GO
  4731.  
  4732. INSERT INTO RIODS.TASK_CLASSIFICATION (TASK_CLASS_ID,NAME) VALUES(-1,'Info not available')
  4733. GO
  4734.  
  4735. INSERT INTO RIODS.TASK_CLASSIFICATION (TASK_CLASS_ID,NAME) VALUES(1,'Project Conductor Task')
  4736. GO
  4737.  
  4738. INSERT INTO RIODS.TASK_CLASSIFICATION (TASK_CLASS_ID,NAME) VALUES(2,'Project Conductor Story')
  4739. GO
  4740.  
  4741. INSERT INTO RIODS.TASK_CLASSIFICATION (TASK_CLASS_ID,NAME) VALUES(3,'Project Conductor CR Task')
  4742. GO
  4743.  
  4744. INSERT INTO RIODS.TASK_CLASSIFICATION (TASK_CLASS_ID,NAME) VALUES(4,'Project Conductor Summary Task')
  4745. GO
  4746.  
  4747. INSERT INTO RIODS.TASK_CLASSIFICATION (TASK_CLASS_ID,NAME) VALUES(5,'Project Conductor Issue Task')
  4748. GO
  4749.  
  4750. INSERT INTO RIODS.TASK_CLASSIFICATION (TASK_CLASS_ID,NAME) VALUES(6,'Project Conductor Defect Task')
  4751. GO
  4752.  
  4753. INSERT INTO RIODS.TASK_CLASSIFICATION (TASK_CLASS_ID,NAME) VALUES(7,'RPM Service Request Task')
  4754. GO
  4755.  
  4756. INSERT INTO RIODS.TASK_CLASSIFICATION (TASK_CLASS_ID,NAME) VALUES(8,'RPM Requirement Task Task')
  4757. GO
  4758.  
  4759. INSERT INTO RIODS.TASK_CLASSIFICATION (TASK_CLASS_ID,NAME) VALUES(9,'RPM Action Item Task')
  4760. GO
  4761.  
  4762. INSERT INTO RIODS.TASK_CLASSIFICATION (TASK_CLASS_ID,NAME) VALUES(10,'ALM Task')
  4763. GO
  4764.  
  4765. INSERT INTO RIODS.TASK_CLASSIFICATION (TASK_CLASS_ID,NAME) VALUES(11,'Standard MSP Task')
  4766. GO
  4767.  
  4768. INSERT INTO RIODS.TASK_CLASSIFICATION (TASK_CLASS_ID,NAME) VALUES(12,'MSP Milestone')
  4769. GO
  4770.  
  4771. INSERT INTO RIODS.TASK_CLASSIFICATION (TASK_CLASS_ID,NAME) VALUES(13,'MSP Summary Task')
  4772. GO
  4773.  
  4774. INSERT INTO RIODS.TASK_CLASSIFICATION (TASK_CLASS_ID,NAME) VALUES(15,'MSP SubProject Task')
  4775. GO
  4776.  
  4777. INSERT INTO RIODS.TASK (TASK_ID ,NAME) VALUES(-1,'Info not available')
  4778. GO
  4779.  
  4780. INSERT INTO RIODS.BUILD (BUILD_ID,NAME) VALUES (-1,'Info not available')
  4781. GO
  4782.  
  4783. INSERT INTO RIODS.CHARGECODE (CHARGECODE_ID,NAME) VALUES (-1,'Info not available')
  4784. GO
  4785.  
  4786. INSERT INTO RIODS.ACTIVITY (ACTIVITY_ID,NAME) VALUES (-1,'Info not available')
  4787. GO
  4788.  
  4789. INSERT INTO RIODS.[FILE] (FILE_ID,NAME,REFERENCE_ID) VALUES (-1,'Info not available','Info not available')
  4790. GO
  4791.  
  4792. INSERT INTO RIODS.FILE_VERSION (FILE_VERSION_ID,FILE_ID,NAME,REFERENCE_ID,CREATION_DATE) VALUES (-1,-1,'Info not available','Info not available',GETDATE())
  4793. GO
  4794.  
  4795. INSERT INTO RIODS.FILE_BASELINE (FILE_BASELINE_ID,NAME,REFERENCE_ID) VALUES (-1,'Info not available','Info not available')
  4796. GO
  4797.  
  4798. INSERT INTO RIODS.REQUEST (REQUEST_ID,NAME) VALUES (-1,'Info not available')
  4799. GO
  4800.  
  4801. INSERT INTO RIODS.CONFIGURATION (CONFIGURATION_ID,NAME) VALUES(-1,'Info not available')
  4802. GO
  4803.  
  4804. INSERT INTO RIODS.CONFIGURATION_ATTRIBUTE (CONFIGURATION_ATTRIBUTE_ID,NAME) VALUES(-1,'Info not available')
  4805. GO
  4806.  
  4807. INSERT INTO RIODS.RESOURCE_GROUP (RESOURCE_GROUP_ID,NAME) VALUES (-1,'Info not available')
  4808. GO
  4809.  
  4810. INSERT INTO RIODS.LAB_RESOURCE (LAB_RESOURCE_ID,NAME) VALUES (-1,'Info not available')
  4811. GO
  4812.  
  4813. INSERT INTO RIODS.TESTTYPE (TESTTYPE_ID,NAME) VALUES(-1,'Info not available')
  4814. GO
  4815.  
  4816. INSERT INTO RIODS.TEST_STATUS (TEST_STATUS_ID,NAME) VALUES(-1,'Info not available')
  4817. GO
  4818.  
  4819. INSERT INTO RIODS.TEST_PRIORITY (TEST_PRIORITY_ID,NAME) VALUES(-1,'Info not available')
  4820. GO
  4821.  
  4822. INSERT INTO RIODS.TESTSUITE_STATE (TESTSUITE_STATE_ID,NAME) VALUES(-1,'Info not available')
  4823. GO
  4824.  
  4825. INSERT INTO RIODS.TESTSUITELOG_STATE (TESTSUITELOG_STATE_ID,NAME) VALUES(-1,'Info not available')
  4826. GO
  4827.  
  4828. INSERT INTO RIODS.EXECRESULT_STATE (EXECRESULT_STATE_ID,NAME) VALUES(-1,'Info not available')
  4829. GO
  4830.  
  4831. INSERT INTO RIODS.TESTCASE_STATE(TESTCASE_STATE_ID,NAME) VALUES(-1,'Info not available')
  4832. GO
  4833.  
  4834. INSERT INTO RIODS.TESTPLAN_STATE(TESTPLAN_STATE_ID,NAME) VALUES(-1,'Info not available')
  4835. GO
  4836.  
  4837. INSERT INTO RIODS.TESTSCRIPT_STATE(TESTSCRIPT_STATE_ID,NAME) VALUES(-1,'Info not available')
  4838. GO
  4839.  
  4840. INSERT INTO RIODS.TESTSUITE (TESTSUITE_ID,NAME) VALUES(-1,'Info not available')
  4841. GO
  4842.  
  4843. INSERT INTO RIODS.TESTPLAN (TESTPLAN_ID,REFERENCE_ID,NAME) VALUES(-1,'Info not available','Info not available')
  4844. GO
  4845.  
  4846. INSERT INTO RIODS.TESTSCRIPT (TESTSCRIPT_ID,NAME) VALUES(-1,'Info not available')
  4847. GO
  4848.  
  4849. INSERT INTO RIODS.TESTCASE (TESTCASE_ID,REFERENCE_ID,NAME) VALUES(-1,'Info not available','Info not available')
  4850. GO
  4851.  
  4852. INSERT INTO RIODS.EXECUTION_RESULT (EXECUTION_RESULT_ID,BUILD_ID) VALUES(-1,-1)
  4853. GO
  4854.  
  4855. INSERT INTO RIODS.EXECUTION_WORKITEM (EXECWORKITEM_ID,REFERENCE_ID,NAME,TESTCASE_ID) VALUES(-1,'Info not available','Info not available',-1)
  4856. GO
  4857.  
  4858. INSERT INTO RIODS.REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID,NAME) VALUES (-1,'Info not available')
  4859. GO
  4860.  
  4861. INSERT INTO RIODS.REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID,NAME) VALUES (1, 'Requirement')
  4862. GO
  4863.  
  4864. INSERT INTO RIODS.REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID,NAME) VALUES (2, 'Release Requirement')
  4865. GO
  4866.  
  4867. INSERT INTO RIODS.REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID,NAME) VALUES (3, 'Feature')
  4868. GO
  4869.  
  4870. INSERT INTO RIODS.REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID,NAME) VALUES (4, 'Supplementary')
  4871. GO
  4872.  
  4873. INSERT INTO RIODS.REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID,NAME) VALUES (5, 'Term')
  4874. GO
  4875.  
  4876. INSERT INTO RIODS.REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID,NAME) VALUES (6, 'Usecase')
  4877. GO
  4878.  
  4879. INSERT INTO RIODS.REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID,NAME) VALUES (7, 'Product')
  4880. GO
  4881.  
  4882. INSERT INTO RIODS.REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID,NAME) VALUES (8, 'Software')
  4883. GO
  4884.  
  4885. INSERT INTO RIODS.REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID,NAME) VALUES (9, 'Business Rule')
  4886. GO
  4887.  
  4888. INSERT INTO RIODS.REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID,NAME) VALUES (10,'Change Request')
  4889. GO
  4890.  
  4891. INSERT INTO RIODS.REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID,NAME) VALUES (11,'Issue')
  4892. GO
  4893.  
  4894. INSERT INTO RIODS.REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID,NAME) VALUES (12,'Mitigation Strategy')
  4895. GO
  4896.  
  4897. INSERT INTO RIODS.REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID,NAME) VALUES (13,'Risk')
  4898. GO
  4899.  
  4900. INSERT INTO RIODS.REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID,NAME) VALUES (14,'RUP Development Case Artifact')
  4901. GO
  4902.  
  4903. INSERT INTO RIODS.REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID,NAME) VALUES (15,'Stakeholder Request')
  4904. GO
  4905.  
  4906. INSERT INTO RIODS.REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID,NAME) VALUES (16,'Test Case')
  4907. GO
  4908.  
  4909. INSERT INTO RIODS.REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID,NAME) VALUES (17,'Business Use Case')
  4910. GO
  4911.  
  4912. INSERT INTO RIODS.REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID,NAME) VALUES (18,'Business Goal')
  4913. GO
  4914.  
  4915. INSERT INTO RIODS.REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID,NAME) VALUES (19,'Key Performance Indicator')
  4916. GO
  4917.  
  4918. INSERT INTO RIODS.REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID,NAME) VALUES (20,'Business Task')
  4919. GO
  4920.  
  4921. INSERT INTO RIODS.REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID,NAME) VALUES (21,'RQM Requirement')
  4922. GO
  4923.  
  4924. INSERT INTO RIODS.REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID,NAME) VALUES (22,'Doors Requirement')
  4925. GO
  4926.  
  4927. INSERT INTO RIODS.REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID,NAME) VALUES (23,'RRC Requirement')
  4928. GO
  4929.  
  4930. INSERT INTO RIODS.REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID,NAME) VALUES (24,'Focal Point Requirement')
  4931. GO
  4932.  
  4933. INSERT INTO RIODS.REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID,NAME) VALUES (25,'ReqPro Requirement')
  4934. GO
  4935.  
  4936. INSERT INTO RIODS.REQUIREMENT (REQUIREMENT_ID,REQUIREMENT_CLASS_ID,NAME) VALUES (-1,-1,'Info not available')
  4937. GO
  4938.  
  4939. INSERT INTO RIODS.REQUIREMENT_COLLECTION (REQUIREMENT_COLLECTION_ID, NAME) VALUES (-1,'Info not available')
  4940. GO
  4941.  
  4942. INSERT INTO RIODS.RISK (RISK_ID,NAME) VALUES (-1,'Info not available')
  4943. GO
  4944.  
  4945. INSERT INTO RIODS.FACTOR (FACTOR_ID,NAME) VALUES (-1,'Info not available')
  4946. GO
  4947.  
  4948. INSERT INTO RIODS.COMMENT (COMMENT_ID) VALUES (-1)
  4949. GO
  4950.  
  4951. INSERT INTO RIODS.TEST_CATEGORY (TEST_CATEGORY_ID,NAME) VALUES (-1,'Info not available')
  4952. GO
  4953.  
  4954. INSERT INTO RIODS.RESERVATION (RESERVATION_ID,NAME) VALUES (-1,'Info not available')
  4955. GO
  4956.  
  4957. INSERT INTO RIODS.JOB (JOB_ID,NAME) VALUES (-1,'Info not available')
  4958. GO
  4959.  
  4960. INSERT INTO RIODS.JOB_RESULT (JOB_RESULT_ID,NAME) VALUES (-1,'Info not available')
  4961. GO
  4962.  
  4963. INSERT INTO RIODS.TIMECODE (TIMECODE_ID,NAME) VALUES (-1,'Info not available')
  4964. GO
  4965.  
  4966. INSERT INTO RIODS.PORTFOLIO (PORTFOLIO_ID,NAME) VALUES (-1,'Info not available')
  4967. GO
  4968.  
  4969. INSERT INTO RIODS.TEAM_ROLE (TEAM_ROLE_ID,NAME) VALUES (-1,'Info not available')
  4970. GO
  4971.  
  4972. INSERT INTO RIODS.EXECUTION_STEP_RESULT(EXECUTION_STEP_RESULT_ID,NAME) VALUES (-1,'Info not available')
  4973. GO
  4974.  
  4975. INSERT INTO RIODS.TESTSUITE_ELEMENT (TESTSUITE_ELEMENT_ID,NAME) VALUES (-1,'Info not available')
  4976. GO
  4977.  
  4978. INSERT INTO RIODS.TESTSUITE_EXECUTION_RECORD(TESTSUITE_EXECRECORD_ID,NAME) VALUES (-1,'Info not available')
  4979. GO
  4980.  
  4981. INSERT INTO RIODS.TESTSUITELOG (TESTSUITELOG_ID,BUILD_ID) VALUES(-1,-1)
  4982. GO
  4983.  
  4984. INSERT INTO RIODS.REQUIREMENT_LINK_TYPE (LINK_TYPE_ID,NAME) VALUES (-1,'Info not available')
  4985. GO
  4986.  
  4987. INSERT INTO RIODS.REQUEST_RELATIONAL_LINK(REQUEST_RELATION_ID,REQUEST1_ID,REQUEST2_ID,NAME) VALUES (-1,-1,-1,'Info not available')
  4988. GO
  4989.  
  4990. INSERT INTO RIODS.REQUEST_TYPE_BINDING (REQUEST_TYPE_BINDING_ID, NAME) VALUES (-1,'Info not available')
  4991. GO
  4992.  
  4993. INSERT INTO RIODS.TIMESHEET (TIMESHEET_ID, REFERENCE_ID) VALUES (-1, 'Info Not Available')
  4994. GO
  4995.  
  4996. USE [RIDW]
  4997. GO
  4998.  
  4999. CREATE SCHEMA AUTHORIZATION RIASSET
  5000. GO
  5001.  
  5002. INSERT INTO RIASSET.ACTION_TYPE(ACTION_TYPE_ID,NAME) VALUES(-1,'Info not available')
  5003. GO
  5004.  
  5005. INSERT INTO RIASSET.ASSET_TYPE(ASSET_TYPE_ID,NAME) VALUES(-1,'Info not available')
  5006. GO
  5007.  
  5008. INSERT INTO RIASSET.ASSET(ASSET_ID,NAME) VALUES(-1,'Info not available')
  5009. GO
  5010.  
  5011. INSERT INTO RIASSET.ASSET_ROLE(ASSET_ROLE_ID,NAME) VALUES(-1,'Info not available')
  5012. GO
  5013.  
  5014. INSERT INTO RIASSET.ENTITLEMENT(ENTITLEMENT_ID,NAME) VALUES(-1,'Info not available')
  5015. GO
  5016.  
  5017. INSERT INTO RIASSET.ASSET_ATTRIBUTE (ASSET_ATTRIBUTE_ID,NAME) VALUES (-1, 'Info not available')
  5018. GO
  5019.  
  5020. INSERT INTO RIASSET.ASSET_ATTRIBUTE_VALUE (ASSET_ATTRIBUTE_VALUE_ID,NAME) VALUES (-1, 'Info not available')
  5021. GO
  5022.  
  5023. INSERT INTO RIASSET.ASSET_CATEGORY(ASSET_CATEGORY_ID,NAME) VALUES (-1, 'Info not available')
  5024. GO
  5025.  
  5026. USE [RIDW]
  5027. GO
  5028.  
  5029. CREATE SCHEMA AUTHORIZATION RISCHK
  5030. GO
  5031.  
  5032. INSERT INTO RISCHK.SC_SCALE (SCALE_ID,NAME) VALUES (-1,'Info not available')
  5033. GO
  5034.  
  5035. INSERT INTO RISCHK.BALLOT (BALLOT_ID,NAME) VALUES (-1,'Info not available')
  5036. GO
  5037.  
  5038. INSERT INTO RISCHK.BALLOT_DEFINITION (BALLOT_DEFINITION_ID,NAME) VALUES (-1,'Info not available')
  5039. GO
  5040.  
  5041. INSERT INTO RISCHK.BALLOT_TAB (BALLOT_TAB_ID,NAME) VALUES (-1,'Info not available')
  5042. GO
  5043.  
  5044. INSERT INTO RISCHK.QUESTION (QUESTION_ID,NAME) VALUES (-1,'Info not available')
  5045. GO
  5046.  
  5047. INSERT INTO RISCHK.SC_SESSION (SESSION_ID,NAME) VALUES (-1,'Info not available')
  5048. GO
  5049.  
  5050. INSERT INTO RISCHK.ANSWER (ANSWER_ID,NAME) VALUES (-1,'Info not available')
  5051. GO
  5052.  
  5053. INSERT INTO RISCHK.SC_BALLOT_TAB_RESULT (RESULT_ID,NAME) VALUES (-1,'Info not available')
  5054. GO
  5055.  
  5056. USE [RIDW]
  5057. GO
  5058.  
  5059. CREATE SCHEMA AUTHORIZATION RIDW
  5060. GO
  5061.  
  5062. INSERT INTO RIDW.D_BUILD (BUILD_ID,NAME) VALUES (-1,'Info not available')
  5063. GO
  5064.  
  5065. INSERT INTO RIDW.D_TEAM (TEAM_ID,NAME)VALUES (-1,'Info not available')
  5066. GO
  5067.  
  5068. INSERT INTO RIDW.D_EXECUTIONWKITEM_STATE (STATE_ID,NAME) VALUES (-1,'Info not available')
  5069. GO
  5070.  
  5071. INSERT INTO RIDW.D_CURRENCY(CURRENCY_ID,NAME) VALUES (-1,'Info not available')
  5072. GO
  5073.  
  5074. INSERT INTO RIDW.D_CUSTOMER (CUSTOMER_ID,NAME)VALUES (-1,'Info not available')
  5075. GO
  5076.  
  5077. INSERT INTO RIDW.D_CUSTOMER_PRIORITY (CUSTOMER_PRIORITY_ID,NAME) VALUES(-1,'Info not available')
  5078. GO
  5079.  
  5080. INSERT INTO RIDW.D_FACTOR (FACTOR_ID,NAME) VALUES(-1,'Info not available')
  5081. GO
  5082.  
  5083. INSERT INTO RIDW.D_FILE (FILE_ID,NAME) VALUES(-1,'Info not available')
  5084. GO
  5085.  
  5086. INSERT INTO RIDW.D_FILE_VERSION (FILE_VERSION_ID,NAME) VALUES(-1,'Info not available')
  5087. GO
  5088.  
  5089. INSERT INTO RIDW.D_FILE_STREAM (FILE_STREAM_ID,NAME) VALUES(-1,'Info not available')
  5090. GO
  5091.  
  5092. INSERT INTO RIDW.D_FILE_BASELINE (FILE_BASELINE_ID,NAME) VALUES(-1,'Info not available')
  5093. GO
  5094.  
  5095. INSERT INTO RIDW.D_ACTIVITY (ACTIVITY_ID,NAME) VALUES(-1,'Info not available')
  5096. GO
  5097.  
  5098. INSERT INTO RIDW.D_ITERATION (ITERATION_ID,NAME) VALUES (-1,'Info not available')
  5099. GO
  5100.  
  5101. INSERT INTO RIDW.D_RESOURCE (RESOURCE_ID,FULL_NAME) VALUES (-1,'Info not available')
  5102. GO
  5103.  
  5104. INSERT INTO RIDW.D_PLATFORM (PLATFORM_ID,NAME) VALUES (-1,'Info not available')
  5105. GO
  5106.  
  5107. INSERT INTO RIDW.D_PRIORITY (PRIORITY_ID,NAME) VALUES (-1,'Info not available')
  5108. GO
  5109.  
  5110. INSERT INTO RIDW.D_PRODUCT (PRODUCT_ID,NAME) VALUES (-1,'Info not available')
  5111. GO
  5112.  
  5113. INSERT INTO RIDW.D_COMPONENT (COMPONENT_ID,NAME,PARENT_COMPONENT_ID,PRODUCT_ID) VALUES (-1,'Info not available',-1,-1)
  5114. GO
  5115.  
  5116. INSERT INTO RIDW.D_PROGRAM (PROGRAM_ID,NAME) VALUES (-1,'Info Not Available')
  5117. GO
  5118.  
  5119. INSERT INTO RIDW.D_PROJECT (PROJECT_ID,PROGRAM_ID,NAME) VALUES (-1,-1,'Info not available')
  5120. GO
  5121.  
  5122. INSERT INTO RIDW.D_RELEASE (RELEASE_ID,NAME) VALUES (-1,'Info not available')
  5123. GO
  5124.  
  5125. INSERT INTO RIDW.D_REQUEST (REQUEST_ID,NAME) VALUES (-1,'Info not available')
  5126. GO
  5127.  
  5128. INSERT INTO RIDW.D_REQUEST_CLASSIFICATION (REQUEST_CLASS_ID,NAME) VALUES (-1,'Info not available')
  5129. GO
  5130.  
  5131. INSERT INTO RIDW.D_REQUEST_STATE (STATE_ID,NAME)VALUES (-1,'Info not available')
  5132. GO
  5133.  
  5134. INSERT INTO RIDW.D_REQUEST_SOURCE (REQUEST_SOURCE_ID,NAME) VALUES (-1,'Info not available')
  5135. GO
  5136.  
  5137. INSERT INTO RIDW.D_REQUIREMENT (REQUIREMENT_ID,NAME) VALUES (-1,'Info not available')
  5138. GO
  5139.  
  5140. INSERT INTO RIDW.D_REQUIREMENT_CLASSIFICATION (REQUIREMENT_CLASS_ID,NAME) VALUES (-1,'Info not available')
  5141. GO
  5142.  
  5143. INSERT INTO RIDW.D_REQUIREMENT_STATE (STATE_ID,NAME) VALUES (-1,'Info not available')
  5144. GO
  5145.  
  5146. INSERT INTO RIDW.D_RESOLUTION (RESOLUTION_ID,NAME) VALUES(-1,'Info not available')
  5147. GO
  5148.  
  5149. INSERT INTO RIDW.D_SEVERITY (SEVERITY_ID,NAME) VALUES (-1,'Info not available')
  5150. GO
  5151.  
  5152. INSERT INTO RIDW.D_STATUS (STATUS_ID,NAME) VALUES (-1,'Info not available')
  5153. GO
  5154.  
  5155. INSERT INTO RIDW.D_STABILITY (STABILITY_ID,NAME) VALUES (-1,'Info not available')
  5156. GO
  5157.  
  5158. INSERT INTO RIDW.D_DIFFICULTY (DIFFICULTY_ID,NAME) VALUES (-1,'Info not available')
  5159. GO
  5160.  
  5161. INSERT INTO RIDW.D_TESTSUITELOG (TESTSUITELOG_ID,NAME) VALUES (-1,'Info not available')
  5162. GO
  5163.  
  5164. INSERT INTO RIDW.D_TASK (TASK_ID,NAME) VALUES (-1,'Info not available')
  5165. GO
  5166.  
  5167. INSERT INTO RIDW.D_TASK_CLASSIFICATION (TASK_CLASS_ID,NAME) VALUES(-1,'Info not avaialble')
  5168. GO
  5169.  
  5170. INSERT INTO RIDW.D_TASK_STATE (STATE_ID,NAME) VALUES(-1,'Info not avaialble')
  5171. GO
  5172.  
  5173. INSERT INTO RIDW.D_TESTCASE (TESTCASE_ID,NAME) VALUES (-1,'Info not available')
  5174. GO
  5175.  
  5176. INSERT INTO RIDW.D_TESTCASE_STATE (STATE_ID,NAME) VALUES (-1,'Info not available')
  5177. GO
  5178.  
  5179. INSERT INTO RIDW.D_TIMESHEET_STATE (STATE_ID,NAME) VALUES (-1,'Info not available')
  5180. GO
  5181.  
  5182. INSERT INTO RIDW.D_EXECUTION_RESULT (EXECUTION_RESULT_ID,NAME) VALUES (-1,'Info not available')
  5183. GO
  5184.  
  5185. INSERT INTO RIDW.D_EXECUTION_WORKITEM (EXECWORKITEM_ID,NAME) VALUES (-1,'Info not available')
  5186. GO
  5187.  
  5188. INSERT INTO RIDW.D_TESTPLAN (TESTPLAN_ID,NAME) VALUES (-1,'Info not available')
  5189. GO
  5190.  
  5191. INSERT INTO RIDW.D_TESTPLAN_STATE (STATE_ID,NAME) VALUES (-1,'Info not available')
  5192. GO
  5193.  
  5194. INSERT INTO RIDW.D_TESTSUITE (TESTSUITE_ID,NAME) VALUES (-1,'Info not available')
  5195. GO
  5196.  
  5197. INSERT INTO RIDW.D_TESTSUITE_STATE (STATE_ID,NAME) VALUES (-1,'Info not available')
  5198. GO
  5199.  
  5200. INSERT INTO RIDW.D_VERDICT (VERDICT_ID,NAME) VALUES (-1,'Info not available')
  5201. GO
  5202.  
  5203. INSERT INTO RIDW.D_ACTIVITY_STATE (STATE_ID, NAME) VALUES(-1,'Info not available')
  5204. GO
  5205.  
  5206. INSERT INTO RIDW.D_ACTIVITY_CLASSIFICATION (ACTIVITY_CLASS_ID,NAME) VALUES(-1,'Info not avaialble')
  5207. GO
  5208.  
  5209. INSERT INTO RIDW.D_COMPONENT_CLASSIFICATION (COMPONENT_CLASS_ID,NAME) VALUES(-1,'Info not avaialble')
  5210. GO
  5211.  
  5212. INSERT INTO RIDW.D_PROJECT_CLASSIFICATION (PROJECT_CLASS_ID,NAME) VALUES(-1,'Info not avaialble')
  5213. GO
  5214.  
  5215. INSERT INTO RIDW.D_ASSETREGISTRY (ASSETREGISTRY_ID,NAME) VALUES(-1,'Info not avaialble')
  5216. GO
  5217.  
  5218. INSERT INTO RIDW.D_TASK_TYPE (TASK_TYPE_ID,NAME) VALUES(-1,'Info not avaialble')
  5219. GO
  5220.  
  5221. INSERT INTO RIDW.D_BUILD_TYPE (BUILD_TYPE_ID,NAME) VALUES(-1,'Info not avaialble')
  5222. GO
  5223.  
  5224. INSERT INTO RIDW.D_TESTCASE_CLASSIFICATION(TESTCASE_CLASS_ID,NAME) VALUES(-1,'Info not avaialble')
  5225. GO
  5226.  
  5227. INSERT INTO RIDW.D_EXECWORKITEM_CLASSIFICATION(EXECWORKIT_CLASS_ID,NAME) VALUES(-1,'Info not avaialble')
  5228. GO
  5229.  
  5230. INSERT INTO RIDW.D_EXECRESULT_CLASSIFICATION (EXECRES_CLASS_ID,NAME) VALUES(-1,'Info not avaialble')
  5231. GO
  5232.  
  5233. INSERT INTO RIDW.D_TESTSUITE_CLASSIFICATION (TESTSUITE_CLASS_ID,NAME) VALUES(-1,'Info not avaialble')
  5234. GO
  5235.  
  5236. INSERT INTO RIDW.D_REQUEST_TYPE (REQUEST_TYPE_ID,NAME) VALUES (-1,'Info not avaialble')
  5237. GO
  5238.  
  5239. INSERT INTO RIDW.D_CONFIGURATION (CONFIGURATION_ID,NAME) VALUES (-1,'Info not avaialble')
  5240. GO
  5241.  
  5242. INSERT INTO RIDW.D_RESOURCE_GROUP (RESOURCE_GROUP_ID,NAME) VALUES (-1,'Info not avaialble')
  5243. GO
  5244.  
  5245. INSERT INTO RIDW.D_LAB_RESOURCE (LAB_RESOURCE_ID,NAME) VALUES (-1,'Info not avaialble')
  5246. GO
  5247.  
  5248. INSERT INTO RIDW.D_OS_TYPE (OS_TYPE_ID,NAME) VALUES (-1,'Info not avaialble')
  5249. GO
  5250.  
  5251. INSERT INTO RIDW.D_DATE (DATE_ID,PERIOD_START_DATE ,DAY_OF_WEEK,DAY_OF_MONTH,DAY_OF_YEAR,DAY_NAME,WEEK_OF_MONTH,WEEK_OF_YEAR,WEEK_NO,MONTH_OF_YEAR,MONTH_NAME,MONTH_NO,QUARTER_OF_YEAR,QUARTER_NO,YEAR_OF,DAY_OF_WEEK_ISO,WEEK_OF_MONTH_ISO,WEEK_OF_YEAR_ISO,WEEK_NO_ISO) VALUES (-1,'1899-12-31',-1,-1,-1,'No dayname',-1,-1,-1,-1,'No month',-1,-1,-1,-1,-1,-1,-1,-1)
  5252. GO
  5253.  
  5254. INSERT INTO RIDW.D_REQUEST_CATEGORY (REQUEST_CATEGORY_ID,NAME) VALUES (-1,'Info not available')
  5255. GO
  5256.  
  5257. INSERT INTO RIDW.D_FILE_CLASSIFICATION (FILE_CLASS_ID,NAME) VALUES (-1,'Info not available')
  5258. GO
  5259.  
  5260. INSERT INTO RIDW.D_FILE_STREAM_CLASSIFICATION (FILE_STREAM_CLASS_ID,NAME) VALUES (-1,'Info not available')
  5261. GO
  5262.  
  5263. INSERT INTO RIDW.D_BUILD_CLASSIFICATION (BUILD_CLASS_ID,NAME) VALUES (-1,'Info not available')
  5264. GO
  5265.  
  5266. INSERT INTO RIDW.D_JOB (JOB_ID,NAME) VALUES (-1,'Info not available')
  5267. GO
  5268.  
  5269. INSERT INTO RIDW.D_JOB_RESULT (JOB_RESULT_ID,NAME) VALUES (-1,'Info not available')
  5270. GO
  5271.  
  5272. INSERT INTO RIDW.D_JOB_RESULT_STATE (STATE_ID,NAME) VALUES (-1,'Info not available')
  5273. GO
  5274.  
  5275. INSERT INTO RIDW.D_PROJECT_ALLOCATION (PROJECT_ALLOCATION_ID,NAME) VALUES (-1,'Info not available')
  5276. GO
  5277.  
  5278. INSERT INTO RIDW.D_SKILL (SKILL_ID,NAME) VALUES (-1,'Info not available')
  5279. GO
  5280.  
  5281. INSERT INTO RIDW.D_COMPETENCY (COMPETENCY_ID,NAME) VALUES (-1,'Info not available')
  5282. GO
  5283.  
  5284. INSERT INTO RIDW.D_POOL (POOL_ID,NAME) VALUES (-1,'Info not available')
  5285. GO
  5286.  
  5287. INSERT INTO RIDW.D_BASELINE (BASELINE_ID,NAME) VALUES (-1,'Info not available')
  5288. GO
  5289.  
  5290. INSERT INTO RIDW.D_CHARGECODE (CHARGECODE_ID,NAME) VALUES (-1,'Info not available')
  5291. GO
  5292.  
  5293. INSERT INTO RIDW.D_TIMECODE (TIMECODE_ID,NAME) VALUES (-1,'Info not available')
  5294. GO
  5295.  
  5296. INSERT INTO RIDW.D_RISK (RISK_ID,NAME) VALUES (-1,'Info not available')
  5297. GO
  5298.  
  5299. INSERT INTO RIDW.D_RISK_STATE (STATE_ID,NAME) VALUES (-1,'Info not available')
  5300. GO
  5301.  
  5302. INSERT INTO RIDW.D_IMPACT_RANK (IMPACT_RANK_ID,NAME) VALUES (-1,'Info not available')
  5303. GO
  5304.  
  5305. INSERT INTO RIDW.D_PROBABILITY_RANK (PROBABILITY_RANK_ID,NAME) VALUES (-1,'Info not available')
  5306. GO
  5307.  
  5308. INSERT INTO RIDW.D_PROBABILITY_COST_RANK (PROBABILITY_COST_RANK_ID,NAME) VALUES (-1,'Info not available')
  5309. GO
  5310.  
  5311. INSERT INTO RIDW.D_SCORE_RANK (SCORE_RANK_ID,NAME) VALUES (-1,'Info not available')
  5312. GO
  5313.  
  5314. INSERT INTO RIDW.D_OPERATING_TERRITORY (TERRITORY_ID,NAME) VALUES (-1,'Info not available')
  5315. GO
  5316.  
  5317. INSERT INTO RIDW.D_COUNTRY (COUNTRY_ID,NAME,TERRITORY_ID) VALUES (-1,'Info not available',-1)
  5318. GO
  5319.  
  5320. INSERT INTO RIDW.D_PROVINCE_STATE (PROVINCE_STATE_ID,NAME,COUNTRY_ID) VALUES (-1,'Info not available',-1)
  5321. GO
  5322.  
  5323. INSERT INTO RIDW.D_CITY (CITY_ID,NAME,PROVINCE_STATE_ID) VALUES (-1,'Info not available',-1)
  5324. GO
  5325.  
  5326. INSERT INTO RIDW.D_ORGANIZATION (ORGANIZATION_ID,NAME) VALUES (-1,'Info not available')
  5327. GO
  5328.  
  5329. INSERT INTO RIDW.D_AGE_RANK (AGE_RANK_ID,NAME) VALUES (-1,'Info not available')
  5330. GO
  5331.  
  5332. INSERT INTO RIDW.D_AGE_RANK (AGE_RANK_ID,NAME) VALUES (1,'< 30 days')
  5333. GO
  5334.  
  5335. INSERT INTO RIDW.D_AGE_RANK (AGE_RANK_ID,NAME) VALUES (2,'30 > and < 90 days')
  5336. GO
  5337.  
  5338. INSERT INTO RIDW.D_AGE_RANK (AGE_RANK_ID,NAME) VALUES (3,'> 90 days')
  5339. GO
  5340.  
  5341. INSERT INTO RIDW.D_PORTFOLIO (PORTFOLIO_ID,NAME) VALUES (-1,'Info not available')
  5342. GO
  5343.  
  5344. INSERT INTO RIDW.D_REQUIREMENT_TYPE (REQUIREMENT_TYPE_ID,NAME) VALUES (-1,'Info not available')
  5345. GO
  5346.  
  5347. INSERT INTO RIDW.D_ASSET (ASSET_ID,NAME) VALUES(-1,'Info not available')
  5348. GO
  5349.  
  5350. INSERT INTO RIDW.D_ACTION_TYPE (ACTION_TYPE_ID,NAME) VALUES(-1,'Info not available')
  5351. GO
  5352.  
  5353. INSERT INTO RIDW.D_REQUEST_PRIORITY (PRIORITY_ID,NAME) values (-1,'Info not available')
  5354. GO
  5355.  
  5356. INSERT INTO RIDW.D_REQUEST_SEVERITY (SEVERITY_ID,NAME) values (-1,'Info not available')
  5357. GO
  5358.  
  5359. INSERT INTO RIDW.D_REQUEST_STATUS (STATUS_ID,NAME) values (-1,'Info not available')
  5360. GO
  5361.  
  5362. INSERT INTO RIDW.D_ASSET_TYPE (ASSET_TYPE_ID,NAME) VALUES(-1,'Info not available')
  5363. GO
  5364.  
  5365. INSERT INTO RIDW.D_BALLOT_TAB (BALLOT_TAB_ID,NAME) VALUES(-1,'Info not available')
  5366. GO
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top