Advertisement
chrissharp123

Untitled

Apr 12th, 2017
807
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.99 KB | None | 0 0
  1. action.circulation:
  2.  
  3. Table "action.circulation"
  4. Column | Type | Modifiers | Storage | Stats target | Description
  5. ---------------------+--------------------------+------------------------------------------------------------------+----------+--------------+-------------
  6. id | bigint | not null default nextval('money.billable_xact_id_seq'::regclass) | plain | |
  7. usr | integer | not null | plain | |
  8. xact_start | timestamp with time zone | not null default now() | plain | |
  9. xact_finish | timestamp with time zone | | plain | |
  10. unrecovered | boolean | | plain | |
  11. target_copy | bigint | not null | plain | |
  12. circ_lib | integer | not null | plain | |
  13. circ_staff | integer | not null | plain | |
  14. checkin_staff | integer | | plain | |
  15. checkin_lib | integer | | plain | |
  16. renewal_remaining | integer | not null | plain | |
  17. due_date | timestamp with time zone | | plain | |
  18. stop_fines_time | timestamp with time zone | | plain | |
  19. checkin_time | timestamp with time zone | | plain | |
  20. duration | interval | | plain | |
  21. fine_interval | interval | not null default '1 day'::interval | plain | |
  22. recurring_fine | numeric(6,2) | | main | |
  23. max_fine | numeric(6,2) | | main | |
  24. phone_renewal | boolean | not null default false | plain | |
  25. desk_renewal | boolean | not null default false | plain | |
  26. opac_renewal | boolean | not null default false | plain | |
  27. duration_rule | text | not null | extended | |
  28. recurring_fine_rule | text | not null | extended | |
  29. max_fine_rule | text | not null | extended | |
  30. stop_fines | text | | extended | |
  31. create_time | timestamp with time zone | | plain | |
  32. workstation | integer | | plain | |
  33. parent_circ | bigint | | plain | |
  34. checkin_workstation | integer | | plain | |
  35. checkin_scan_time | timestamp with time zone | | plain | |
  36. grace_period | interval | not null | plain | |
  37. copy_location | integer | not null default 1 | plain | |
  38. Indexes:
  39. "circulation_pkey" PRIMARY KEY, btree (id)
  40. "circ_parent_idx" UNIQUE, btree (parent_circ) WHERE parent_circ IS NOT NULL
  41. "only_one_concurrent_checkout_per_copy" UNIQUE, btree (target_copy) WHERE checkin_time IS NULL
  42. "action_circulation_target_copy_idx" btree (target_copy)
  43. "circ_all_usr_idx" btree (usr)
  44. "circ_checkin_staff_idx" btree (checkin_staff)
  45. "circ_checkin_time" btree (checkin_time) WHERE checkin_time IS NOT NULL
  46. "circ_circ_lib_idx" btree (circ_lib)
  47. "circ_circ_lib_open_idx" btree (usr, circ_lib) WHERE xact_finish IS NULL
  48. "circ_circ_staff_idx" btree (circ_staff)
  49. "circ_copy_idx" btree (target_copy)
  50. "circ_open_date_idx" btree (xact_start) WHERE xact_finish IS NULL
  51. "circ_open_xacts_idx" btree (usr) WHERE xact_finish IS NULL
  52. "circ_outstanding_idx" btree (usr) WHERE checkin_time IS NULL
  53. "circ_usr_idx" btree (usr) CLUSTER
  54. Check constraints:
  55. "circulation_stop_fines_check" CHECK (stop_fines = ANY (ARRAY['CHECKIN'::text, 'CLAIMSRETURNED'::text, 'LOST'::text, 'MAXFINES'::text, 'RENEW'::text, 'LONGOVERDUE'::text, 'CLAIMSNEVERCHECKEDOUT'::text]))
  56. Foreign-key constraints:
  57. "action_circulation_circ_lib_fkey" FOREIGN KEY (circ_lib) REFERENCES actor.org_unit(id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED
  58. "action_circulation_usr_fkey" FOREIGN KEY (usr) REFERENCES actor.usr(id) DEFERRABLE INITIALLY DEFERRED
  59. "circulation_checkin_workstation_fkey" FOREIGN KEY (checkin_workstation) REFERENCES actor.workstation(id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED
  60. "circulation_copy_location_fkey" FOREIGN KEY (copy_location) REFERENCES asset.copy_location(id) DEFERRABLE INITIALLY DEFERRED
  61. "circulation_parent_circ_fkey" FOREIGN KEY (parent_circ) REFERENCES action.circulation(id) DEFERRABLE INITIALLY DEFERRED
  62. "circulation_workstation_fkey" FOREIGN KEY (workstation) REFERENCES actor.workstation(id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED
  63. Referenced by:
  64. TABLE "action.circulation_limit_group_map" CONSTRAINT "circulation_limit_group_map_circ_fkey" FOREIGN KEY (circ) REFERENCES action.circulation(id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
  65. TABLE "action.circulation" CONSTRAINT "circulation_parent_circ_fkey" FOREIGN KEY (parent_circ) REFERENCES action.circulation(id) DEFERRABLE INITIALLY DEFERRED
  66. TABLE "action.usr_circ_history" CONSTRAINT "usr_circ_history_source_circ_fkey" FOREIGN KEY (source_circ) REFERENCES action.circulation(id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED
  67. Triggers:
  68. action_circulation_aging_tgr BEFORE DELETE ON action.circulation FOR EACH ROW EXECUTE PROCEDURE action.age_circ_on_delete()
  69. action_circulation_stop_fines_tgr BEFORE UPDATE ON action.circulation FOR EACH ROW EXECUTE PROCEDURE action.circulation_claims_returned()
  70. action_circulation_target_copy_trig AFTER INSERT OR UPDATE ON action.circulation FOR EACH ROW EXECUTE PROCEDURE fake_fkey_tgr('target_copy')
  71. age_parent_circ AFTER DELETE ON action.circulation FOR EACH ROW EXECUTE PROCEDURE action.age_parent_circ_on_delete()
  72. archive_stat_cats_tgr AFTER INSERT ON action.circulation FOR EACH ROW EXECUTE PROCEDURE action.archive_stat_cats()
  73. fill_circ_copy_location_tgr BEFORE INSERT ON action.circulation FOR EACH ROW EXECUTE PROCEDURE action.fill_circ_copy_location()
  74. maintain_usr_circ_history_tgr AFTER INSERT OR UPDATE ON action.circulation FOR EACH ROW EXECUTE PROCEDURE action.maintain_usr_circ_history()
  75. mat_summary_change_tgr AFTER UPDATE ON action.circulation FOR EACH ROW EXECUTE PROCEDURE money.mat_summary_update()
  76. mat_summary_create_tgr AFTER INSERT ON action.circulation FOR EACH ROW EXECUTE PROCEDURE money.mat_summary_create('circulation')
  77. mat_summary_remove_tgr AFTER DELETE ON action.circulation FOR EACH ROW EXECUTE PROCEDURE money.mat_summary_delete()
  78. push_due_date_tgr BEFORE INSERT OR UPDATE ON action.circulation FOR EACH ROW EXECUTE PROCEDURE action.push_circ_due_time()
  79. Inherits: money.billable_xact
  80.  
  81. action.aged_circulation:
  82.  
  83. Table "action.aged_circulation"
  84. Column | Type | Modifiers | Storage | Stats target | Description
  85. ---------------------+--------------------------+-----------+----------+--------------+-------------
  86. usr_post_code | text | | extended | |
  87. usr_home_ou | integer | not null | plain | |
  88. usr_profile | integer | not null | plain | |
  89. usr_birth_year | integer | | plain | |
  90. copy_call_number | integer | not null | plain | |
  91. copy_location | integer | not null | plain | |
  92. copy_owning_lib | integer | not null | plain | |
  93. copy_circ_lib | integer | not null | plain | |
  94. copy_bib_record | bigint | not null | plain | |
  95. id | bigint | not null | plain | |
  96. xact_start | timestamp with time zone | not null | plain | |
  97. xact_finish | timestamp with time zone | | plain | |
  98. target_copy | bigint | not null | plain | |
  99. circ_lib | integer | not null | plain | |
  100. circ_staff | integer | not null | plain | |
  101. checkin_staff | integer | | plain | |
  102. checkin_lib | integer | | plain | |
  103. renewal_remaining | integer | not null | plain | |
  104. due_date | timestamp with time zone | | plain | |
  105. stop_fines_time | timestamp with time zone | | plain | |
  106. checkin_time | timestamp with time zone | | plain | |
  107. duration | interval | | plain | |
  108. fine_interval | interval | not null | plain | |
  109. recurring_fine | numeric(6,2) | | main | |
  110. max_fine | numeric(6,2) | | main | |
  111. phone_renewal | boolean | not null | plain | |
  112. desk_renewal | boolean | not null | plain | |
  113. opac_renewal | boolean | not null | plain | |
  114. duration_rule | text | not null | extended | |
  115. recurring_fine_rule | text | not null | extended | |
  116. max_fine_rule | text | not null | extended | |
  117. stop_fines | text | | extended | |
  118. create_time | timestamp with time zone | | plain | |
  119. workstation | integer | | plain | |
  120. parent_circ | bigint | | plain | |
  121. checkin_workstation | integer | | plain | |
  122. checkin_scan_time | timestamp with time zone | | plain | |
  123. grace_period | interval | not null | plain | |
  124. Indexes:
  125. "aged_circulation_pkey" PRIMARY KEY, btree (id)
  126. "action_aged_circulation_parent_circ_idx" btree (parent_circ)
  127. "action_aged_circulation_target_copy_idx" btree (target_copy)
  128. "aged_circ_circ_lib_idx" btree (circ_lib)
  129. "aged_circ_copy_circ_lib_idx" btree (copy_circ_lib)
  130. "aged_circ_copy_location_idx" btree (copy_location)
  131. "aged_circ_copy_owning_lib_idx" btree (copy_owning_lib)
  132. "aged_circ_start_idx" btree (xact_start)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement