Columns
Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
comic_id | bpchar | 4 | √ | to_char(nextval('comic_id_seq'::regclass), '"#"FM000'::text) |
|
|
|||||||||||||||||||||||||||||
series_id | bpchar | 6 | null |
|
|
||||||||||||||||||||||||||||||
full_title | varchar | 128 | √ | null |
|
|
|||||||||||||||||||||||||||||
issue | numeric | 0 | √ | null |
|
|
|||||||||||||||||||||||||||||
cover | int4 | 10 | √ | 1 |
|
|
|||||||||||||||||||||||||||||
printing | int4 | 10 | √ | 1 |
|
|
|||||||||||||||||||||||||||||
type | varchar | 6 | 'ISSUE'::character varying |
|
|
||||||||||||||||||||||||||||||
release_date | date | 13 | null |
|
|
||||||||||||||||||||||||||||||
cover_price | numeric | 0 | null |
|
|
||||||||||||||||||||||||||||||
distribution | varchar | 9 | √ | null |
|
|
|||||||||||||||||||||||||||||
is_physical | bool | 1 | true |
|
|
||||||||||||||||||||||||||||||
upc | varchar | 18 | √ | null |
|
|
|||||||||||||||||||||||||||||
isbn | varchar | 13 | √ | null |
|
|
|||||||||||||||||||||||||||||
notes | text | 2147483647 | √ | null |
|
|
Indexes
Constraint Name | Type | Sort | Column(s) |
---|---|---|---|
comics_pkey | Primary key | Asc | comic_id |
Check Constraints
Constraint Name | Constraint |
---|---|
comics_upc_check | (((upc IS NULL) OR (char_length((upc)::text) = 15) OR (char_length((upc)::text) = 18))) |
comics_cover_price_check | ((cover_price >= 0.00)) |
comics_printing_check | ((printing > 0)) |
comics_comic_id_check | ((comic_id ~ '^#[0-9]{3}$'::text)) |
comics_issue_type_check | ((((issue IS NOT NULL) AND (((type)::text = 'ISSUE'::text) OR ((type)::text = 'ANNUAL'::text))) OR ((issue IS NULL) AND (((type)::text <> 'ISSUE'::text) AND ((type)::text <> 'ANNUAL'::text))))) |
comics_issue_check | ((issue >= (0)::numeric)) |
comics_printing_format_check | ((((printing IS NOT NULL) AND is_physical) OR ((printing IS NULL) AND (NOT is_physical)))) |
comics_distribution_check | (((distribution)::text = ANY ((ARRAY['DIRECT'::character varying, 'NEWSSTAND'::character varying])::text[]))) |
comics_isbn_check | (((isbn IS NULL) OR (char_length((isbn)::text) = 10) OR (char_length((isbn)::text) = 13))) |
comics_type_check | (((type)::text = ANY ((ARRAY['ISSUE'::character varying, 'ANNUAL'::character varying, 'TP'::character varying, 'HC'::character varying])::text[]))) |