Skip to content

Commit

Permalink
basic schema docs w/ relations. still need better trigger docs
Browse files Browse the repository at this point in the history
  • Loading branch information
eby committed Jun 5, 2024
1 parent 3b501c9 commit f579381
Show file tree
Hide file tree
Showing 1,273 changed files with 166,485 additions and 0 deletions.
1,381 changes: 1,381 additions & 0 deletions docs/schema/README.md

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions docs/schema/acq.acq_lineitem_history.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# acq.acq_lineitem_history

## Description

## Columns

| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| audit_id | bigint | | false | | | |
| audit_time | timestamp with time zone | | false | | | |
| audit_action | text | | false | | | |
| id | bigint | | false | | | |
| creator | integer | | false | | | |
| editor | integer | | false | | | |
| selector | integer | | false | | | |
| provider | integer | | true | | | |
| purchase_order | integer | | true | | | |
| picklist | integer | | true | | | |
| expected_recv_time | timestamp with time zone | | true | | | |
| create_time | timestamp with time zone | | false | | | |
| edit_time | timestamp with time zone | | false | | | |
| marc | text | | false | | | |
| eg_bib_id | bigint | | true | | | |
| source_label | text | | true | | | |
| state | text | | false | | | |
| cancel_reason | integer | | true | | | |
| estimated_unit_price | numeric | | true | | | |
| claim_policy | integer | | true | | | |
| queued_record | bigint | | true | | | |

## Constraints

| Name | Type | Definition |
| ---- | ---- | ---------- |
| acq_lineitem_history_pkey | PRIMARY KEY | PRIMARY KEY (audit_id) |

## Indexes

| Name | Definition |
| ---- | ---------- |
| acq_lineitem_history_pkey | CREATE UNIQUE INDEX acq_lineitem_history_pkey ON acq.acq_lineitem_history USING btree (audit_id) |
| acq_lineitem_hist_id_idx | CREATE INDEX acq_lineitem_hist_id_idx ON acq.acq_lineitem_history USING btree (id) |
| acq_lineitem_history_queued_record_idx | CREATE INDEX acq_lineitem_history_queued_record_idx ON acq.acq_lineitem_history USING btree (queued_record) |

## Relations

![er](acq.acq_lineitem_history.svg)

---

> Generated by [tbls](https://github.com/k1LoW/tbls)
86 changes: 86 additions & 0 deletions docs/schema/acq.acq_lineitem_history.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
99 changes: 99 additions & 0 deletions docs/schema/acq.acq_lineitem_lifecycle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# acq.acq_lineitem_lifecycle

## Description

<details>
<summary><strong>Table Definition</strong></summary>

```sql
CREATE VIEW acq_lineitem_lifecycle AS (
SELECT '-1'::integer AS int4,
now() AS audit_time,
'-'::text AS audit_action,
lineitem.id,
lineitem.creator,
lineitem.editor,
lineitem.selector,
lineitem.provider,
lineitem.purchase_order,
lineitem.picklist,
lineitem.expected_recv_time,
lineitem.create_time,
lineitem.edit_time,
lineitem.marc,
lineitem.eg_bib_id,
lineitem.source_label,
lineitem.state,
lineitem.cancel_reason,
lineitem.estimated_unit_price,
lineitem.claim_policy,
lineitem.queued_record
FROM acq.lineitem
UNION ALL
SELECT acq_lineitem_history.audit_id AS int4,
acq_lineitem_history.audit_time,
acq_lineitem_history.audit_action,
acq_lineitem_history.id,
acq_lineitem_history.creator,
acq_lineitem_history.editor,
acq_lineitem_history.selector,
acq_lineitem_history.provider,
acq_lineitem_history.purchase_order,
acq_lineitem_history.picklist,
acq_lineitem_history.expected_recv_time,
acq_lineitem_history.create_time,
acq_lineitem_history.edit_time,
acq_lineitem_history.marc,
acq_lineitem_history.eg_bib_id,
acq_lineitem_history.source_label,
acq_lineitem_history.state,
acq_lineitem_history.cancel_reason,
acq_lineitem_history.estimated_unit_price,
acq_lineitem_history.claim_policy,
acq_lineitem_history.queued_record
FROM acq.acq_lineitem_history
)
```

</details>

## Columns

| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| int4 | bigint | | true | | | |
| audit_time | timestamp with time zone | | true | | | |
| audit_action | text | | true | | | |
| id | bigint | | true | | | |
| creator | integer | | true | | | |
| editor | integer | | true | | | |
| selector | integer | | true | | | |
| provider | integer | | true | | | |
| purchase_order | integer | | true | | | |
| picklist | integer | | true | | | |
| expected_recv_time | timestamp with time zone | | true | | | |
| create_time | timestamp with time zone | | true | | | |
| edit_time | timestamp with time zone | | true | | | |
| marc | text | | true | | | |
| eg_bib_id | bigint | | true | | | |
| source_label | text | | true | | | |
| state | text | | true | | | |
| cancel_reason | integer | | true | | | |
| estimated_unit_price | numeric | | true | | | |
| claim_policy | integer | | true | | | |
| queued_record | bigint | | true | | | |

## Referenced Tables

| Name | Columns | Comment | Type |
| ---- | ------- | ------- | ---- |
| [acq.lineitem](acq.lineitem.md) | 18 | | BASE TABLE |
| [acq.acq_lineitem_history](acq.acq_lineitem_history.md) | 21 | | BASE TABLE |

## Relations

![er](acq.acq_lineitem_lifecycle.svg)

---

> Generated by [tbls](https://github.com/k1LoW/tbls)
Loading

0 comments on commit f579381

Please sign in to comment.