Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- academy=> \d invoice;
- Table "public.invoice"
- Column | Type | Modifiers
- -------------+-----------------------------+------------------------------------------------------
- id | integer | not null default nextval('invoice_id_seq'::regclass)
- number | bytea | not null
- due_date | timestamp without time zone | not null
- amount | integer | not null
- paid | boolean | not null default false
- model | bytea | not null
- model_id | integer | not null
- student_id | integer | not null
- previous_id | integer |
- note | text | not null default ''::text
- Indexes:
- "invoice_pkey" PRIMARY KEY, btree (id)
- "invoice_number_idx" btree (number)
- Foreign-key constraints:
- "invoice_previous_id_fkey" FOREIGN KEY (previous_id) REFERENCES invoice(id) ON DELETE RESTRICT
- "invoice_student_id_fkey" FOREIGN KEY (student_id) REFERENCES student(id) ON DELETE RESTRICT
- Referenced by:
- TABLE "invoice" CONSTRAINT "invoice_previous_id_fkey" FOREIGN KEY (previous_id) REFERENCES invoice(id) ON DELETE RESTRICT
- TABLE "receipt_invoice" CONSTRAINT "receipt_invoice_invoice_id_fkey" FOREIGN KEY (invoice_id) REFERENCES invoice(id) ON DELETE CASCADE
- academy=> \d receipt;
- Table "public.receipt"
- Column | Type | Modifiers
- ---------------+-----------------------------+----------------------------------------------------------------------------------------
- id | integer | not null default nextval('receipt_id_seq'::regclass)
- creator_id | integer | not null
- datetime | timestamp without time zone | not null default now()
- number | integer | not null
- receipt_date | date | not null
- html | text |
- random_number | integer | not null default trunc(((random() * (999)::double precision) + (1)::double precision))
- Indexes:
- "receipt_pkey" PRIMARY KEY, btree (id)
- "number_idx" UNIQUE, btree (date_part('month'::text, datetime), date_part('year'::text, datetime), number)
- Foreign-key constraints:
- "receipt_creator_id_fkey" FOREIGN KEY (creator_id) REFERENCES warp_avatar(id) ON DELETE RESTRICT
- Referenced by:
- TABLE "receipt_invoice" CONSTRAINT "receipt_invoice_receipt_id_fkey" FOREIGN KEY (receipt_id) REFERENCES receipt(id) ON DELETE CASCADE
- academy=> \d receipt_invoice;
- Table "public.receipt_invoice"
- Column | Type | Modifiers
- ------------+---------+-----------
- receipt_id | integer | not null
- invoice_id | integer | not null
- Indexes:
- "receipt_invoice_idx" UNIQUE, btree (receipt_id, invoice_id)
- "invoice_id_idx" btree (invoice_id)
- "receipt_id_idx" btree (receipt_id)
- Foreign-key constraints:
- "receipt_invoice_invoice_id_fkey" FOREIGN KEY (invoice_id) REFERENCES invoice(id) ON DELETE CASCADE
- "receipt_invoice_receipt_id_fkey" FOREIGN KEY (receipt_id) REFERENCES receipt(id) ON DELETE CASCADE
- academy=> \d adhoc_balance;
- Table "public.adhoc_balance"
- Column | Type | Modifiers
- -----------------+-----------------------------+------------------------------------------------------------
- id | integer | not null default nextval('adhoc_balance_id_seq'::regclass)
- expense | text | not null
- balance | integer | not null
- created | timestamp without time zone | not null
- student_id | integer | not null
- total_amount | integer |
- original_amount | integer |
- Indexes:
- "adhoc_balance_pkey" PRIMARY KEY, btree (id)
- Foreign-key constraints:
- "adhoc_balance_student_id_fkey" FOREIGN KEY (student_id) REFERENCES student(id) ON DELETE CASCADE
- List of relations
- Schema | Name | Type | Owner
- --------+----------------------+-------+---------
- public | adhoc_balance | table | academy
- public | attendance | table | academy
- public | class | table | academy
- public | class_time | table | academy
- public | contact_type | table | academy
- public | course | table | academy
- public | course_level | table | academy
- public | history | table | academy
- public | intended_course_type | table | academy
- public | invoice | table | academy
- public | lesson | table | academy
- public | receipt | table | academy
- public | receipt_invoice | table | academy
- public | room | table | academy
- public | schedule | table | academy
- public | stateful_grid | table | academy
- public | student | table | academy
- public | student_class | table | academy
- public | wait_list | table | academy
- public | warp_avatar | table | academy
- public | warp_avatar_role | table | academy
- public | warp_fulltext | table | academy
- public | warp_session | table | academy
- (23 rows)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement