Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.59 KB | None | 0 0
  1. academy=> \d invoice;
  2. Table "public.invoice"
  3. Column | Type | Modifiers
  4. -------------+-----------------------------+------------------------------------------------------
  5. id | integer | not null default nextval('invoice_id_seq'::regclass)
  6. number | bytea | not null
  7. due_date | timestamp without time zone | not null
  8. amount | integer | not null
  9. paid | boolean | not null default false
  10. model | bytea | not null
  11. model_id | integer | not null
  12. student_id | integer | not null
  13. previous_id | integer |
  14. note | text | not null default ''::text
  15. Indexes:
  16. "invoice_pkey" PRIMARY KEY, btree (id)
  17. "invoice_number_idx" btree (number)
  18. Foreign-key constraints:
  19. "invoice_previous_id_fkey" FOREIGN KEY (previous_id) REFERENCES invoice(id) ON DELETE RESTRICT
  20. "invoice_student_id_fkey" FOREIGN KEY (student_id) REFERENCES student(id) ON DELETE RESTRICT
  21. Referenced by:
  22. TABLE "invoice" CONSTRAINT "invoice_previous_id_fkey" FOREIGN KEY (previous_id) REFERENCES invoice(id) ON DELETE RESTRICT
  23. TABLE "receipt_invoice" CONSTRAINT "receipt_invoice_invoice_id_fkey" FOREIGN KEY (invoice_id) REFERENCES invoice(id) ON DELETE CASCADE
  24.  
  25.  
  26.  
  27.  
  28.  
  29. academy=> \d receipt;
  30. Table "public.receipt"
  31. Column | Type | Modifiers
  32. ---------------+-----------------------------+----------------------------------------------------------------------------------------
  33. id | integer | not null default nextval('receipt_id_seq'::regclass)
  34. creator_id | integer | not null
  35. datetime | timestamp without time zone | not null default now()
  36. number | integer | not null
  37. receipt_date | date | not null
  38. html | text |
  39. random_number | integer | not null default trunc(((random() * (999)::double precision) + (1)::double precision))
  40. Indexes:
  41. "receipt_pkey" PRIMARY KEY, btree (id)
  42. "number_idx" UNIQUE, btree (date_part('month'::text, datetime), date_part('year'::text, datetime), number)
  43. Foreign-key constraints:
  44. "receipt_creator_id_fkey" FOREIGN KEY (creator_id) REFERENCES warp_avatar(id) ON DELETE RESTRICT
  45. Referenced by:
  46. TABLE "receipt_invoice" CONSTRAINT "receipt_invoice_receipt_id_fkey" FOREIGN KEY (receipt_id) REFERENCES receipt(id) ON DELETE CASCADE
  47.  
  48. academy=> \d receipt_invoice;
  49. Table "public.receipt_invoice"
  50. Column | Type | Modifiers
  51. ------------+---------+-----------
  52. receipt_id | integer | not null
  53. invoice_id | integer | not null
  54. Indexes:
  55. "receipt_invoice_idx" UNIQUE, btree (receipt_id, invoice_id)
  56. "invoice_id_idx" btree (invoice_id)
  57. "receipt_id_idx" btree (receipt_id)
  58. Foreign-key constraints:
  59. "receipt_invoice_invoice_id_fkey" FOREIGN KEY (invoice_id) REFERENCES invoice(id) ON DELETE CASCADE
  60. "receipt_invoice_receipt_id_fkey" FOREIGN KEY (receipt_id) REFERENCES receipt(id) ON DELETE CASCADE
  61.  
  62.  
  63. academy=> \d adhoc_balance;
  64. Table "public.adhoc_balance"
  65. Column | Type | Modifiers
  66. -----------------+-----------------------------+------------------------------------------------------------
  67. id | integer | not null default nextval('adhoc_balance_id_seq'::regclass)
  68. expense | text | not null
  69. balance | integer | not null
  70. created | timestamp without time zone | not null
  71. student_id | integer | not null
  72. total_amount | integer |
  73. original_amount | integer |
  74. Indexes:
  75. "adhoc_balance_pkey" PRIMARY KEY, btree (id)
  76. Foreign-key constraints:
  77. "adhoc_balance_student_id_fkey" FOREIGN KEY (student_id) REFERENCES student(id) ON DELETE CASCADE
  78.  
  79.  
  80. List of relations
  81. Schema | Name | Type | Owner
  82. --------+----------------------+-------+---------
  83. public | adhoc_balance | table | academy
  84. public | attendance | table | academy
  85. public | class | table | academy
  86. public | class_time | table | academy
  87. public | contact_type | table | academy
  88. public | course | table | academy
  89. public | course_level | table | academy
  90. public | history | table | academy
  91. public | intended_course_type | table | academy
  92. public | invoice | table | academy
  93. public | lesson | table | academy
  94. public | receipt | table | academy
  95. public | receipt_invoice | table | academy
  96. public | room | table | academy
  97. public | schedule | table | academy
  98. public | stateful_grid | table | academy
  99. public | student | table | academy
  100. public | student_class | table | academy
  101. public | wait_list | table | academy
  102. public | warp_avatar | table | academy
  103. public | warp_avatar_role | table | academy
  104. public | warp_fulltext | table | academy
  105. public | warp_session | table | academy
  106. (23 rows)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement