SHARE
TWEET

Untitled

a guest Jun 25th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ALTER TABLE ONLY pmieducar.servidor_afastamento
  2.     ADD CONSTRAINT servidor_afastamento_ref_cod_motivo_afastamento_fkey FOREIGN KEY (ref_cod_motivo_afastamento) REFERENCES pmieducar.motivo_afastamento(cod_motivo_afastamento) ON UPDATE RESTRICT ON DELETE RESTRICT;
  3.  
  4.  
  5. --
  6. -- TOC entry 7031 (class 2606 OID 9467973)
  7. -- Name: servidor_afastamento_ref_cod_servidor_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  8. --
  9.  
  10. ALTER TABLE ONLY pmieducar.servidor_afastamento
  11.     ADD CONSTRAINT servidor_afastamento_ref_cod_servidor_fkey FOREIGN KEY (ref_cod_servidor, ref_ref_cod_instituicao) REFERENCES pmieducar.servidor(cod_servidor, ref_cod_instituicao) ON UPDATE RESTRICT ON DELETE RESTRICT;
  12.  
  13.  
  14. --
  15. -- TOC entry 7030 (class 2606 OID 9467978)
  16. -- Name: servidor_afastamento_ref_usuario_cad_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  17. --
  18.  
  19. ALTER TABLE ONLY pmieducar.servidor_afastamento
  20.     ADD CONSTRAINT servidor_afastamento_ref_usuario_cad_fkey FOREIGN KEY (ref_usuario_cad) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  21.  
  22.  
  23. --
  24. -- TOC entry 7029 (class 2606 OID 9467983)
  25. -- Name: servidor_afastamento_ref_usuario_exc_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  26. --
  27.  
  28. ALTER TABLE ONLY pmieducar.servidor_afastamento
  29.     ADD CONSTRAINT servidor_afastamento_ref_usuario_exc_fkey FOREIGN KEY (ref_usuario_exc) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  30.  
  31.  
  32. --
  33. -- TOC entry 7036 (class 2606 OID 9467988)
  34. -- Name: servidor_alocacao_ref_cod_escola_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  35. --
  36.  
  37. ALTER TABLE ONLY pmieducar.servidor_alocacao
  38.     ADD CONSTRAINT servidor_alocacao_ref_cod_escola_fkey FOREIGN KEY (ref_cod_escola) REFERENCES pmieducar.escola(cod_escola) ON UPDATE RESTRICT ON DELETE RESTRICT;
  39.  
  40.  
  41. --
  42. -- TOC entry 7035 (class 2606 OID 9467993)
  43. -- Name: servidor_alocacao_ref_cod_servidor_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  44. --
  45.  
  46. ALTER TABLE ONLY pmieducar.servidor_alocacao
  47.     ADD CONSTRAINT servidor_alocacao_ref_cod_servidor_fkey FOREIGN KEY (ref_cod_servidor, ref_ref_cod_instituicao) REFERENCES pmieducar.servidor(cod_servidor, ref_cod_instituicao) ON UPDATE RESTRICT ON DELETE RESTRICT;
  48.  
  49.  
  50. --
  51. -- TOC entry 7034 (class 2606 OID 9467998)
  52. -- Name: servidor_alocacao_ref_usuario_cad_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  53. --
  54.  
  55. ALTER TABLE ONLY pmieducar.servidor_alocacao
  56.     ADD CONSTRAINT servidor_alocacao_ref_usuario_cad_fkey FOREIGN KEY (ref_usuario_cad) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  57.  
  58.  
  59. --
  60. -- TOC entry 7033 (class 2606 OID 9468003)
  61. -- Name: servidor_alocacao_ref_usuario_exc_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  62. --
  63.  
  64. ALTER TABLE ONLY pmieducar.servidor_alocacao
  65.     ADD CONSTRAINT servidor_alocacao_ref_usuario_exc_fkey FOREIGN KEY (ref_usuario_exc) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  66.  
  67.  
  68. --
  69. -- TOC entry 7037 (class 2606 OID 9468008)
  70. -- Name: servidor_curso_ref_cod_formacao_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  71. --
  72.  
  73. ALTER TABLE ONLY pmieducar.servidor_curso
  74.     ADD CONSTRAINT servidor_curso_ref_cod_formacao_fkey FOREIGN KEY (ref_cod_formacao) REFERENCES pmieducar.servidor_formacao(cod_formacao) ON UPDATE RESTRICT ON DELETE RESTRICT;
  75.  
  76.  
  77. --
  78. -- TOC entry 7039 (class 2606 OID 9468013)
  79. -- Name: servidor_cuso_ministra_ref_cod_curso_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  80. --
  81.  
  82. ALTER TABLE ONLY pmieducar.servidor_curso_ministra
  83.     ADD CONSTRAINT servidor_cuso_ministra_ref_cod_curso_fkey FOREIGN KEY (ref_cod_curso) REFERENCES pmieducar.curso(cod_curso) ON UPDATE RESTRICT ON DELETE RESTRICT;
  84.  
  85.  
  86. --
  87. -- TOC entry 7038 (class 2606 OID 9468018)
  88. -- Name: servidor_cuso_ministra_ref_cod_servidor_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  89. --
  90.  
  91. ALTER TABLE ONLY pmieducar.servidor_curso_ministra
  92.     ADD CONSTRAINT servidor_cuso_ministra_ref_cod_servidor_fkey FOREIGN KEY (ref_cod_servidor, ref_ref_cod_instituicao) REFERENCES pmieducar.servidor(cod_servidor, ref_cod_instituicao) ON UPDATE RESTRICT ON DELETE RESTRICT;
  93.  
  94.  
  95. --
  96. -- TOC entry 7041 (class 2606 OID 9468023)
  97. -- Name: servidor_disciplina_ref_cod_disciplina_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  98. --
  99.  
  100. ALTER TABLE ONLY pmieducar.servidor_disciplina
  101.     ADD CONSTRAINT servidor_disciplina_ref_cod_disciplina_fkey FOREIGN KEY (ref_cod_disciplina) REFERENCES modules.componente_curricular(id) ON UPDATE RESTRICT ON DELETE RESTRICT;
  102.  
  103.  
  104. --
  105. -- TOC entry 7040 (class 2606 OID 9468028)
  106. -- Name: servidor_disciplina_ref_cod_servidor_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  107. --
  108.  
  109. ALTER TABLE ONLY pmieducar.servidor_disciplina
  110.     ADD CONSTRAINT servidor_disciplina_ref_cod_servidor_fkey FOREIGN KEY (ref_cod_servidor, ref_ref_cod_instituicao) REFERENCES pmieducar.servidor(cod_servidor, ref_cod_instituicao) ON UPDATE RESTRICT ON DELETE RESTRICT;
  111.  
  112.  
  113. --
  114. -- TOC entry 7044 (class 2606 OID 9468033)
  115. -- Name: servidor_formacao_ref_cod_servidor_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  116. --
  117.  
  118. ALTER TABLE ONLY pmieducar.servidor_formacao
  119.     ADD CONSTRAINT servidor_formacao_ref_cod_servidor_fkey FOREIGN KEY (ref_cod_servidor, ref_ref_cod_instituicao) REFERENCES pmieducar.servidor(cod_servidor, ref_cod_instituicao) ON UPDATE RESTRICT ON DELETE RESTRICT;
  120.  
  121.  
  122. --
  123. -- TOC entry 7043 (class 2606 OID 9468038)
  124. -- Name: servidor_formacao_ref_usuario_cad_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  125. --
  126.  
  127. ALTER TABLE ONLY pmieducar.servidor_formacao
  128.     ADD CONSTRAINT servidor_formacao_ref_usuario_cad_fkey FOREIGN KEY (ref_usuario_cad) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  129.  
  130.  
  131. --
  132. -- TOC entry 7042 (class 2606 OID 9468043)
  133. -- Name: servidor_formacao_ref_usuario_exc_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  134. --
  135.  
  136. ALTER TABLE ONLY pmieducar.servidor_formacao
  137.     ADD CONSTRAINT servidor_formacao_ref_usuario_exc_fkey FOREIGN KEY (ref_usuario_exc) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  138.  
  139.  
  140. --
  141. -- TOC entry 7046 (class 2606 OID 9468048)
  142. -- Name: servidor_funcao_ref_cod_funcao_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  143. --
  144.  
  145. ALTER TABLE ONLY pmieducar.servidor_funcao
  146.     ADD CONSTRAINT servidor_funcao_ref_cod_funcao_fkey FOREIGN KEY (ref_cod_funcao) REFERENCES pmieducar.funcao(cod_funcao) ON UPDATE RESTRICT ON DELETE RESTRICT;
  147.  
  148.  
  149. --
  150. -- TOC entry 7045 (class 2606 OID 9468053)
  151. -- Name: servidor_funcao_ref_cod_servidor_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  152. --
  153.  
  154. ALTER TABLE ONLY pmieducar.servidor_funcao
  155.     ADD CONSTRAINT servidor_funcao_ref_cod_servidor_fkey FOREIGN KEY (ref_cod_servidor, ref_ref_cod_instituicao) REFERENCES pmieducar.servidor(cod_servidor, ref_cod_instituicao) ON UPDATE RESTRICT ON DELETE RESTRICT;
  156.  
  157.  
  158. --
  159. -- TOC entry 7023 (class 2606 OID 9468058)
  160. -- Name: servidor_ref_cod_instituicao_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  161. --
  162.  
  163. ALTER TABLE ONLY pmieducar.servidor
  164.     ADD CONSTRAINT servidor_ref_cod_instituicao_fkey FOREIGN KEY (ref_cod_instituicao) REFERENCES pmieducar.instituicao(cod_instituicao) ON UPDATE RESTRICT ON DELETE RESTRICT;
  165.  
  166.  
  167. --
  168. -- TOC entry 7024 (class 2606 OID 9468063)
  169. -- Name: servidor_ref_cod_subnivel_; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  170. --
  171.  
  172. ALTER TABLE ONLY pmieducar.servidor
  173.     ADD CONSTRAINT servidor_ref_cod_subnivel_ FOREIGN KEY (ref_cod_subnivel) REFERENCES pmieducar.subnivel(cod_subnivel) ON UPDATE RESTRICT ON DELETE RESTRICT;
  174.  
  175.  
  176. --
  177. -- TOC entry 7025 (class 2606 OID 9468068)
  178. -- Name: servidor_ref_idesco_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  179. --
  180.  
  181. ALTER TABLE ONLY pmieducar.servidor
  182.     ADD CONSTRAINT servidor_ref_idesco_fkey FOREIGN KEY (ref_idesco) REFERENCES cadastro.escolaridade(idesco) ON UPDATE RESTRICT ON DELETE RESTRICT;
  183.  
  184.  
  185. --
  186. -- TOC entry 7047 (class 2606 OID 9468073)
  187. -- Name: servidor_titulo_concurso_ref_cod_formacao_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  188. --
  189.  
  190. ALTER TABLE ONLY pmieducar.servidor_titulo_concurso
  191.     ADD CONSTRAINT servidor_titulo_concurso_ref_cod_formacao_fkey FOREIGN KEY (ref_cod_formacao) REFERENCES pmieducar.servidor_formacao(cod_formacao) ON UPDATE RESTRICT ON DELETE RESTRICT;
  192.  
  193.  
  194. --
  195. -- TOC entry 7050 (class 2606 OID 9468078)
  196. -- Name: situacao_ref_cod_biblioteca; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  197. --
  198.  
  199. ALTER TABLE ONLY pmieducar.situacao
  200.     ADD CONSTRAINT situacao_ref_cod_biblioteca FOREIGN KEY (ref_cod_biblioteca) REFERENCES pmieducar.biblioteca(cod_biblioteca) ON UPDATE RESTRICT ON DELETE RESTRICT;
  201.  
  202.  
  203. --
  204. -- TOC entry 7049 (class 2606 OID 9468083)
  205. -- Name: situacao_ref_usuario_cad_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  206. --
  207.  
  208. ALTER TABLE ONLY pmieducar.situacao
  209.     ADD CONSTRAINT situacao_ref_usuario_cad_fkey FOREIGN KEY (ref_usuario_cad) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  210.  
  211.  
  212. --
  213. -- TOC entry 7048 (class 2606 OID 9468088)
  214. -- Name: situacao_ref_usuario_exc_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  215. --
  216.  
  217. ALTER TABLE ONLY pmieducar.situacao
  218.     ADD CONSTRAINT situacao_ref_usuario_exc_fkey FOREIGN KEY (ref_usuario_exc) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  219.  
  220.  
  221. --
  222. -- TOC entry 7054 (class 2606 OID 9468093)
  223. -- Name: subnivel_ref_cod_nivel_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  224. --
  225.  
  226. ALTER TABLE ONLY pmieducar.subnivel
  227.     ADD CONSTRAINT subnivel_ref_cod_nivel_fkey FOREIGN KEY (ref_cod_nivel) REFERENCES pmieducar.nivel(cod_nivel) ON UPDATE RESTRICT ON DELETE RESTRICT;
  228.  
  229.  
  230. --
  231. -- TOC entry 7053 (class 2606 OID 9468098)
  232. -- Name: subnivel_ref_cod_subnivel_anterior_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  233. --
  234.  
  235. ALTER TABLE ONLY pmieducar.subnivel
  236.     ADD CONSTRAINT subnivel_ref_cod_subnivel_anterior_fkey FOREIGN KEY (ref_cod_subnivel_anterior) REFERENCES pmieducar.subnivel(cod_subnivel) ON UPDATE RESTRICT ON DELETE RESTRICT;
  237.  
  238.  
  239. --
  240. -- TOC entry 7052 (class 2606 OID 9468103)
  241. -- Name: subnivel_ref_usuario_cad_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  242. --
  243.  
  244. ALTER TABLE ONLY pmieducar.subnivel
  245.     ADD CONSTRAINT subnivel_ref_usuario_cad_fkey FOREIGN KEY (ref_usuario_cad) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  246.  
  247.  
  248. --
  249. -- TOC entry 7051 (class 2606 OID 9468108)
  250. -- Name: subnivel_ref_usuario_exc_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  251. --
  252.  
  253. ALTER TABLE ONLY pmieducar.subnivel
  254.     ADD CONSTRAINT subnivel_ref_usuario_exc_fkey FOREIGN KEY (ref_usuario_exc) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  255.  
  256.  
  257. --
  258. -- TOC entry 7057 (class 2606 OID 9468113)
  259. -- Name: tipo_avaliacao_ref_cod_instituicao; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  260. --
  261.  
  262. ALTER TABLE ONLY pmieducar.tipo_avaliacao
  263.     ADD CONSTRAINT tipo_avaliacao_ref_cod_instituicao FOREIGN KEY (ref_cod_instituicao) REFERENCES pmieducar.instituicao(cod_instituicao) ON UPDATE RESTRICT ON DELETE RESTRICT;
  264.  
  265.  
  266. --
  267. -- TOC entry 7056 (class 2606 OID 9468118)
  268. -- Name: tipo_avaliacao_ref_usuario_cad_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  269. --
  270.  
  271. ALTER TABLE ONLY pmieducar.tipo_avaliacao
  272.     ADD CONSTRAINT tipo_avaliacao_ref_usuario_cad_fkey FOREIGN KEY (ref_usuario_cad) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  273.  
  274.  
  275. --
  276. -- TOC entry 7055 (class 2606 OID 9468123)
  277. -- Name: tipo_avaliacao_ref_usuario_exc_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  278. --
  279.  
  280. ALTER TABLE ONLY pmieducar.tipo_avaliacao
  281.     ADD CONSTRAINT tipo_avaliacao_ref_usuario_exc_fkey FOREIGN KEY (ref_usuario_exc) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  282.  
  283.  
  284. --
  285. -- TOC entry 7058 (class 2606 OID 9468128)
  286. -- Name: tipo_avaliacao_valores_ref_cod_tipo_avaliacao_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  287. --
  288.  
  289. ALTER TABLE ONLY pmieducar.tipo_avaliacao_valores
  290.     ADD CONSTRAINT tipo_avaliacao_valores_ref_cod_tipo_avaliacao_fkey FOREIGN KEY (ref_cod_tipo_avaliacao) REFERENCES pmieducar.tipo_avaliacao(cod_tipo_avaliacao) ON UPDATE RESTRICT ON DELETE RESTRICT;
  291.  
  292.  
  293. --
  294. -- TOC entry 7061 (class 2606 OID 9468133)
  295. -- Name: tipo_dispensa_ref_cod_instituicao_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  296. --
  297.  
  298. ALTER TABLE ONLY pmieducar.tipo_dispensa
  299.     ADD CONSTRAINT tipo_dispensa_ref_cod_instituicao_fkey FOREIGN KEY (ref_cod_instituicao) REFERENCES pmieducar.instituicao(cod_instituicao) ON UPDATE RESTRICT ON DELETE RESTRICT;
  300.  
  301.  
  302. --
  303. -- TOC entry 7060 (class 2606 OID 9468138)
  304. -- Name: tipo_dispensa_ref_usuario_cad_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  305. --
  306.  
  307. ALTER TABLE ONLY pmieducar.tipo_dispensa
  308.     ADD CONSTRAINT tipo_dispensa_ref_usuario_cad_fkey FOREIGN KEY (ref_usuario_cad) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  309.  
  310.  
  311. --
  312. -- TOC entry 7059 (class 2606 OID 9468143)
  313. -- Name: tipo_dispensa_ref_usuario_exc_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  314. --
  315.  
  316. ALTER TABLE ONLY pmieducar.tipo_dispensa
  317.     ADD CONSTRAINT tipo_dispensa_ref_usuario_exc_fkey FOREIGN KEY (ref_usuario_exc) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  318.  
  319.  
  320. --
  321. -- TOC entry 7064 (class 2606 OID 9468148)
  322. -- Name: tipo_ensino_ref_cod_instituicao; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  323. --
  324.  
  325. ALTER TABLE ONLY pmieducar.tipo_ensino
  326.     ADD CONSTRAINT tipo_ensino_ref_cod_instituicao FOREIGN KEY (ref_cod_instituicao) REFERENCES pmieducar.instituicao(cod_instituicao) ON UPDATE RESTRICT ON DELETE RESTRICT;
  327.  
  328.  
  329. --
  330. -- TOC entry 7063 (class 2606 OID 9468153)
  331. -- Name: tipo_ensino_ref_usuario_cad_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  332. --
  333.  
  334. ALTER TABLE ONLY pmieducar.tipo_ensino
  335.     ADD CONSTRAINT tipo_ensino_ref_usuario_cad_fkey FOREIGN KEY (ref_usuario_cad) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  336.  
  337.  
  338. --
  339. -- TOC entry 7062 (class 2606 OID 9468158)
  340. -- Name: tipo_ensino_ref_usuario_exc_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  341. --
  342.  
  343. ALTER TABLE ONLY pmieducar.tipo_ensino
  344.     ADD CONSTRAINT tipo_ensino_ref_usuario_exc_fkey FOREIGN KEY (ref_usuario_exc) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  345.  
  346.  
  347. --
  348. -- TOC entry 7067 (class 2606 OID 9468163)
  349. -- Name: tipo_ocorrencia_disciplinar_ref_cod_instituicao_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  350. --
  351.  
  352. ALTER TABLE ONLY pmieducar.tipo_ocorrencia_disciplinar
  353.     ADD CONSTRAINT tipo_ocorrencia_disciplinar_ref_cod_instituicao_fkey FOREIGN KEY (ref_cod_instituicao) REFERENCES pmieducar.instituicao(cod_instituicao) ON UPDATE RESTRICT ON DELETE RESTRICT;
  354.  
  355.  
  356. --
  357. -- TOC entry 7066 (class 2606 OID 9468168)
  358. -- Name: tipo_ocorrencia_disciplinar_ref_usuario_cad_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  359. --
  360.  
  361. ALTER TABLE ONLY pmieducar.tipo_ocorrencia_disciplinar
  362.     ADD CONSTRAINT tipo_ocorrencia_disciplinar_ref_usuario_cad_fkey FOREIGN KEY (ref_usuario_cad) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  363.  
  364.  
  365. --
  366. -- TOC entry 7065 (class 2606 OID 9468173)
  367. -- Name: tipo_ocorrencia_disciplinar_ref_usuario_exc_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  368. --
  369.  
  370. ALTER TABLE ONLY pmieducar.tipo_ocorrencia_disciplinar
  371.     ADD CONSTRAINT tipo_ocorrencia_disciplinar_ref_usuario_exc_fkey FOREIGN KEY (ref_usuario_exc) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  372.  
  373.  
  374. --
  375. -- TOC entry 7070 (class 2606 OID 9468178)
  376. -- Name: tipo_regime_ref_cod_instituicao; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  377. --
  378.  
  379. ALTER TABLE ONLY pmieducar.tipo_regime
  380.     ADD CONSTRAINT tipo_regime_ref_cod_instituicao FOREIGN KEY (ref_cod_instituicao) REFERENCES pmieducar.instituicao(cod_instituicao) ON UPDATE RESTRICT ON DELETE RESTRICT;
  381.  
  382.  
  383. --
  384. -- TOC entry 7069 (class 2606 OID 9468183)
  385. -- Name: tipo_regime_ref_usuario_cad_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  386. --
  387.  
  388. ALTER TABLE ONLY pmieducar.tipo_regime
  389.     ADD CONSTRAINT tipo_regime_ref_usuario_cad_fkey FOREIGN KEY (ref_usuario_cad) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  390.  
  391.  
  392. --
  393. -- TOC entry 7068 (class 2606 OID 9468188)
  394. -- Name: tipo_regime_ref_usuario_exc_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  395. --
  396.  
  397. ALTER TABLE ONLY pmieducar.tipo_regime
  398.     ADD CONSTRAINT tipo_regime_ref_usuario_exc_fkey FOREIGN KEY (ref_usuario_exc) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  399.  
  400.  
  401. --
  402. -- TOC entry 7072 (class 2606 OID 9468193)
  403. -- Name: tipo_usuario_ref_funcionario_cad_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  404. --
  405.  
  406. ALTER TABLE ONLY pmieducar.tipo_usuario
  407.     ADD CONSTRAINT tipo_usuario_ref_funcionario_cad_fkey FOREIGN KEY (ref_funcionario_cad) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  408.  
  409.  
  410. --
  411. -- TOC entry 7071 (class 2606 OID 9468198)
  412. -- Name: tipo_usuario_ref_funcionario_exc_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  413. --
  414.  
  415. ALTER TABLE ONLY pmieducar.tipo_usuario
  416.     ADD CONSTRAINT tipo_usuario_ref_funcionario_exc_fkey FOREIGN KEY (ref_funcionario_exc) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  417.  
  418.  
  419. --
  420. -- TOC entry 7077 (class 2606 OID 9468203)
  421. -- Name: transferencia_solicitacao_ref_cod_matricula_entrada_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  422. --
  423.  
  424. ALTER TABLE ONLY pmieducar.transferencia_solicitacao
  425.     ADD CONSTRAINT transferencia_solicitacao_ref_cod_matricula_entrada_fkey FOREIGN KEY (ref_cod_matricula_entrada) REFERENCES pmieducar.matricula(cod_matricula) ON UPDATE RESTRICT ON DELETE RESTRICT;
  426.  
  427.  
  428. --
  429. -- TOC entry 7076 (class 2606 OID 9468208)
  430. -- Name: transferencia_solicitacao_ref_cod_matricula_saida_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  431. --
  432.  
  433. ALTER TABLE ONLY pmieducar.transferencia_solicitacao
  434.     ADD CONSTRAINT transferencia_solicitacao_ref_cod_matricula_saida_fkey FOREIGN KEY (ref_cod_matricula_saida) REFERENCES pmieducar.matricula(cod_matricula) ON UPDATE RESTRICT ON DELETE RESTRICT;
  435.  
  436.  
  437. --
  438. -- TOC entry 7075 (class 2606 OID 9468213)
  439. -- Name: transferencia_solicitacao_ref_cod_transferencia_tipo_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  440. --
  441.  
  442. ALTER TABLE ONLY pmieducar.transferencia_solicitacao
  443.     ADD CONSTRAINT transferencia_solicitacao_ref_cod_transferencia_tipo_fkey FOREIGN KEY (ref_cod_transferencia_tipo) REFERENCES pmieducar.transferencia_tipo(cod_transferencia_tipo) ON UPDATE RESTRICT ON DELETE RESTRICT;
  444.  
  445.  
  446. --
  447. -- TOC entry 7074 (class 2606 OID 9468218)
  448. -- Name: transferencia_solicitacao_ref_usuario_cad_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  449. --
  450.  
  451. ALTER TABLE ONLY pmieducar.transferencia_solicitacao
  452.     ADD CONSTRAINT transferencia_solicitacao_ref_usuario_cad_fkey FOREIGN KEY (ref_usuario_cad) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  453.  
  454.  
  455. --
  456. -- TOC entry 7073 (class 2606 OID 9468223)
  457. -- Name: transferencia_solicitacao_ref_usuario_exc_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  458. --
  459.  
  460. ALTER TABLE ONLY pmieducar.transferencia_solicitacao
  461.     ADD CONSTRAINT transferencia_solicitacao_ref_usuario_exc_fkey FOREIGN KEY (ref_usuario_exc) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  462.  
  463.  
  464. --
  465. -- TOC entry 7080 (class 2606 OID 9468228)
  466. -- Name: transferencia_tipo_ref_cod_instituicao; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  467. --
  468.  
  469. ALTER TABLE ONLY pmieducar.transferencia_tipo
  470.     ADD CONSTRAINT transferencia_tipo_ref_cod_instituicao FOREIGN KEY (ref_cod_instituicao) REFERENCES pmieducar.instituicao(cod_instituicao) ON UPDATE RESTRICT ON DELETE RESTRICT;
  471.  
  472.  
  473. --
  474. -- TOC entry 7079 (class 2606 OID 9468233)
  475. -- Name: transferencia_tipo_ref_usuario_cad_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  476. --
  477.  
  478. ALTER TABLE ONLY pmieducar.transferencia_tipo
  479.     ADD CONSTRAINT transferencia_tipo_ref_usuario_cad_fkey FOREIGN KEY (ref_usuario_cad) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  480.  
  481.  
  482. --
  483. -- TOC entry 7078 (class 2606 OID 9468238)
  484. -- Name: transferencia_tipo_ref_usuario_exc_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  485. --
  486.  
  487. ALTER TABLE ONLY pmieducar.transferencia_tipo
  488.     ADD CONSTRAINT transferencia_tipo_ref_usuario_exc_fkey FOREIGN KEY (ref_usuario_exc) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  489.  
  490.  
  491. --
  492. -- TOC entry 7082 (class 2606 OID 9468248)
  493. -- Name: turma_escola_serie_muil; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  494. --
  495.  
  496. ALTER TABLE ONLY pmieducar.turma
  497.     ADD CONSTRAINT turma_escola_serie_muil FOREIGN KEY (ref_ref_cod_serie_mult, ref_ref_cod_escola_mult) REFERENCES pmieducar.escola_serie(ref_cod_serie, ref_cod_escola) ON UPDATE RESTRICT ON DELETE RESTRICT;
  498.  
  499.  
  500. --
  501. -- TOC entry 7093 (class 2606 OID 9468253)
  502. -- Name: turma_modulo_ref_cod_modulo_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  503. --
  504.  
  505. ALTER TABLE ONLY pmieducar.turma_modulo
  506.     ADD CONSTRAINT turma_modulo_ref_cod_modulo_fkey FOREIGN KEY (ref_cod_modulo) REFERENCES pmieducar.modulo(cod_modulo) ON UPDATE RESTRICT ON DELETE RESTRICT;
  507.  
  508.  
  509. --
  510. -- TOC entry 7092 (class 2606 OID 9468258)
  511. -- Name: turma_modulo_ref_cod_turma_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  512. --
  513.  
  514. ALTER TABLE ONLY pmieducar.turma_modulo
  515.     ADD CONSTRAINT turma_modulo_ref_cod_turma_fkey FOREIGN KEY (ref_cod_turma) REFERENCES pmieducar.turma(cod_turma) ON UPDATE RESTRICT ON DELETE RESTRICT;
  516.  
  517.  
  518. --
  519. -- TOC entry 7083 (class 2606 OID 9468263)
  520. -- Name: turma_ref_cod_curso; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  521. --
  522.  
  523. ALTER TABLE ONLY pmieducar.turma
  524.     ADD CONSTRAINT turma_ref_cod_curso FOREIGN KEY (ref_cod_curso) REFERENCES pmieducar.curso(cod_curso) ON UPDATE RESTRICT ON DELETE RESTRICT;
  525.  
  526.  
  527. --
  528. -- TOC entry 7084 (class 2606 OID 9468268)
  529. -- Name: turma_ref_cod_infra_predio_comodo_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  530. --
  531.  
  532. ALTER TABLE ONLY pmieducar.turma
  533.     ADD CONSTRAINT turma_ref_cod_infra_predio_comodo_fkey FOREIGN KEY (ref_cod_infra_predio_comodo) REFERENCES pmieducar.infra_predio_comodo(cod_infra_predio_comodo) ON UPDATE RESTRICT ON DELETE RESTRICT;
  534.  
  535.  
  536. --
  537. -- TOC entry 7085 (class 2606 OID 9468273)
  538. -- Name: turma_ref_cod_instituicao; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  539. --
  540.  
  541. ALTER TABLE ONLY pmieducar.turma
  542.     ADD CONSTRAINT turma_ref_cod_instituicao FOREIGN KEY (ref_cod_instituicao) REFERENCES pmieducar.instituicao(cod_instituicao) ON UPDATE RESTRICT ON DELETE RESTRICT;
  543.  
  544.  
  545. --
  546. -- TOC entry 7086 (class 2606 OID 9468278)
  547. -- Name: turma_ref_cod_regente; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  548. --
  549.  
  550. ALTER TABLE ONLY pmieducar.turma
  551.     ADD CONSTRAINT turma_ref_cod_regente FOREIGN KEY (ref_cod_regente, ref_cod_instituicao_regente) REFERENCES pmieducar.servidor(cod_servidor, ref_cod_instituicao) ON UPDATE RESTRICT ON DELETE RESTRICT;
  552.  
  553.  
  554. --
  555. -- TOC entry 7087 (class 2606 OID 9468283)
  556. -- Name: turma_ref_ref_cod_escola_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  557. --
  558.  
  559. ALTER TABLE ONLY pmieducar.turma
  560.     ADD CONSTRAINT turma_ref_ref_cod_escola_fkey FOREIGN KEY (ref_ref_cod_escola, ref_ref_cod_serie) REFERENCES pmieducar.escola_serie(ref_cod_escola, ref_cod_serie) ON UPDATE RESTRICT ON DELETE RESTRICT;
  561.  
  562.  
  563. --
  564. -- TOC entry 7088 (class 2606 OID 9468288)
  565. -- Name: turma_ref_usuario_cad_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  566. --
  567.  
  568. ALTER TABLE ONLY pmieducar.turma
  569.     ADD CONSTRAINT turma_ref_usuario_cad_fkey FOREIGN KEY (ref_usuario_cad) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  570.  
  571.  
  572. --
  573. -- TOC entry 7089 (class 2606 OID 9468293)
  574. -- Name: turma_ref_usuario_exc_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  575. --
  576.  
  577. ALTER TABLE ONLY pmieducar.turma
  578.     ADD CONSTRAINT turma_ref_usuario_exc_fkey FOREIGN KEY (ref_usuario_exc) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  579.  
  580.  
  581. --
  582. -- TOC entry 7095 (class 2606 OID 9468298)
  583. -- Name: turma_tipo_ref_usuario_cad_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  584. --
  585.  
  586. ALTER TABLE ONLY pmieducar.turma_tipo
  587.     ADD CONSTRAINT turma_tipo_ref_usuario_cad_fkey FOREIGN KEY (ref_usuario_cad) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  588.  
  589.  
  590. --
  591. -- TOC entry 7094 (class 2606 OID 9468303)
  592. -- Name: turma_tipo_ref_usuario_exc_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  593. --
  594.  
  595. ALTER TABLE ONLY pmieducar.turma_tipo
  596.     ADD CONSTRAINT turma_tipo_ref_usuario_exc_fkey FOREIGN KEY (ref_usuario_exc) REFERENCES pmieducar.usuario(cod_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  597.  
  598.  
  599. --
  600. -- TOC entry 7090 (class 2606 OID 9468308)
  601. -- Name: turma_turma_tipo_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  602. --
  603.  
  604. ALTER TABLE ONLY pmieducar.turma
  605.     ADD CONSTRAINT turma_turma_tipo_fkey FOREIGN KEY (ref_cod_turma_tipo) REFERENCES pmieducar.turma_tipo(cod_turma_tipo) ON UPDATE RESTRICT ON DELETE RESTRICT;
  606.  
  607.  
  608. --
  609. -- TOC entry 7091 (class 2606 OID 9468313)
  610. -- Name: turma_turno_id_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  611. --
  612.  
  613. ALTER TABLE ONLY pmieducar.turma
  614.     ADD CONSTRAINT turma_turno_id_fkey FOREIGN KEY (turma_turno_id) REFERENCES pmieducar.turma_turno(id) ON UPDATE RESTRICT ON DELETE RESTRICT;
  615.  
  616.  
  617. --
  618. -- TOC entry 7100 (class 2606 OID 9468318)
  619. -- Name: usuario_cod_usuario_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  620. --
  621.  
  622. ALTER TABLE ONLY pmieducar.usuario
  623.     ADD CONSTRAINT usuario_cod_usuario_fkey FOREIGN KEY (cod_usuario) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  624.  
  625.  
  626. --
  627. -- TOC entry 7099 (class 2606 OID 9468323)
  628. -- Name: usuario_ref_cod_instituicao_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  629. --
  630.  
  631. ALTER TABLE ONLY pmieducar.usuario
  632.     ADD CONSTRAINT usuario_ref_cod_instituicao_fkey FOREIGN KEY (ref_cod_instituicao) REFERENCES pmieducar.instituicao(cod_instituicao) ON UPDATE RESTRICT ON DELETE RESTRICT;
  633.  
  634.  
  635. --
  636. -- TOC entry 7098 (class 2606 OID 9468328)
  637. -- Name: usuario_ref_cod_tipo_usuario_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  638. --
  639.  
  640. ALTER TABLE ONLY pmieducar.usuario
  641.     ADD CONSTRAINT usuario_ref_cod_tipo_usuario_fkey FOREIGN KEY (ref_cod_tipo_usuario) REFERENCES pmieducar.tipo_usuario(cod_tipo_usuario) ON UPDATE RESTRICT ON DELETE RESTRICT;
  642.  
  643.  
  644. --
  645. -- TOC entry 7097 (class 2606 OID 9468333)
  646. -- Name: usuario_ref_funcionario_cad_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  647. --
  648.  
  649. ALTER TABLE ONLY pmieducar.usuario
  650.     ADD CONSTRAINT usuario_ref_funcionario_cad_fkey FOREIGN KEY (ref_funcionario_cad) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  651.  
  652.  
  653. --
  654. -- TOC entry 7096 (class 2606 OID 9468338)
  655. -- Name: usuario_ref_funcionario_exc_fkey; Type: FK CONSTRAINT; Schema: pmieducar; Owner: -
  656. --
  657.  
  658. ALTER TABLE ONLY pmieducar.usuario
  659.     ADD CONSTRAINT usuario_ref_funcionario_exc_fkey FOREIGN KEY (ref_funcionario_exc) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  660.  
  661.  
  662. --
  663. -- TOC entry 7101 (class 2606 OID 9468343)
  664. -- Name: funcionario_su_ref_ref_cod_pessoa_fj_fkey; Type: FK CONSTRAINT; Schema: pmiotopic; Owner: -
  665. --
  666.  
  667. ALTER TABLE ONLY pmiotopic.funcionario_su
  668.     ADD CONSTRAINT funcionario_su_ref_ref_cod_pessoa_fj_fkey FOREIGN KEY (ref_ref_cod_pessoa_fj) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE CASCADE ON DELETE CASCADE;
  669.  
  670.  
  671. --
  672. -- TOC entry 7105 (class 2606 OID 9468348)
  673. -- Name: grupomoderador_ref_cod_grupos_fkey; Type: FK CONSTRAINT; Schema: pmiotopic; Owner: -
  674. --
  675.  
  676. ALTER TABLE ONLY pmiotopic.grupomoderador
  677.     ADD CONSTRAINT grupomoderador_ref_cod_grupos_fkey FOREIGN KEY (ref_cod_grupos) REFERENCES pmiotopic.grupos(cod_grupos) ON UPDATE RESTRICT ON DELETE RESTRICT;
  678.  
  679.  
  680. --
  681. -- TOC entry 7104 (class 2606 OID 9468353)
  682. -- Name: grupomoderador_ref_pessoa_cad_fkey; Type: FK CONSTRAINT; Schema: pmiotopic; Owner: -
  683. --
  684.  
  685. ALTER TABLE ONLY pmiotopic.grupomoderador
  686.     ADD CONSTRAINT grupomoderador_ref_pessoa_cad_fkey FOREIGN KEY (ref_pessoa_cad) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  687.  
  688.  
  689. --
  690. -- TOC entry 7103 (class 2606 OID 9468358)
  691. -- Name: grupomoderador_ref_pessoa_exc_fkey; Type: FK CONSTRAINT; Schema: pmiotopic; Owner: -
  692. --
  693.  
  694. ALTER TABLE ONLY pmiotopic.grupomoderador
  695.     ADD CONSTRAINT grupomoderador_ref_pessoa_exc_fkey FOREIGN KEY (ref_pessoa_exc) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  696.  
  697.  
  698. --
  699. -- TOC entry 7102 (class 2606 OID 9468363)
  700. -- Name: grupomoderador_ref_ref_cod_pessoa_fj_fkey; Type: FK CONSTRAINT; Schema: pmiotopic; Owner: -
  701. --
  702.  
  703. ALTER TABLE ONLY pmiotopic.grupomoderador
  704.     ADD CONSTRAINT grupomoderador_ref_ref_cod_pessoa_fj_fkey FOREIGN KEY (ref_ref_cod_pessoa_fj) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  705.  
  706.  
  707. --
  708. -- TOC entry 7109 (class 2606 OID 9468368)
  709. -- Name: grupopessoa_ref_cod_grupos_fkey; Type: FK CONSTRAINT; Schema: pmiotopic; Owner: -
  710. --
  711.  
  712. ALTER TABLE ONLY pmiotopic.grupopessoa
  713.     ADD CONSTRAINT grupopessoa_ref_cod_grupos_fkey FOREIGN KEY (ref_cod_grupos) REFERENCES pmiotopic.grupos(cod_grupos) ON UPDATE RESTRICT ON DELETE RESTRICT;
  714.  
  715.  
  716. --
  717. -- TOC entry 7108 (class 2606 OID 9468373)
  718. -- Name: grupopessoa_ref_idpes_fkey; Type: FK CONSTRAINT; Schema: pmiotopic; Owner: -
  719. --
  720.  
  721. ALTER TABLE ONLY pmiotopic.grupopessoa
  722.     ADD CONSTRAINT grupopessoa_ref_idpes_fkey FOREIGN KEY (ref_idpes) REFERENCES cadastro.fisica(idpes) ON UPDATE RESTRICT ON DELETE RESTRICT;
  723.  
  724.  
  725. --
  726. -- TOC entry 7107 (class 2606 OID 9468378)
  727. -- Name: grupopessoa_ref_pessoa_cadatro_fkey; Type: FK CONSTRAINT; Schema: pmiotopic; Owner: -
  728. --
  729.  
  730. ALTER TABLE ONLY pmiotopic.grupopessoa
  731.     ADD CONSTRAINT grupopessoa_ref_pessoa_cadatro_fkey FOREIGN KEY (ref_pessoa_cad, ref_grupos_cad) REFERENCES pmiotopic.grupomoderador(ref_ref_cod_pessoa_fj, ref_cod_grupos) ON UPDATE RESTRICT ON DELETE RESTRICT;
  732.  
  733.  
  734. --
  735. -- TOC entry 7106 (class 2606 OID 9468383)
  736. -- Name: grupopessoa_ref_pessoa_exclusao_fkey; Type: FK CONSTRAINT; Schema: pmiotopic; Owner: -
  737. --
  738.  
  739. ALTER TABLE ONLY pmiotopic.grupopessoa
  740.     ADD CONSTRAINT grupopessoa_ref_pessoa_exclusao_fkey FOREIGN KEY (ref_pessoa_exc, ref_grupos_exc) REFERENCES pmiotopic.grupomoderador(ref_ref_cod_pessoa_fj, ref_cod_grupos) ON UPDATE RESTRICT ON DELETE RESTRICT;
  741.  
  742.  
  743. --
  744. -- TOC entry 7111 (class 2606 OID 9468388)
  745. -- Name: grupos_ref_pessoa_cad_fkey; Type: FK CONSTRAINT; Schema: pmiotopic; Owner: -
  746. --
  747.  
  748. ALTER TABLE ONLY pmiotopic.grupos
  749.     ADD CONSTRAINT grupos_ref_pessoa_cad_fkey FOREIGN KEY (ref_pessoa_cad) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  750.  
  751.  
  752. --
  753. -- TOC entry 7110 (class 2606 OID 9468393)
  754. -- Name: grupos_ref_pessoa_exc_fkey; Type: FK CONSTRAINT; Schema: pmiotopic; Owner: -
  755. --
  756.  
  757. ALTER TABLE ONLY pmiotopic.grupos
  758.     ADD CONSTRAINT grupos_ref_pessoa_exc_fkey FOREIGN KEY (ref_pessoa_exc) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  759.  
  760.  
  761. --
  762. -- TOC entry 7114 (class 2606 OID 9468398)
  763. -- Name: notas_ref_idpes_fkey; Type: FK CONSTRAINT; Schema: pmiotopic; Owner: -
  764. --
  765.  
  766. ALTER TABLE ONLY pmiotopic.notas
  767.     ADD CONSTRAINT notas_ref_idpes_fkey FOREIGN KEY (ref_idpes) REFERENCES cadastro.fisica(idpes) ON UPDATE RESTRICT ON DELETE RESTRICT;
  768.  
  769.  
  770. --
  771. -- TOC entry 7113 (class 2606 OID 9468403)
  772. -- Name: notas_ref_pessoa_cad_fkey; Type: FK CONSTRAINT; Schema: pmiotopic; Owner: -
  773. --
  774.  
  775. ALTER TABLE ONLY pmiotopic.notas
  776.     ADD CONSTRAINT notas_ref_pessoa_cad_fkey FOREIGN KEY (ref_pessoa_cad) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  777.  
  778.  
  779. --
  780. -- TOC entry 7112 (class 2606 OID 9468408)
  781. -- Name: notas_ref_pessoa_exc_fkey; Type: FK CONSTRAINT; Schema: pmiotopic; Owner: -
  782. --
  783.  
  784. ALTER TABLE ONLY pmiotopic.notas
  785.     ADD CONSTRAINT notas_ref_pessoa_exc_fkey FOREIGN KEY (ref_pessoa_exc) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  786.  
  787.  
  788. --
  789. -- TOC entry 7116 (class 2606 OID 9468413)
  790. -- Name: participante_ref_cod_reuniao_fkey; Type: FK CONSTRAINT; Schema: pmiotopic; Owner: -
  791. --
  792.  
  793. ALTER TABLE ONLY pmiotopic.participante
  794.     ADD CONSTRAINT participante_ref_cod_reuniao_fkey FOREIGN KEY (ref_cod_reuniao) REFERENCES pmiotopic.reuniao(cod_reuniao) ON UPDATE RESTRICT ON DELETE RESTRICT;
  795.  
  796.  
  797. --
  798. -- TOC entry 7115 (class 2606 OID 9468418)
  799. -- Name: participante_ref_ref_idpes_fkey; Type: FK CONSTRAINT; Schema: pmiotopic; Owner: -
  800. --
  801.  
  802. ALTER TABLE ONLY pmiotopic.participante
  803.     ADD CONSTRAINT participante_ref_ref_idpes_fkey FOREIGN KEY (ref_ref_idpes, ref_ref_cod_grupos) REFERENCES pmiotopic.grupopessoa(ref_idpes, ref_cod_grupos) ON UPDATE RESTRICT ON DELETE RESTRICT;
  804.  
  805.  
  806. --
  807. -- TOC entry 7117 (class 2606 OID 9468423)
  808. -- Name: reuniao_ref_moderador_fkey; Type: FK CONSTRAINT; Schema: pmiotopic; Owner: -
  809. --
  810.  
  811. ALTER TABLE ONLY pmiotopic.reuniao
  812.     ADD CONSTRAINT reuniao_ref_moderador_fkey FOREIGN KEY (ref_moderador, ref_grupos_moderador) REFERENCES pmiotopic.grupomoderador(ref_ref_cod_pessoa_fj, ref_cod_grupos) ON UPDATE RESTRICT ON DELETE RESTRICT;
  813.  
  814.  
  815. --
  816. -- TOC entry 7119 (class 2606 OID 9468428)
  817. -- Name: topicoreuniao_ref_cod_reuniao_fkey; Type: FK CONSTRAINT; Schema: pmiotopic; Owner: -
  818. --
  819.  
  820. ALTER TABLE ONLY pmiotopic.topicoreuniao
  821.     ADD CONSTRAINT topicoreuniao_ref_cod_reuniao_fkey FOREIGN KEY (ref_cod_reuniao) REFERENCES pmiotopic.reuniao(cod_reuniao) ON UPDATE RESTRICT ON DELETE RESTRICT;
  822.  
  823.  
  824. --
  825. -- TOC entry 7118 (class 2606 OID 9468433)
  826. -- Name: topicoreuniao_ref_cod_topico_fkey; Type: FK CONSTRAINT; Schema: pmiotopic; Owner: -
  827. --
  828.  
  829. ALTER TABLE ONLY pmiotopic.topicoreuniao
  830.     ADD CONSTRAINT topicoreuniao_ref_cod_topico_fkey FOREIGN KEY (ref_cod_topico) REFERENCES pmiotopic.topico(cod_topico) ON UPDATE RESTRICT ON DELETE RESTRICT;
  831.  
  832.  
  833. --
  834. -- TOC entry 7124 (class 2606 OID 9468438)
  835. -- Name: agenda_compromisso_ref_cod_agenda_fkey; Type: FK CONSTRAINT; Schema: portal; Owner: -
  836. --
  837.  
  838. ALTER TABLE ONLY portal.agenda_compromisso
  839.     ADD CONSTRAINT agenda_compromisso_ref_cod_agenda_fkey FOREIGN KEY (ref_cod_agenda) REFERENCES portal.agenda(cod_agenda) ON UPDATE RESTRICT ON DELETE RESTRICT;
  840.  
  841.  
  842. --
  843. -- TOC entry 7123 (class 2606 OID 9468443)
  844. -- Name: agenda_compromisso_ref_ref_cod_pessoa_cad_fkey; Type: FK CONSTRAINT; Schema: portal; Owner: -
  845. --
  846.  
  847. ALTER TABLE ONLY portal.agenda_compromisso
  848.     ADD CONSTRAINT agenda_compromisso_ref_ref_cod_pessoa_cad_fkey FOREIGN KEY (ref_ref_cod_pessoa_cad) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  849.  
  850.  
  851. --
  852. -- TOC entry 7122 (class 2606 OID 9468448)
  853. -- Name: agenda_ref_ref_cod_pessoa_cad_fkey; Type: FK CONSTRAINT; Schema: portal; Owner: -
  854. --
  855.  
  856. ALTER TABLE ONLY portal.agenda
  857.     ADD CONSTRAINT agenda_ref_ref_cod_pessoa_cad_fkey FOREIGN KEY (ref_ref_cod_pessoa_cad) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  858.  
  859.  
  860. --
  861. -- TOC entry 7121 (class 2606 OID 9468453)
  862. -- Name: agenda_ref_ref_cod_pessoa_exc_fkey; Type: FK CONSTRAINT; Schema: portal; Owner: -
  863. --
  864.  
  865. ALTER TABLE ONLY portal.agenda
  866.     ADD CONSTRAINT agenda_ref_ref_cod_pessoa_exc_fkey FOREIGN KEY (ref_ref_cod_pessoa_exc) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  867.  
  868.  
  869. --
  870. -- TOC entry 7120 (class 2606 OID 9468458)
  871. -- Name: agenda_ref_ref_cod_pessoa_own_fkey; Type: FK CONSTRAINT; Schema: portal; Owner: -
  872. --
  873.  
  874. ALTER TABLE ONLY portal.agenda
  875.     ADD CONSTRAINT agenda_ref_ref_cod_pessoa_own_fkey FOREIGN KEY (ref_ref_cod_pessoa_own) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  876.  
  877.  
  878. --
  879. -- TOC entry 7126 (class 2606 OID 9468463)
  880. -- Name: agenda_responsavel_ref_cod_agenda_fkey; Type: FK CONSTRAINT; Schema: portal; Owner: -
  881. --
  882.  
  883. ALTER TABLE ONLY portal.agenda_responsavel
  884.     ADD CONSTRAINT agenda_responsavel_ref_cod_agenda_fkey FOREIGN KEY (ref_cod_agenda) REFERENCES portal.agenda(cod_agenda) ON UPDATE RESTRICT ON DELETE RESTRICT;
  885.  
  886.  
  887. --
  888. -- TOC entry 7125 (class 2606 OID 9468468)
  889. -- Name: agenda_responsavel_ref_ref_cod_pessoa_fj_fkey; Type: FK CONSTRAINT; Schema: portal; Owner: -
  890. --
  891.  
  892. ALTER TABLE ONLY portal.agenda_responsavel
  893.     ADD CONSTRAINT agenda_responsavel_ref_ref_cod_pessoa_fj_fkey FOREIGN KEY (ref_ref_cod_pessoa_fj) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  894.  
  895.  
  896. --
  897. -- TOC entry 7130 (class 2606 OID 9468473)
  898. -- Name: compras_editais_editais_empresas_ibfk_1; Type: FK CONSTRAINT; Schema: portal; Owner: -
  899. --
  900.  
  901. ALTER TABLE ONLY portal.compras_editais_editais_empresas
  902.     ADD CONSTRAINT compras_editais_editais_empresas_ibfk_1 FOREIGN KEY (ref_cod_compras_editais_editais) REFERENCES portal.compras_editais_editais(cod_compras_editais_editais) ON UPDATE RESTRICT ON DELETE RESTRICT;
  903.  
  904.  
  905. --
  906. -- TOC entry 7129 (class 2606 OID 9468478)
  907. -- Name: compras_editais_editais_empresas_ibfk_2; Type: FK CONSTRAINT; Schema: portal; Owner: -
  908. --
  909.  
  910. ALTER TABLE ONLY portal.compras_editais_editais_empresas
  911.     ADD CONSTRAINT compras_editais_editais_empresas_ibfk_2 FOREIGN KEY (ref_cod_compras_editais_empresa) REFERENCES portal.compras_editais_empresa(cod_compras_editais_empresa) ON UPDATE RESTRICT ON DELETE RESTRICT;
  912.  
  913.  
  914. --
  915. -- TOC entry 7128 (class 2606 OID 9468483)
  916. -- Name: compras_editais_editais_ibfk_1; Type: FK CONSTRAINT; Schema: portal; Owner: -
  917. --
  918.  
  919. ALTER TABLE ONLY portal.compras_editais_editais
  920.     ADD CONSTRAINT compras_editais_editais_ibfk_1 FOREIGN KEY (ref_ref_cod_pessoa_fj) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  921.  
  922.  
  923. --
  924. -- TOC entry 7127 (class 2606 OID 9468488)
  925. -- Name: compras_editais_editais_ibfk_2; Type: FK CONSTRAINT; Schema: portal; Owner: -
  926. --
  927.  
  928. ALTER TABLE ONLY portal.compras_editais_editais
  929.     ADD CONSTRAINT compras_editais_editais_ibfk_2 FOREIGN KEY (ref_cod_compras_licitacoes) REFERENCES portal.compras_licitacoes(cod_compras_licitacoes) ON UPDATE RESTRICT ON DELETE RESTRICT;
  930.  
  931.  
  932. --
  933. -- TOC entry 7131 (class 2606 OID 9468493)
  934. -- Name: compras_editais_empresa_ibfk_1; Type: FK CONSTRAINT; Schema: portal; Owner: -
  935. --
  936.  
  937. ALTER TABLE ONLY portal.compras_editais_empresa
  938.     ADD CONSTRAINT compras_editais_empresa_ibfk_1 FOREIGN KEY (ref_sigla_uf) REFERENCES public.uf(sigla_uf) ON UPDATE RESTRICT ON DELETE RESTRICT;
  939.  
  940.  
  941. --
  942. -- TOC entry 7132 (class 2606 OID 9468498)
  943. -- Name: compras_funcionarios_ibfk_1; Type: FK CONSTRAINT; Schema: portal; Owner: -
  944. --
  945.  
  946. ALTER TABLE ONLY portal.compras_funcionarios
  947.     ADD CONSTRAINT compras_funcionarios_ibfk_1 FOREIGN KEY (ref_ref_cod_pessoa_fj) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  948.  
  949.  
  950. --
  951. -- TOC entry 7134 (class 2606 OID 9468503)
  952. -- Name: compras_licitacoes_ibfk_1; Type: FK CONSTRAINT; Schema: portal; Owner: -
  953. --
  954.  
  955. ALTER TABLE ONLY portal.compras_licitacoes
  956.     ADD CONSTRAINT compras_licitacoes_ibfk_1 FOREIGN KEY (ref_cod_compras_modalidade) REFERENCES portal.compras_modalidade(cod_compras_modalidade) ON UPDATE RESTRICT ON DELETE RESTRICT;
  957.  
  958.  
  959. --
  960. -- TOC entry 7133 (class 2606 OID 9468508)
  961. -- Name: compras_licitacoes_ibfk_2; Type: FK CONSTRAINT; Schema: portal; Owner: -
  962. --
  963.  
  964. ALTER TABLE ONLY portal.compras_licitacoes
  965.     ADD CONSTRAINT compras_licitacoes_ibfk_2 FOREIGN KEY (ref_ref_cod_pessoa_fj) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  966.  
  967.  
  968. --
  969. -- TOC entry 7140 (class 2606 OID 9468513)
  970. -- Name: compras_pregao_execucao_ibfk_1; Type: FK CONSTRAINT; Schema: portal; Owner: -
  971. --
  972.  
  973. ALTER TABLE ONLY portal.compras_pregao_execucao
  974.     ADD CONSTRAINT compras_pregao_execucao_ibfk_1 FOREIGN KEY (ref_equipe3) REFERENCES portal.compras_funcionarios(ref_ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  975.  
  976.  
  977. --
  978. -- TOC entry 7139 (class 2606 OID 9468518)
  979. -- Name: compras_pregao_execucao_ibfk_2; Type: FK CONSTRAINT; Schema: portal; Owner: -
  980. --
  981.  
  982. ALTER TABLE ONLY portal.compras_pregao_execucao
  983.     ADD CONSTRAINT compras_pregao_execucao_ibfk_2 FOREIGN KEY (ref_pregoeiro) REFERENCES portal.compras_funcionarios(ref_ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  984.  
  985.  
  986. --
  987. -- TOC entry 7138 (class 2606 OID 9468523)
  988. -- Name: compras_pregao_execucao_ibfk_3; Type: FK CONSTRAINT; Schema: portal; Owner: -
  989. --
  990.  
  991. ALTER TABLE ONLY portal.compras_pregao_execucao
  992.     ADD CONSTRAINT compras_pregao_execucao_ibfk_3 FOREIGN KEY (ref_equipe1) REFERENCES portal.compras_funcionarios(ref_ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  993.  
  994.  
  995. --
  996. -- TOC entry 7137 (class 2606 OID 9468528)
  997. -- Name: compras_pregao_execucao_ibfk_4; Type: FK CONSTRAINT; Schema: portal; Owner: -
  998. --
  999.  
  1000. ALTER TABLE ONLY portal.compras_pregao_execucao
  1001.     ADD CONSTRAINT compras_pregao_execucao_ibfk_4 FOREIGN KEY (ref_equipe2) REFERENCES portal.compras_funcionarios(ref_ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1002.  
  1003.  
  1004. --
  1005. -- TOC entry 7136 (class 2606 OID 9468533)
  1006. -- Name: compras_pregao_execucao_ibfk_5; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1007. --
  1008.  
  1009. ALTER TABLE ONLY portal.compras_pregao_execucao
  1010.     ADD CONSTRAINT compras_pregao_execucao_ibfk_5 FOREIGN KEY (ref_cod_compras_final_pregao) REFERENCES portal.compras_final_pregao(cod_compras_final_pregao) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1011.  
  1012.  
  1013. --
  1014. -- TOC entry 7135 (class 2606 OID 9468538)
  1015. -- Name: compras_pregao_execucao_ibfk_6; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1016. --
  1017.  
  1018. ALTER TABLE ONLY portal.compras_pregao_execucao
  1019.     ADD CONSTRAINT compras_pregao_execucao_ibfk_6 FOREIGN KEY (ref_cod_compras_licitacoes) REFERENCES portal.compras_licitacoes(cod_compras_licitacoes) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1020.  
  1021.  
  1022. --
  1023. -- TOC entry 7145 (class 2606 OID 9468543)
  1024. -- Name: fk_to_setor_new; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1025. --
  1026.  
  1027. ALTER TABLE ONLY portal.funcionario
  1028.     ADD CONSTRAINT fk_to_setor_new FOREIGN KEY (ref_cod_setor_new) REFERENCES pmidrh.setor(cod_setor) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1029.  
  1030.  
  1031. --
  1032. -- TOC entry 7142 (class 2606 OID 9468548)
  1033. -- Name: foto_portal_ibfk_1; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1034. --
  1035.  
  1036. ALTER TABLE ONLY portal.foto_portal
  1037.     ADD CONSTRAINT foto_portal_ibfk_1 FOREIGN KEY (ref_ref_cod_pessoa_fj) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1038.  
  1039.  
  1040. --
  1041. -- TOC entry 7141 (class 2606 OID 9468553)
  1042. -- Name: foto_portal_ibfk_2; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1043. --
  1044.  
  1045. ALTER TABLE ONLY portal.foto_portal
  1046.     ADD CONSTRAINT foto_portal_ibfk_2 FOREIGN KEY (ref_cod_credito) REFERENCES cadastro.fisica(idpes) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1047.  
  1048.  
  1049. --
  1050. -- TOC entry 7144 (class 2606 OID 9468558)
  1051. -- Name: funcionario_ibfk_1; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1052. --
  1053.  
  1054. ALTER TABLE ONLY portal.funcionario
  1055.     ADD CONSTRAINT funcionario_ibfk_1 FOREIGN KEY (ref_cod_pessoa_fj) REFERENCES cadastro.fisica(idpes) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1056.  
  1057.  
  1058. --
  1059. -- TOC entry 7143 (class 2606 OID 9468563)
  1060. -- Name: funcionario_ibfk_5; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1061. --
  1062.  
  1063. ALTER TABLE ONLY portal.funcionario
  1064.     ADD CONSTRAINT funcionario_ibfk_5 FOREIGN KEY (ref_ref_cod_pessoa_fj) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1065.  
  1066.  
  1067. --
  1068. -- TOC entry 7148 (class 2606 OID 9468568)
  1069. -- Name: imagem_ref_cod_imagem_tipo_fkey; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1070. --
  1071.  
  1072. ALTER TABLE ONLY portal.imagem
  1073.     ADD CONSTRAINT imagem_ref_cod_imagem_tipo_fkey FOREIGN KEY (ref_cod_imagem_tipo) REFERENCES portal.imagem_tipo(cod_imagem_tipo) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1074.  
  1075.  
  1076. --
  1077. -- TOC entry 7147 (class 2606 OID 9468573)
  1078. -- Name: imagem_ref_cod_pessoa_cad_fkey; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1079. --
  1080.  
  1081. ALTER TABLE ONLY portal.imagem
  1082.     ADD CONSTRAINT imagem_ref_cod_pessoa_cad_fkey FOREIGN KEY (ref_cod_pessoa_cad) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1083.  
  1084.  
  1085. --
  1086. -- TOC entry 7146 (class 2606 OID 9468578)
  1087. -- Name: imagem_ref_cod_pessoa_exc_fkey; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1088. --
  1089.  
  1090. ALTER TABLE ONLY portal.imagem
  1091.     ADD CONSTRAINT imagem_ref_cod_pessoa_exc_fkey FOREIGN KEY (ref_cod_pessoa_exc) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1092.  
  1093.  
  1094. --
  1095. -- TOC entry 7149 (class 2606 OID 9468583)
  1096. -- Name: intranet_segur_permissao_negada_ibfk_1; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1097. --
  1098.  
  1099. ALTER TABLE ONLY portal.intranet_segur_permissao_negada
  1100.     ADD CONSTRAINT intranet_segur_permissao_negada_ibfk_1 FOREIGN KEY (ref_ref_cod_pessoa_fj) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1101.  
  1102.  
  1103. --
  1104. -- TOC entry 7150 (class 2606 OID 9468588)
  1105. -- Name: jor_arquivo_ibfk_1; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1106. --
  1107.  
  1108. ALTER TABLE ONLY portal.jor_arquivo
  1109.     ADD CONSTRAINT jor_arquivo_ibfk_1 FOREIGN KEY (ref_cod_jor_edicao) REFERENCES portal.jor_edicao(cod_jor_edicao) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1110.  
  1111.  
  1112. --
  1113. -- TOC entry 7151 (class 2606 OID 9468593)
  1114. -- Name: jor_edicao_ibfk_1; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1115. --
  1116.  
  1117. ALTER TABLE ONLY portal.jor_edicao
  1118.     ADD CONSTRAINT jor_edicao_ibfk_1 FOREIGN KEY (ref_ref_cod_pessoa_fj) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1119.  
  1120.  
  1121. --
  1122. -- TOC entry 7152 (class 2606 OID 9468598)
  1123. -- Name: mailling_email_conteudo_ibfk_1; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1124. --
  1125.  
  1126. ALTER TABLE ONLY portal.mailling_email_conteudo
  1127.     ADD CONSTRAINT mailling_email_conteudo_ibfk_1 FOREIGN KEY (ref_ref_cod_pessoa_fj) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1128.  
  1129.  
  1130. --
  1131. -- TOC entry 7155 (class 2606 OID 9468603)
  1132. -- Name: mailling_fila_envio_ibfk_1; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1133. --
  1134.  
  1135. ALTER TABLE ONLY portal.mailling_fila_envio
  1136.     ADD CONSTRAINT mailling_fila_envio_ibfk_1 FOREIGN KEY (ref_ref_cod_pessoa_fj) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1137.  
  1138.  
  1139. --
  1140. -- TOC entry 7154 (class 2606 OID 9468608)
  1141. -- Name: mailling_fila_envio_ibfk_2; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1142. --
  1143.  
  1144. ALTER TABLE ONLY portal.mailling_fila_envio
  1145.     ADD CONSTRAINT mailling_fila_envio_ibfk_2 FOREIGN KEY (ref_cod_mailling_email) REFERENCES portal.mailling_email(cod_mailling_email);
  1146.  
  1147.  
  1148. --
  1149. -- TOC entry 7153 (class 2606 OID 9468613)
  1150. -- Name: mailling_fila_envio_ibfk_3; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1151. --
  1152.  
  1153. ALTER TABLE ONLY portal.mailling_fila_envio
  1154.     ADD CONSTRAINT mailling_fila_envio_ibfk_3 FOREIGN KEY (ref_cod_mailling_email_conteudo) REFERENCES portal.mailling_email_conteudo(cod_mailling_email_conteudo);
  1155.  
  1156.  
  1157. --
  1158. -- TOC entry 7157 (class 2606 OID 9468618)
  1159. -- Name: mailling_grupo_email_ibfk_1; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1160. --
  1161.  
  1162. ALTER TABLE ONLY portal.mailling_grupo_email
  1163.     ADD CONSTRAINT mailling_grupo_email_ibfk_1 FOREIGN KEY (ref_cod_mailling_email) REFERENCES portal.mailling_email(cod_mailling_email) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1164.  
  1165.  
  1166. --
  1167. -- TOC entry 7156 (class 2606 OID 9468623)
  1168. -- Name: mailling_grupo_email_ibfk_2; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1169. --
  1170.  
  1171. ALTER TABLE ONLY portal.mailling_grupo_email
  1172.     ADD CONSTRAINT mailling_grupo_email_ibfk_2 FOREIGN KEY (ref_cod_mailling_grupo) REFERENCES portal.mailling_grupo(cod_mailling_grupo) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1173.  
  1174.  
  1175. --
  1176. -- TOC entry 7160 (class 2606 OID 9468628)
  1177. -- Name: mailling_historico_ibfk_1; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1178. --
  1179.  
  1180. ALTER TABLE ONLY portal.mailling_historico
  1181.     ADD CONSTRAINT mailling_historico_ibfk_1 FOREIGN KEY (ref_cod_not_portal) REFERENCES portal.not_portal(cod_not_portal) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1182.  
  1183.  
  1184. --
  1185. -- TOC entry 7159 (class 2606 OID 9468633)
  1186. -- Name: mailling_historico_ibfk_2; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1187. --
  1188.  
  1189. ALTER TABLE ONLY portal.mailling_historico
  1190.     ADD CONSTRAINT mailling_historico_ibfk_2 FOREIGN KEY (ref_cod_mailling_grupo) REFERENCES portal.mailling_grupo(cod_mailling_grupo) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1191.  
  1192.  
  1193. --
  1194. -- TOC entry 7158 (class 2606 OID 9468638)
  1195. -- Name: mailling_historico_ibfk_3; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1196. --
  1197.  
  1198. ALTER TABLE ONLY portal.mailling_historico
  1199.     ADD CONSTRAINT mailling_historico_ibfk_3 FOREIGN KEY (ref_ref_cod_pessoa_fj) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1200.  
  1201.  
  1202. --
  1203. -- TOC entry 7161 (class 2606 OID 9468973)
  1204. -- Name: menu_funcionario_ibfk_1; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1205. --
  1206.  
  1207. ALTER TABLE ONLY portal.menu_funcionario
  1208.     ADD CONSTRAINT menu_funcionario_ibfk_1 FOREIGN KEY (ref_cod_menu_submenu) REFERENCES portal.menu_submenu(cod_menu_submenu) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1209.  
  1210.  
  1211. --
  1212. -- TOC entry 7162 (class 2606 OID 9468643)
  1213. -- Name: menu_funcionario_ibfk_2; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1214. --
  1215.  
  1216. ALTER TABLE ONLY portal.menu_funcionario
  1217.     ADD CONSTRAINT menu_funcionario_ibfk_2 FOREIGN KEY (ref_ref_cod_pessoa_fj) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1218.  
  1219.  
  1220. --
  1221. -- TOC entry 7164 (class 2606 OID 9468648)
  1222. -- Name: menu_submenu_ibfk_1; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1223. --
  1224.  
  1225. ALTER TABLE ONLY portal.menu_submenu
  1226.     ADD CONSTRAINT menu_submenu_ibfk_1 FOREIGN KEY (ref_cod_menu_menu) REFERENCES portal.menu_menu(cod_menu_menu) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1227.  
  1228.  
  1229. --
  1230. -- TOC entry 7165 (class 2606 OID 9468653)
  1231. -- Name: not_portal_ibfk_1; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1232. --
  1233.  
  1234. ALTER TABLE ONLY portal.not_portal
  1235.     ADD CONSTRAINT not_portal_ibfk_1 FOREIGN KEY (ref_ref_cod_pessoa_fj) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1236.  
  1237.  
  1238. --
  1239. -- TOC entry 7167 (class 2606 OID 9468658)
  1240. -- Name: not_portal_tipo_ibfk_1; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1241. --
  1242.  
  1243. ALTER TABLE ONLY portal.not_portal_tipo
  1244.     ADD CONSTRAINT not_portal_tipo_ibfk_1 FOREIGN KEY (ref_cod_not_portal) REFERENCES portal.not_portal(cod_not_portal) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1245.  
  1246.  
  1247. --
  1248. -- TOC entry 7166 (class 2606 OID 9468663)
  1249. -- Name: not_portal_tipo_ibfk_2; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1250. --
  1251.  
  1252. ALTER TABLE ONLY portal.not_portal_tipo
  1253.     ADD CONSTRAINT not_portal_tipo_ibfk_2 FOREIGN KEY (ref_cod_not_tipo) REFERENCES portal.not_tipo(cod_not_tipo) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1254.  
  1255.  
  1256. --
  1257. -- TOC entry 7168 (class 2606 OID 9468668)
  1258. -- Name: not_vinc_portal_ibfk_1; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1259. --
  1260.  
  1261. ALTER TABLE ONLY portal.not_vinc_portal
  1262.     ADD CONSTRAINT not_vinc_portal_ibfk_1 FOREIGN KEY (ref_cod_not_portal) REFERENCES portal.not_portal(cod_not_portal) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1263.  
  1264.  
  1265. --
  1266. -- TOC entry 7169 (class 2606 OID 9468673)
  1267. -- Name: notificacao_ref_cod_funcionario_fkey; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1268. --
  1269.  
  1270. ALTER TABLE ONLY portal.notificacao
  1271.     ADD CONSTRAINT notificacao_ref_cod_funcionario_fkey FOREIGN KEY (ref_cod_funcionario) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1272.  
  1273.  
  1274. --
  1275. -- TOC entry 7170 (class 2606 OID 9468678)
  1276. -- Name: pessoa_atividade_ibfk_1; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1277. --
  1278.  
  1279. ALTER TABLE ONLY portal.pessoa_atividade
  1280.     ADD CONSTRAINT pessoa_atividade_ibfk_1 FOREIGN KEY (ref_cod_ramo_atividade) REFERENCES portal.pessoa_ramo_atividade(cod_ramo_atividade) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1281.  
  1282.  
  1283. --
  1284. -- TOC entry 7172 (class 2606 OID 9468683)
  1285. -- Name: pessoa_fj_pessoa_atividade_ibfk_1; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1286. --
  1287.  
  1288. ALTER TABLE ONLY portal.pessoa_fj_pessoa_atividade
  1289.     ADD CONSTRAINT pessoa_fj_pessoa_atividade_ibfk_1 FOREIGN KEY (ref_cod_pessoa_atividade) REFERENCES portal.pessoa_atividade(cod_pessoa_atividade) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1290.  
  1291.  
  1292. --
  1293. -- TOC entry 7171 (class 2606 OID 9468688)
  1294. -- Name: pessoa_fj_pessoa_atividade_ibfk_2; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1295. --
  1296.  
  1297. ALTER TABLE ONLY portal.pessoa_fj_pessoa_atividade
  1298.     ADD CONSTRAINT pessoa_fj_pessoa_atividade_ibfk_2 FOREIGN KEY (ref_cod_pessoa_fj) REFERENCES cadastro.juridica(idpes) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1299.  
  1300.  
  1301. --
  1302. -- TOC entry 7173 (class 2606 OID 9468693)
  1303. -- Name: portal_concurso_ibfk_1; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1304. --
  1305.  
  1306. ALTER TABLE ONLY portal.portal_concurso
  1307.     ADD CONSTRAINT portal_concurso_ibfk_1 FOREIGN KEY (ref_ref_cod_pessoa_fj) REFERENCES portal.funcionario(ref_cod_pessoa_fj) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1308.  
  1309.  
  1310. --
  1311. -- TOC entry 7163 (class 2606 OID 9468698)
  1312. -- Name: ref_cod_menu_pai_fk; Type: FK CONSTRAINT; Schema: portal; Owner: -
  1313. --
  1314.  
  1315. ALTER TABLE ONLY portal.menu_menu
  1316.     ADD CONSTRAINT ref_cod_menu_pai_fk FOREIGN KEY (ref_cod_menu_pai) REFERENCES portal.menu_menu(cod_menu_menu) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1317.  
  1318.  
  1319. --
  1320. -- TOC entry 6568 (class 2606 OID 9468703)
  1321. -- Name: bairro_idsetorbai_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
  1322. --
  1323.  
  1324. ALTER TABLE ONLY public.bairro
  1325.     ADD CONSTRAINT bairro_idsetorbai_fk FOREIGN KEY (idsetorbai) REFERENCES public.setor_bai(idsetorbai);
  1326.  
  1327.  
  1328. --
  1329. -- TOC entry 7175 (class 2606 OID 9468708)
  1330. -- Name: bairro_regiao_ref_cod_regiao_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  1331. --
  1332.  
  1333. ALTER TABLE ONLY public.bairro_regiao
  1334.     ADD CONSTRAINT bairro_regiao_ref_cod_regiao_fkey FOREIGN KEY (ref_cod_regiao) REFERENCES public.regiao(cod_regiao) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1335.  
  1336.  
  1337. --
  1338. -- TOC entry 7174 (class 2606 OID 9468713)
  1339. -- Name: bairro_regiao_ref_idbai_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  1340. --
  1341.  
  1342. ALTER TABLE ONLY public.bairro_regiao
  1343.     ADD CONSTRAINT bairro_regiao_ref_idbai_fkey FOREIGN KEY (ref_idbai) REFERENCES public.bairro(idbai) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1344.  
  1345.  
  1346. --
  1347. -- TOC entry 6569 (class 2606 OID 9468718)
  1348. -- Name: fk_bairro_distrito; Type: FK CONSTRAINT; Schema: public; Owner: -
  1349. --
  1350.  
  1351. ALTER TABLE ONLY public.bairro
  1352.     ADD CONSTRAINT fk_bairro_distrito FOREIGN KEY (iddis) REFERENCES public.distrito(iddis);
  1353.  
  1354.  
  1355. --
  1356. -- TOC entry 6570 (class 2606 OID 9468723)
  1357. -- Name: fk_bairro_municipio; Type: FK CONSTRAINT; Schema: public; Owner: -
  1358. --
  1359.  
  1360. ALTER TABLE ONLY public.bairro
  1361.     ADD CONSTRAINT fk_bairro_municipio FOREIGN KEY (idmun) REFERENCES public.municipio(idmun);
  1362.  
  1363.  
  1364. --
  1365. -- TOC entry 6571 (class 2606 OID 9468728)
  1366. -- Name: fk_bairro_sistema_idpes_cad; Type: FK CONSTRAINT; Schema: public; Owner: -
  1367. --
  1368.  
  1369. ALTER TABLE ONLY public.bairro
  1370.     ADD CONSTRAINT fk_bairro_sistema_idpes_cad FOREIGN KEY (idpes_cad) REFERENCES cadastro.pessoa(idpes) ON DELETE SET NULL;
  1371.  
  1372.  
  1373. --
  1374. -- TOC entry 6572 (class 2606 OID 9468733)
  1375. -- Name: fk_bairro_sistema_idpes_rev; Type: FK CONSTRAINT; Schema: public; Owner: -
  1376. --
  1377.  
  1378. ALTER TABLE ONLY public.bairro
  1379.     ADD CONSTRAINT fk_bairro_sistema_idpes_rev FOREIGN KEY (idpes_rev) REFERENCES cadastro.pessoa(idpes) ON DELETE SET NULL;
  1380.  
  1381.  
  1382. --
  1383. -- TOC entry 6573 (class 2606 OID 9468738)
  1384. -- Name: fk_bairro_sistema_idsis_cad; Type: FK CONSTRAINT; Schema: public; Owner: -
  1385. --
  1386.  
  1387. ALTER TABLE ONLY public.bairro
  1388.     ADD CONSTRAINT fk_bairro_sistema_idsis_cad FOREIGN KEY (idsis_cad) REFERENCES acesso.sistema(idsis) ON DELETE SET NULL;
  1389.  
  1390.  
  1391. --
  1392. -- TOC entry 6574 (class 2606 OID 9468743)
  1393. -- Name: fk_bairro_sistema_idsis_rev; Type: FK CONSTRAINT; Schema: public; Owner: -
  1394. --
  1395.  
  1396. ALTER TABLE ONLY public.bairro
  1397.     ADD CONSTRAINT fk_bairro_sistema_idsis_rev FOREIGN KEY (idsis_rev) REFERENCES acesso.sistema(idsis) ON DELETE SET NULL;
  1398.  
  1399.  
  1400. --
  1401. -- TOC entry 7180 (class 2606 OID 9468748)
  1402. -- Name: fk_distrito_municipio; Type: FK CONSTRAINT; Schema: public; Owner: -
  1403. --
  1404.  
  1405. ALTER TABLE ONLY public.distrito
  1406.     ADD CONSTRAINT fk_distrito_municipio FOREIGN KEY (idmun) REFERENCES public.municipio(idmun);
  1407.  
  1408.  
  1409. --
  1410. -- TOC entry 7179 (class 2606 OID 9468753)
  1411. -- Name: fk_distrito_sistema_idpes_cad; Type: FK CONSTRAINT; Schema: public; Owner: -
  1412. --
  1413.  
  1414. ALTER TABLE ONLY public.distrito
  1415.     ADD CONSTRAINT fk_distrito_sistema_idpes_cad FOREIGN KEY (idpes_cad) REFERENCES cadastro.pessoa(idpes) ON DELETE SET NULL;
  1416.  
  1417.  
  1418. --
  1419. -- TOC entry 7178 (class 2606 OID 9468758)
  1420. -- Name: fk_distrito_sistema_idpes_rev; Type: FK CONSTRAINT; Schema: public; Owner: -
  1421. --
  1422.  
  1423. ALTER TABLE ONLY public.distrito
  1424.     ADD CONSTRAINT fk_distrito_sistema_idpes_rev FOREIGN KEY (idpes_rev) REFERENCES cadastro.pessoa(idpes) ON DELETE SET NULL;
  1425.  
  1426.  
  1427. --
  1428. -- TOC entry 7177 (class 2606 OID 9468763)
  1429. -- Name: fk_distrito_sistema_idsis_cad; Type: FK CONSTRAINT; Schema: public; Owner: -
  1430. --
  1431.  
  1432. ALTER TABLE ONLY public.distrito
  1433.     ADD CONSTRAINT fk_distrito_sistema_idsis_cad FOREIGN KEY (idsis_cad) REFERENCES acesso.sistema(idsis) ON DELETE SET NULL;
  1434.  
  1435.  
  1436. --
  1437. -- TOC entry 7176 (class 2606 OID 9468768)
  1438. -- Name: fk_distrito_sistema_idsis_rev; Type: FK CONSTRAINT; Schema: public; Owner: -
  1439. --
  1440.  
  1441. ALTER TABLE ONLY public.distrito
  1442.     ADD CONSTRAINT fk_distrito_sistema_idsis_rev FOREIGN KEY (idsis_rev) REFERENCES acesso.sistema(idsis) ON DELETE SET NULL;
  1443.  
  1444.  
  1445. --
  1446. -- TOC entry 7181 (class 2606 OID 9468773)
  1447. -- Name: fk_logr_logr_fonetico; Type: FK CONSTRAINT; Schema: public; Owner: -
  1448. --
  1449.  
  1450. ALTER TABLE ONLY public.logradouro_fonetico
  1451.     ADD CONSTRAINT fk_logr_logr_fonetico FOREIGN KEY (idlog) REFERENCES public.logradouro(idlog);
  1452.  
  1453.  
  1454. --
  1455. -- TOC entry 6580 (class 2606 OID 9468778)
  1456. -- Name: fk_logradouro_municipio; Type: FK CONSTRAINT; Schema: public; Owner: -
  1457. --
  1458.  
  1459. ALTER TABLE ONLY public.municipio
  1460.     ADD CONSTRAINT fk_logradouro_municipio FOREIGN KEY (idmun) REFERENCES public.municipio(idmun);
  1461.  
  1462.  
  1463. --
  1464. -- TOC entry 6579 (class 2606 OID 9468783)
  1465. -- Name: fk_logradouro_sistema_idpes_cad; Type: FK CONSTRAINT; Schema: public; Owner: -
  1466. --
  1467.  
  1468. ALTER TABLE ONLY public.logradouro
  1469.     ADD CONSTRAINT fk_logradouro_sistema_idpes_cad FOREIGN KEY (idpes_cad) REFERENCES cadastro.pessoa(idpes) ON DELETE SET NULL;
  1470.  
  1471.  
  1472. --
  1473. -- TOC entry 6578 (class 2606 OID 9468788)
  1474. -- Name: fk_logradouro_sistema_idpes_rev; Type: FK CONSTRAINT; Schema: public; Owner: -
  1475. --
  1476.  
  1477. ALTER TABLE ONLY public.logradouro
  1478.     ADD CONSTRAINT fk_logradouro_sistema_idpes_rev FOREIGN KEY (idpes_rev) REFERENCES cadastro.pessoa(idpes) ON DELETE SET NULL;
  1479.  
  1480.  
  1481. --
  1482. -- TOC entry 6577 (class 2606 OID 9468793)
  1483. -- Name: fk_logradouro_sistema_idsis_cad; Type: FK CONSTRAINT; Schema: public; Owner: -
  1484. --
  1485.  
  1486. ALTER TABLE ONLY public.logradouro
  1487.     ADD CONSTRAINT fk_logradouro_sistema_idsis_cad FOREIGN KEY (idsis_cad) REFERENCES acesso.sistema(idsis) ON DELETE SET NULL;
  1488.  
  1489.  
  1490. --
  1491. -- TOC entry 6576 (class 2606 OID 9468798)
  1492. -- Name: fk_logradouro_sistema_idsis_rev; Type: FK CONSTRAINT; Schema: public; Owner: -
  1493. --
  1494.  
  1495. ALTER TABLE ONLY public.logradouro
  1496.     ADD CONSTRAINT fk_logradouro_sistema_idsis_rev FOREIGN KEY (idsis_rev) REFERENCES acesso.sistema(idsis) ON DELETE SET NULL;
  1497.  
  1498.  
  1499. --
  1500. -- TOC entry 6575 (class 2606 OID 9468803)
  1501. -- Name: fk_logradouro_tipo_log; Type: FK CONSTRAINT; Schema: public; Owner: -
  1502. --
  1503.  
  1504. ALTER TABLE ONLY public.logradouro
  1505.     ADD CONSTRAINT fk_logradouro_tipo_log FOREIGN KEY (idtlog) REFERENCES urbano.tipo_logradouro(idtlog);
  1506.  
  1507.  
  1508. --
  1509. -- TOC entry 6581 (class 2606 OID 9468808)
  1510. -- Name: fk_municipio_municipiopai; Type: FK CONSTRAINT; Schema: public; Owner: -
  1511. --
  1512.  
  1513. ALTER TABLE ONLY public.municipio
  1514.     ADD CONSTRAINT fk_municipio_municipiopai FOREIGN KEY (idmun_pai) REFERENCES public.municipio(idmun);
  1515.  
  1516.  
  1517. --
  1518. -- TOC entry 6582 (class 2606 OID 9468813)
  1519. -- Name: fk_municipio_sistema_idpes_cad; Type: FK CONSTRAINT; Schema: public; Owner: -
  1520. --
  1521.  
  1522. ALTER TABLE ONLY public.municipio
  1523.     ADD CONSTRAINT fk_municipio_sistema_idpes_cad FOREIGN KEY (idpes_cad) REFERENCES cadastro.pessoa(idpes) ON DELETE SET NULL;
  1524.  
  1525.  
  1526. --
  1527. -- TOC entry 6583 (class 2606 OID 9468818)
  1528. -- Name: fk_municipio_sistema_idpes_rev; Type: FK CONSTRAINT; Schema: public; Owner: -
  1529. --
  1530.  
  1531. ALTER TABLE ONLY public.municipio
  1532.     ADD CONSTRAINT fk_municipio_sistema_idpes_rev FOREIGN KEY (idpes_rev) REFERENCES cadastro.pessoa(idpes) ON DELETE SET NULL;
  1533.  
  1534.  
  1535. --
  1536. -- TOC entry 6584 (class 2606 OID 9468823)
  1537. -- Name: fk_municipio_sistema_idsis_cad; Type: FK CONSTRAINT; Schema: public; Owner: -
  1538. --
  1539.  
  1540. ALTER TABLE ONLY public.municipio
  1541.     ADD CONSTRAINT fk_municipio_sistema_idsis_cad FOREIGN KEY (idsis_cad) REFERENCES acesso.sistema(idsis) ON DELETE SET NULL;
  1542.  
  1543.  
  1544. --
  1545. -- TOC entry 6585 (class 2606 OID 9468828)
  1546. -- Name: fk_municipio_sistema_idsis_rev; Type: FK CONSTRAINT; Schema: public; Owner: -
  1547. --
  1548.  
  1549. ALTER TABLE ONLY public.municipio
  1550.     ADD CONSTRAINT fk_municipio_sistema_idsis_rev FOREIGN KEY (idsis_rev) REFERENCES acesso.sistema(idsis) ON DELETE SET NULL;
  1551.  
  1552.  
  1553. --
  1554. -- TOC entry 6586 (class 2606 OID 9468833)
  1555. -- Name: fk_municipio_uf; Type: FK CONSTRAINT; Schema: public; Owner: -
  1556. --
  1557.  
  1558. ALTER TABLE ONLY public.municipio
  1559.     ADD CONSTRAINT fk_municipio_uf FOREIGN KEY (sigla_uf) REFERENCES public.uf(sigla_uf);
  1560.  
  1561.  
  1562. --
  1563. -- TOC entry 7183 (class 2606 OID 9468838)
  1564. -- Name: fk_setor_idsetredir; Type: FK CONSTRAINT; Schema: public; Owner: -
  1565. --
  1566.  
  1567. ALTER TABLE ONLY public.setor
  1568.     ADD CONSTRAINT fk_setor_idsetredir FOREIGN KEY (idsetredir) REFERENCES public.setor(idset) ON DELETE RESTRICT;
  1569.  
  1570.  
  1571. --
  1572. -- TOC entry 7182 (class 2606 OID 9468843)
  1573. -- Name: fk_setor_idsetsub; Type: FK CONSTRAINT; Schema: public; Owner: -
  1574. --
  1575.  
  1576. ALTER TABLE ONLY public.setor
  1577.     ADD CONSTRAINT fk_setor_idsetsub FOREIGN KEY (idsetsub) REFERENCES public.setor(idset) ON DELETE CASCADE;
  1578.  
  1579.  
  1580. --
  1581. -- TOC entry 7184 (class 2606 OID 9468848)
  1582. -- Name: fk_uf_pais; Type: FK CONSTRAINT; Schema: public; Owner: -
  1583. --
  1584.  
  1585. ALTER TABLE ONLY public.uf
  1586.     ADD CONSTRAINT fk_uf_pais FOREIGN KEY (idpais) REFERENCES public.pais(idpais);
  1587.  
  1588.  
  1589. --
  1590. -- TOC entry 7185 (class 2606 OID 9468853)
  1591. -- Name: fk_vila_municipio; Type: FK CONSTRAINT; Schema: public; Owner: -
  1592. --
  1593.  
  1594. ALTER TABLE ONLY public.vila
  1595.     ADD CONSTRAINT fk_vila_municipio FOREIGN KEY (idmun) REFERENCES public.municipio(idmun);
  1596.  
  1597.  
  1598. --
  1599. -- TOC entry 7186 (class 2606 OID 9468858)
  1600. -- Name: aluno_cod_aluno_cod_aluno_fk; Type: FK CONSTRAINT; Schema: serieciasc; Owner: -
  1601. --
  1602.  
  1603. ALTER TABLE ONLY serieciasc.aluno_cod_aluno
  1604.     ADD CONSTRAINT aluno_cod_aluno_cod_aluno_fk FOREIGN KEY (cod_aluno) REFERENCES pmieducar.aluno(cod_aluno) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1605.  
  1606.  
  1607. --
  1608. -- TOC entry 7187 (class 2606 OID 9468863)
  1609. -- Name: aluno_uniforme_ref_cod_aluno_fkey; Type: FK CONSTRAINT; Schema: serieciasc; Owner: -
  1610. --
  1611.  
  1612. ALTER TABLE ONLY serieciasc.aluno_uniforme
  1613.     ADD CONSTRAINT aluno_uniforme_ref_cod_aluno_fkey FOREIGN KEY (ref_cod_aluno) REFERENCES pmieducar.aluno(cod_aluno) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1614.  
  1615.  
  1616. --
  1617. -- TOC entry 7188 (class 2606 OID 9468868)
  1618. -- Name: escola_agua_ref_cod_escola_fk; Type: FK CONSTRAINT; Schema: serieciasc; Owner: -
  1619. --
  1620.  
  1621. ALTER TABLE ONLY serieciasc.escola_agua
  1622.     ADD CONSTRAINT escola_agua_ref_cod_escola_fk FOREIGN KEY (ref_cod_escola) REFERENCES pmieducar.escola(cod_escola) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1623.  
  1624.  
  1625. --
  1626. -- TOC entry 7189 (class 2606 OID 9468873)
  1627. -- Name: escola_energia_ref_cod_escola_fk; Type: FK CONSTRAINT; Schema: serieciasc; Owner: -
  1628. --
  1629.  
  1630. ALTER TABLE ONLY serieciasc.escola_energia
  1631.     ADD CONSTRAINT escola_energia_ref_cod_escola_fk FOREIGN KEY (ref_cod_escola) REFERENCES pmieducar.escola(cod_escola) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1632.  
  1633.  
  1634. --
  1635. -- TOC entry 7190 (class 2606 OID 9468878)
  1636. -- Name: escola_lingua_indigena_ref_cod_escola_fk; Type: FK CONSTRAINT; Schema: serieciasc; Owner: -
  1637. --
  1638.  
  1639. ALTER TABLE ONLY serieciasc.escola_lingua_indigena
  1640.     ADD CONSTRAINT escola_lingua_indigena_ref_cod_escola_fk FOREIGN KEY (ref_cod_escola) REFERENCES pmieducar.escola(cod_escola) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1641.  
  1642.  
  1643. --
  1644. -- TOC entry 7191 (class 2606 OID 9468883)
  1645. -- Name: escola_lixo_ref_cod_escola_fk; Type: FK CONSTRAINT; Schema: serieciasc; Owner: -
  1646. --
  1647.  
  1648. ALTER TABLE ONLY serieciasc.escola_lixo
  1649.     ADD CONSTRAINT escola_lixo_ref_cod_escola_fk FOREIGN KEY (ref_cod_escola) REFERENCES pmieducar.escola(cod_escola) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1650.  
  1651.  
  1652. --
  1653. -- TOC entry 7192 (class 2606 OID 9468888)
  1654. -- Name: escola_projeto_ref_cod_escola_fk; Type: FK CONSTRAINT; Schema: serieciasc; Owner: -
  1655. --
  1656.  
  1657. ALTER TABLE ONLY serieciasc.escola_projeto
  1658.     ADD CONSTRAINT escola_projeto_ref_cod_escola_fk FOREIGN KEY (ref_cod_escola) REFERENCES pmieducar.escola(cod_escola) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1659.  
  1660.  
  1661. --
  1662. -- TOC entry 7193 (class 2606 OID 9468893)
  1663. -- Name: escola_regulamentacao_ref_cod_escola_fk; Type: FK CONSTRAINT; Schema: serieciasc; Owner: -
  1664. --
  1665.  
  1666. ALTER TABLE ONLY serieciasc.escola_regulamentacao
  1667.     ADD CONSTRAINT escola_regulamentacao_ref_cod_escola_fk FOREIGN KEY (ref_cod_escola) REFERENCES pmieducar.escola(cod_escola) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1668.  
  1669.  
  1670. --
  1671. -- TOC entry 7194 (class 2606 OID 9468898)
  1672. -- Name: escola_sanitario_ref_cod_escola_fk; Type: FK CONSTRAINT; Schema: serieciasc; Owner: -
  1673. --
  1674.  
  1675. ALTER TABLE ONLY serieciasc.escola_sanitario
  1676.     ADD CONSTRAINT escola_sanitario_ref_cod_escola_fk FOREIGN KEY (ref_cod_escola) REFERENCES pmieducar.escola(cod_escola) ON UPDATE RESTRICT ON DELETE RESTRICT;
  1677.  
  1678.  
  1679. --
  1680. -- TOC entry 7205 (class 2606 OID 9468903)
  1681. -- Name: fk_cep_log_bairro_bai; Type: FK CONSTRAINT; Schema: urbano; Owner: -
  1682. --
  1683.  
  1684. ALTER TABLE ONLY urbano.cep_logradouro_bairro
  1685.     ADD CONSTRAINT fk_cep_log_bairro_bai FOREIGN KEY (idbai) REFERENCES public.bairro(idbai);
  1686.  
  1687.  
  1688. --
  1689. -- TOC entry 7204 (class 2606 OID 9468908)
  1690. -- Name: fk_cep_log_bairro_cep_log; Type: FK CONSTRAINT; Schema: urbano; Owner: -
  1691. --
  1692.  
  1693. ALTER TABLE ONLY urbano.cep_logradouro_bairro
  1694.     ADD CONSTRAINT fk_cep_log_bairro_cep_log FOREIGN KEY (cep, idlog) REFERENCES urbano.cep_logradouro(cep, idlog) ON DELETE CASCADE;
  1695.  
  1696.  
  1697. --
  1698. -- TOC entry 7203 (class 2606 OID 9468913)
  1699. -- Name: fk_cep_logradouro_bairro_sistema_idpes_cad; Type: FK CONSTRAINT; Schema: urbano; Owner: -
  1700. --
  1701.  
  1702. ALTER TABLE ONLY urbano.cep_logradouro_bairro
  1703.     ADD CONSTRAINT fk_cep_logradouro_bairro_sistema_idpes_cad FOREIGN KEY (idpes_cad) REFERENCES cadastro.pessoa(idpes) ON DELETE SET NULL;
  1704.  
  1705.  
  1706. --
  1707. -- TOC entry 7202 (class 2606 OID 9468918)
  1708. -- Name: fk_cep_logradouro_bairro_sistema_idpes_rev; Type: FK CONSTRAINT; Schema: urbano; Owner: -
  1709. --
  1710.  
  1711. ALTER TABLE ONLY urbano.cep_logradouro_bairro
  1712.     ADD CONSTRAINT fk_cep_logradouro_bairro_sistema_idpes_rev FOREIGN KEY (idpes_rev) REFERENCES cadastro.pessoa(idpes) ON DELETE SET NULL;
  1713.  
  1714.  
  1715. --
  1716. -- TOC entry 7201 (class 2606 OID 9468923)
  1717. -- Name: fk_cep_logradouro_bairro_sistema_idsis_cad; Type: FK CONSTRAINT; Schema: urbano; Owner: -
  1718. --
  1719.  
  1720. ALTER TABLE ONLY urbano.cep_logradouro_bairro
  1721.     ADD CONSTRAINT fk_cep_logradouro_bairro_sistema_idsis_cad FOREIGN KEY (idsis_cad) REFERENCES acesso.sistema(idsis) ON DELETE SET NULL;
  1722.  
  1723.  
  1724. --
  1725. -- TOC entry 7200 (class 2606 OID 9468928)
  1726. -- Name: fk_cep_logradouro_bairro_sistema_idsis_rev; Type: FK CONSTRAINT; Schema: urbano; Owner: -
  1727. --
  1728.  
  1729. ALTER TABLE ONLY urbano.cep_logradouro_bairro
  1730.     ADD CONSTRAINT fk_cep_logradouro_bairro_sistema_idsis_rev FOREIGN KEY (idsis_rev) REFERENCES acesso.sistema(idsis) ON DELETE SET NULL;
  1731.  
  1732.  
  1733. --
  1734. -- TOC entry 7199 (class 2606 OID 9468933)
  1735. -- Name: fk_cep_logradouro_logradouro; Type: FK CONSTRAINT; Schema: urbano; Owner: -
  1736. --
  1737.  
  1738. ALTER TABLE ONLY urbano.cep_logradouro
  1739.     ADD CONSTRAINT fk_cep_logradouro_logradouro FOREIGN KEY (idlog) REFERENCES public.logradouro(idlog) ON DELETE CASCADE;
  1740.  
  1741.  
  1742. --
  1743. -- TOC entry 7198 (class 2606 OID 9468938)
  1744. -- Name: fk_cep_logradouro_sistema_idpes_cad; Type: FK CONSTRAINT; Schema: urbano; Owner: -
  1745. --
  1746.  
  1747. ALTER TABLE ONLY urbano.cep_logradouro
  1748.     ADD CONSTRAINT fk_cep_logradouro_sistema_idpes_cad FOREIGN KEY (idpes_cad) REFERENCES cadastro.pessoa(idpes) ON DELETE SET NULL;
  1749.  
  1750.  
  1751. --
  1752. -- TOC entry 7197 (class 2606 OID 9468943)
  1753. -- Name: fk_cep_logradouro_sistema_idpes_rev; Type: FK CONSTRAINT; Schema: urbano; Owner: -
  1754. --
  1755.  
  1756. ALTER TABLE ONLY urbano.cep_logradouro
  1757.     ADD CONSTRAINT fk_cep_logradouro_sistema_idpes_rev FOREIGN KEY (idpes_rev) REFERENCES cadastro.pessoa(idpes) ON DELETE SET NULL;
  1758.  
  1759.  
  1760. --
  1761. -- TOC entry 7196 (class 2606 OID 9468948)
  1762. -- Name: fk_cep_logradouro_sistema_idsis_cad; Type: FK CONSTRAINT; Schema: urbano; Owner: -
  1763. --
  1764.  
  1765. ALTER TABLE ONLY urbano.cep_logradouro
  1766.     ADD CONSTRAINT fk_cep_logradouro_sistema_idsis_cad FOREIGN KEY (idsis_cad) REFERENCES acesso.sistema(idsis) ON DELETE SET NULL;
  1767.  
  1768. --
  1769. -- Name: get_nome_escola(integer); Type: FUNCTION; Schema: relatorio; Owner: postgres
  1770. --
  1771.  
  1772. CREATE OR REPLACE FUNCTION relatorio.get_nome_escola(integer) RETURNS character varying
  1773.     LANGUAGE sql
  1774.     AS $_$SELECT COALESCE(
  1775.        (SELECT COALESCE (fcn_upper(ps.nome),fcn_upper(juridica.fantasia))
  1776.     FROM cadastro.pessoa ps, cadastro.juridica
  1777.    WHERE escola.ref_idpes = juridica.idpes
  1778.      AND juridica.idpes = ps.idpes
  1779.      AND ps.idpes = escola.ref_idpes),
  1780.        (SELECT nm_escola
  1781.     FROM pmieducar.escola_complemento
  1782.    WHERE ref_cod_escola = escola.cod_escola))
  1783.   FROM pmieducar.escola
  1784.  WHERE escola.cod_escola = $1;$_$;
  1785.  
  1786.  
  1787. --
  1788. -- Name: get_ddd_escola(integer); Type: FUNCTION; Schema: relatorio; Owner: postgres
  1789. --
  1790.  
  1791. CREATE OR REPLACE FUNCTION relatorio.get_ddd_escola(integer) RETURNS numeric
  1792.     LANGUAGE sql
  1793.     AS $_$
  1794. SELECT COALESCE(
  1795.                   (SELECT min(fone_pessoa.ddd)
  1796.                    FROM cadastro.fone_pessoa, cadastro.juridica
  1797.                    WHERE juridica.idpes = fone_pessoa.idpes
  1798.                      AND juridica.idpes =
  1799.                        (SELECT idpes
  1800.                         FROM cadastro.pessoa
  1801.                         INNER JOIN pmieducar.escola ON escola.ref_idpes = pessoa.idpes
  1802.                         WHERE cod_escola = $1)),
  1803.                   (SELECT min(ddd_telefone)
  1804.                    FROM pmieducar.escola_complemento
  1805.                    WHERE ref_cod_escola = $1)); $_$;
  1806.  
  1807. --
  1808. -- Name: get_telefone_escola(integer); Type: FUNCTION; Schema: relatorio; Owner: postgres
  1809. --
  1810.  
  1811. CREATE OR REPLACE FUNCTION relatorio.get_telefone_escola(integer) RETURNS character varying
  1812.     LANGUAGE sql
  1813.     AS $_$
  1814. SELECT COALESCE(
  1815.                   (SELECT min(to_char(fone_pessoa.fone, '99999-9999'))
  1816.                    FROM cadastro.fone_pessoa, cadastro.juridica
  1817.                    WHERE juridica.idpes = fone_pessoa.idpes
  1818.                      AND juridica.idpes =
  1819.                        (SELECT idpes
  1820.                         FROM cadastro.pessoa
  1821.                         INNER JOIN pmieducar.escola ON escola.ref_idpes = pessoa.idpes
  1822.                         WHERE cod_escola = $1)),
  1823.                   (SELECT min(to_char(telefone, '99999-9999'))
  1824.                    FROM pmieducar.escola_complemento
  1825.                    WHERE escola_complemento.ref_cod_escola = $1)); $_$;
  1826.  
  1827. --
  1828. -- Name: get_max_sequencial_matricula(integer); Type: FUNCTION; Schema: relatorio; Owner: ieducar
  1829. --
  1830.  
  1831. CREATE OR REPLACE FUNCTION relatorio.get_max_sequencial_matricula(integer) RETURNS integer
  1832.     LANGUAGE sql
  1833.     AS $_$
  1834.                             SELECT MAX(matricula_turma.sequencial)
  1835.                               FROM matricula_turma
  1836.                              INNER JOIN pmieducar.matricula ON (matricula.cod_matricula = matricula_turma.ref_cod_matricula)
  1837.                              INNER JOIN relatorio.view_situacao ON (view_situacao.cod_matricula = matricula.cod_matricula
  1838.                                                                 AND view_situacao.cod_turma = matricula_turma.ref_cod_turma
  1839.                                                                 AND view_situacao.sequencial = matricula_turma.sequencial)
  1840.                              WHERE ref_cod_matricula = $1;
  1841.                         $_$;
  1842.  
  1843. --
  1844. -- TOC entry 7195 (class 2606 OID 9468953)
  1845. -- Name: fk_cep_logradouro_sistema_idsis_rev; Type: FK CONSTRAINT; Schema: urbano; Owner: -
  1846. --
  1847.  
  1848. ALTER TABLE ONLY urbano.cep_logradouro
  1849.     ADD CONSTRAINT fk_cep_logradouro_sistema_idsis_rev FOREIGN KEY (idsis_rev) REFERENCES acesso.sistema(idsis) ON DELETE SET NULL;
  1850.  
  1851.  
  1852. -- Completed on 2018-11-19 15:03:40 -02
  1853.  
  1854. --
  1855. -- PostgreSQL database dump complete
  1856. --
  1857.  
  1858. ) at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664, Doctrine\\DBAL\\Driver\\PDOException(code: 0): could not find driver at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:31, PDOException(code: 0): could not find driver at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:27)
  1859. [stacktrace]
  1860. #0 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(624): Illuminate\\Database\\Connection->runQueryCallback('--\
  1861. -- PostgreSQ...', Array, Object(Closure))
  1862. #1 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(511): Illuminate\\Database\\Connection->run('--\
  1863. -- PostgreSQ...', Array, Object(Closure))
  1864. #2 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(327): Illuminate\\Database\\Connection->unprepared('--\
  1865. -- PostgreSQ...')
  1866. #3 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(237): Illuminate\\Database\\DatabaseManager->__call('unprepared', Array)
  1867. #4 /var/www/html/database/seeds/InitialDatabaseSeeder.php(16): Illuminate\\Support\\Facades\\Facade::__callStatic('unprepared', Array)
  1868. #5 [internal function]: InitialDatabaseSeeder->run()
  1869. #6 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
  1870. #7 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
  1871. #8 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
  1872. #9 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(572): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
  1873. #10 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Seeder.php(122): Illuminate\\Container\\Container->call(Array)
  1874. #11 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php(63): Illuminate\\Database\\Seeder->__invoke()
  1875. #12 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php(122): Illuminate\\Database\\Console\\Seeds\\SeedCommand->Illuminate\\Database\\Console\\Seeds\\{closure}()
  1876. #13 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php(64): Illuminate\\Database\\Eloquent\\Model::unguarded(Object(Closure))
  1877. #14 [internal function]: Illuminate\\Database\\Console\\Seeds\\SeedCommand->handle()
  1878. #15 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
  1879. #16 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
  1880. #17 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
  1881. #18 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(572): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
  1882. #19 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(183): Illuminate\\Container\\Container->call(Array)
  1883. #20 /var/www/html/vendor/symfony/console/Command/Command.php(255): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Illuminate\\Console\\OutputStyle))
  1884. #21 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(170): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Illuminate\\Console\\OutputStyle))
  1885. #22 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(198): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Illuminate\\Console\\OutputStyle))
  1886. #23 /var/www/html/app/Console/Commands/LegacyDatabaseCommand.php(33): Illuminate\\Console\\Command->call('db:seed', Array)
  1887. #24 [internal function]: App\\Console\\Commands\\LegacyDatabaseCommand->handle()
  1888. #25 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
  1889. #26 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
  1890. #27 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
  1891. #28 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(572): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
  1892. #29 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(183): Illuminate\\Container\\Container->call(Array)
  1893. #30 /var/www/html/vendor/symfony/console/Command/Command.php(255): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
  1894. #31 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(170): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
  1895. #32 /var/www/html/vendor/symfony/console/Application.php(921): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
  1896. #33 /var/www/html/vendor/symfony/console/Application.php(273): Symfony\\Component\\Console\\Application->doRunCommand(Object(App\\Console\\Commands\\LegacyDatabaseCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
  1897. #34 /var/www/html/vendor/symfony/console/Application.php(149): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
  1898. #35 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Application.php(89): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
  1899. #36 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(122): Illuminate\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
  1900. #37 /var/www/html/artisan(37): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
  1901. #38 {main}
  1902. "}
  1903. nsinformatica@8.8.8.8:/var/www/html/storage/logs$
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