Shopware 6.6.4.1 order
Core order records — contains order state, totals, currency, billing address reference, and campaign tracking.
| Column | Type | Nullable | Additional |
| id | binary(16) | NO | Primary Key |
| version_id | binary(16) | NO | Primary Key |
| state_id | binary(16) | NO | Index |
| auto_increment | bigint unsigned | NO | Unique, auto_increment |
| order_number | varchar(64) | YES | Index |
| currency_id | binary(16) | NO | Index
Foreign Key → currency.id |
| language_id | binary(16) | NO | Index
Foreign Key → language.id |
| currency_factor | double | YES | |
| sales_channel_id | binary(16) | NO | Index
Foreign Key → sales_channel.id |
| billing_address_id | binary(16) | NO | |
| billing_address_version_id | binary(16) | NO | |
| price | json | NO | |
| order_date_time | datetime(3) | NO | |
| order_date | date | YES | Index, STORED GENERATED |
| amount_total | double | YES | VIRTUAL GENERATED |
| amount_net | double | YES | VIRTUAL GENERATED |
| position_price | double | YES | VIRTUAL GENERATED |
| tax_status | varchar(255) | YES | VIRTUAL GENERATED |
| shipping_costs | json | NO | |
| shipping_total | double | YES | VIRTUAL GENERATED |
| deep_link_code | varchar(32) | YES | Index |
| custom_fields | json | YES | |
| affiliate_code | varchar(255) | YES | |
| campaign_code | varchar(255) | YES | |
| customer_comment | longtext | YES | |
| created_at | datetime(3) | NO | |
| updated_at | datetime(3) | YES | |
| item_rounding | json | YES | |
| total_rounding | json | YES | |
| rule_ids | json | YES | |
| created_by_id | binary(16) | YES | Index
Foreign Key → user.id |
| updated_by_id | binary(16) | YES | Index
Foreign Key → user.id |
| source | varchar(255) | YES | |
| Index Name | Columns | Unique |
| fk.language_id | language_id | No |
| fk.order.created_by_id | created_by_id | No |
| fk.order.currency_id | currency_id | No |
| fk.order.sales_channel_id | sales_channel_id | No |
| fk.order.updated_by_id | updated_by_id | No |
| idx.order_date_currency_id | order_date,currency_id | No |
| idx.order_number | order_number | No |
| idx.state_index | state_id | No |
| PRIMARY | id,version_id | Yes |
| uniq.auto_increment | auto_increment | Yes |
| uniq.deep_link_code | deep_link_code,version_id | Yes |
Relations (from this table)
5 relations
Relations (to this table)
14 relations