Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| id | serial | 10 | √ | nextval('car_registration_id_seq'::regclass) |
|
|
Unique ID |
||||
| id_tenant | int4 | 10 | 1 |
|
|
Reference to the tenant |
|||||
| created_at | timestamp | 29,6 | now() |
|
|
Timestamp of creation |
|||||
| updated_at | timestamp | 29,6 | now() |
|
|
Timestamp of last update |
|||||
| id_creator | int4 | 10 | null |
|
|
Reference to the creator |
|||||
| id_updater | int4 | 10 | null |
|
|
Reference to the last updater |
|||||
| id_car | int4 | 10 | null |
|
|
Reference to the car |
|||||
| valid_from | timestamp | 29,6 | null |
|
|
Timestamp when the registration is valid from |
|||||
| valid_to | timestamp | 29,6 | √ | null |
|
|
Timestamp until the registration is valid to |
||||
| numberplate | text | 2147483647 | null |
|
|
The assigned numberplate in the periode (valid_from to valid_to) |
|||||
| note | text | 2147483647 | √ | null |
|
|
A note for this car registration |
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| pk_car_registration_id | Primary key | Asc | id |
| no_overlap_car_registration | Performance | Asc | id_car |
| u_car_registration_id_car_valid_from | Must be unique | Asc/Asc | id_car + valid_from |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| c_car_registration_to_after_from | ((valid_from < valid_to)) |