| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||
|---|---|---|---|---|---|---|---|---|---|---|
| ID | int8 | 19 | √ | null |
|
|
Stock transaction ID |
|||
| creator | int4 | 10 | √ | null |
|
|
Creator user ID (defaults to authenticated user on creation) |
|||
| creationdate | int8 | 19 | date_part('epoch'::text, now()) |
|
|
Creation date and time as a Unix time stamp (defaults to current date and time on creation) |
||||
| lastmodified | int8 | 19 | date_part('epoch'::text, now()) |
|
|
Last modification date and time as a Unix time stamp (auto-reset on modification) |
||||
| item | int4 | 10 | null |
|
|
Item ID (**dependency**) |
||||
| storage | int4 | 10 | √ | null |
|
|
Storage ID |
|||
| transaction | int4 | 10 | √ | null |
|
|
Transaction ID |
|||
| transfer | int8 | 19 | √ | null |
|
|
Transfer stock transaction ID; must be distinct from |
|||
| flag | int2 | 5 | 0 |
|
|
Flag ( |
||||
| date | int8 | 19 | date_part('epoch'::text, now()) |
|
|
Designated date and time as a Unix time stamp (defaults to current date and time on creation) |
||||
| chargenum | text | 2147483647 | ''::text |
|
|
Charge (lot) number |
||||
| location | text | 2147483647 | ''::text |
|
|
Physical location (e.g. shelf identification) |
||||
| reference | text | 2147483647 | ''::text |
|
|
Reference identification |
||||
| amount | float8 | 17,17 | null |
|
|
Amount (quantity); must not be zero (greater than zero if |
||||
| sellingprice | float8 | 17,17 | 0 |
|
|
Selling price per unit |
||||
| purchaseprice | float8 | 17,17 | 0 |
|
|
Purchase price per unit |
||||
| serials | _text | 2147483647 | √ | null |
|
|
Serial numbers |
|||
| subtransactions | _int8 | 19 | √ | null |
|
|
Sub-transaction IDs |
Table contained 0 rows
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| pk_stocktransactions | Primary key | Asc | ID |
| fk_stocktransactions_item | Performance | Asc | item |
| fk_stocktransactions_storage | Performance | Asc | storage |
| fk_stocktransactions_transaction | Performance | Asc | transaction |
| i_stocktransactions_date_ID | Performance | Desc/Desc | date + ID |
| i_stocktransactions_serials | Performance | Asc | serials |
| s_stocktransactions | Performance | Asc | chargenum |
| u_stocktransactions_transfer | Must be unique | Asc | transfer |

