Magento2 core

Magento2 erd

Tables (62)

admin_passwords

  • password_id — int(10) — Primary key — NOT NULL — Password Id
  • user_id — int(10) — Foreign key → admin_user.user_id — NOT NULL — User Id
  • password_hash — varchar(100) — Password Hash
  • expires — int(10) — NOT NULL — Expires
  • last_updated — int(10) — NOT NULL — Last Updated

admin_system_messages

  • identity — varchar(100) — Primary key — NOT NULL — Message id
  • severity — smallint(5) — NOT NULL — Problem type
  • created_at — timestamp — NOT NULL — Create date

admin_user

  • user_id — int(10) — Primary key — NOT NULL — User ID
  • firstname — varchar(32) — User First Name
  • lastname — varchar(32) — User Last Name
  • email — varchar(128) — User Email
  • username — varchar(40) — User Login
  • password — varchar(255) — NOT NULL — User Password
  • created — timestamp — NOT NULL — User Created Time
  • modified — timestamp — NOT NULL — User Modified Time
  • logdate — timestamp — User Last Login Time
  • lognum — smallint(5) — NOT NULL — User Login Number
  • reload_acl_flag — smallint(6) — NOT NULL — Reload ACL
  • is_active — smallint(6) — NOT NULL — User Is Active
  • extra — text — User Extra Data
  • rp_token — text — Reset Password Link Token
  • rp_token_created_at — timestamp — Reset Password Link Token Creation Date
  • interface_locale — varchar(16) — NOT NULL — Backend interface locale
  • failures_num — smallint(6) — Failure Number
  • first_failure — timestamp — First Failure
  • lock_expires — timestamp — Expiration Lock Dates

admin_user_session

  • id — int(10) — Primary key — NOT NULL — Entity ID
  • session_id — varchar(128) — NOT NULL — Session id value
  • user_id — int(10) — Foreign key → admin_user.user_id — Admin User ID
  • status — smallint(5) — NOT NULL — Current Session status
  • created_at — timestamp — NOT NULL — Created Time
  • updated_at — timestamp — NOT NULL — Update Time
  • ip — varchar(15) — NOT NULL — Remote user IP

adminnotification_inbox

  • notification_id — int(10) — Primary key — NOT NULL — Notification id
  • severity — smallint(5) — NOT NULL — Problem type
  • date_added — timestamp — NOT NULL — Create date
  • title — varchar(255) — NOT NULL — Title
  • description — text — Description
  • url — varchar(255) — Url
  • is_read — smallint(5) — NOT NULL — Flag if notification read
  • is_remove — smallint(5) — NOT NULL — Flag if notification might be removed

authorization_role

  • role_id — int(10) — Primary key — NOT NULL — Role ID
  • parent_id — int(10) — NOT NULL — Parent Role ID
  • tree_level — smallint(5) — NOT NULL — Role Tree Level
  • sort_order — smallint(5) — NOT NULL — Role Sort Order
  • role_type — varchar(1) — NOT NULL — Role Type
  • user_id — int(10) — NOT NULL — User ID
  • user_type — varchar(16) — User Type
  • role_name — varchar(50) — Role Name

authorization_rule

  • rule_id — int(10) — Primary key — NOT NULL — Rule ID
  • role_id — int(10) — Foreign key → authorization_role.role_id — NOT NULL — Role ID
  • resource_id — varchar(255) — Resource ID
  • privileges — varchar(20) — Privileges
  • permission — varchar(10) — Permission

cache

  • id — varchar(200) — Primary key — NOT NULL — Cache Id
  • data — mediumblob — Cache Data
  • create_time — int(11) — Cache Creation Time
  • update_time — int(11) — Time of Cache Updating
  • expire_time — int(11) — Cache Expiration Time

cache_tag

  • tag — varchar(100) — Primary key — NOT NULL — Tag
  • cache_id — varchar(200) — Primary key — NOT NULL — Cache Id

captcha_log

  • type — varchar(32) — Primary key — NOT NULL — Type
  • value — varchar(32) — Primary key — NOT NULL — Value
  • count — int(10) — NOT NULL — Count
  • updated_at — timestamp — Update Time

catalog_product_entity

  • entity_id — int(10) — Primary key — NOT NULL — Entity ID

cms_block

  • block_id — smallint(6) — Primary key — NOT NULL — Block ID
  • title — varchar(255) — NOT NULL — Block Title
  • identifier — varchar(255) — NOT NULL — Block String Identifier
  • content — mediumtext — Block Content
  • creation_time — timestamp — NOT NULL — Block Creation Time
  • update_time — timestamp — NOT NULL — Block Modification Time
  • is_active — smallint(6) — NOT NULL — Is Block Active
  • FULLTEXT — KEY

cms_block_store

  • block_id — smallint(6) — Foreign key → cms_block.block_id — NOT NULL — Block ID
  • store_id — smallint(5) — Foreign key → store.store_id — NOT NULL — Store ID

cms_page

  • page_id — smallint(6) — Primary key — NOT NULL — Page ID
  • title — varchar(255) — Page Title
  • page_layout — varchar(255) — Page Layout
  • meta_keywords — text — Page Meta Keywords
  • meta_description — text — Page Meta Description
  • identifier — varchar(100) — Page String Identifier
  • content_heading — varchar(255) — Page Content Heading
  • content — mediumtext — Page Content
  • creation_time — timestamp — NOT NULL — Page Creation Time
  • update_time — timestamp — NOT NULL — Page Modification Time
  • is_active — smallint(6) — NOT NULL — Is Page Active
  • sort_order — smallint(6) — NOT NULL — Page Sort Order
  • layout_update_xml — text — Page Layout Update Content
  • custom_theme — varchar(100) — Page Custom Theme
  • custom_root_template — varchar(255) — Page Custom Template
  • custom_layout_update_xml — text — Page Custom Layout Update Content
  • custom_theme_from — date — Page Custom Theme Active From Date
  • custom_theme_to — date — Page Custom Theme Active To Date
  • meta_title — varchar(255) — Page Meta Title
  • FULLTEXT — KEY

cms_page_store

  • page_id — smallint(6) — Foreign key → cms_page.page_id — NOT NULL — Page ID
  • store_id — smallint(5) — Foreign key → store.store_id — NOT NULL — Store ID

core_config_data

  • config_id — int(10) — Primary key — NOT NULL — Config Id
  • scope — varchar(8) — NOT NULL — Config Scope
  • scope_id — int(11) — NOT NULL — Config Scope Id
  • path — varchar(255) — NOT NULL — Config Path
  • value — text — Config Value

cron_schedule

  • schedule_id — int(10) — Primary key — NOT NULL — Schedule Id
  • job_code — varchar(255) — NOT NULL — Job Code
  • status — varchar(7) — NOT NULL — Status
  • messages — text — Messages
  • created_at — timestamp — NOT NULL — Created At
  • scheduled_at — timestamp — Scheduled At
  • executed_at — timestamp — Executed At
  • finished_at — timestamp — Finished At

customer_entity

  • entity_id — int(10) — Primary key — NOT NULL — Entity Id

design_change

  • design_change_id — int(11) — Primary key — NOT NULL — Design Change Id
  • store_id — smallint(5) — Foreign key → store.store_id — NOT NULL — Store Id
  • design — varchar(255) — Design
  • date_from — date — First Date of Design Activity
  • date_to — date — Last Date of Design Activity

design_config_grid_flat

  • entity_id — int(10) — Primary key — NOT NULL — Entity ID
  • store_website_id — int(11) — Store_website_id
  • store_group_id — int(11) — Store_group_id
  • store_id — int(11) — Store_id
  • theme_theme_id — varchar(255) — Theme_theme_id
  • FULLTEXT — KEY

directory_country

  • country_id — varchar(2) — Primary key — NOT NULL — Country Id in ISO-2
  • iso2_code — varchar(2) — Country ISO-2 format
  • iso3_code — varchar(3) — Country ISO-3

directory_country_format

  • country_format_id — int(10) — Primary key — NOT NULL — Country Format Id
  • country_id — varchar(2) — Country Id in ISO-2
  • type — varchar(30) — Country Format Type
  • format — text — NOT NULL — Country Format

directory_country_region

  • region_id — int(10) — Primary key — NOT NULL — Region Id
  • country_id — varchar(4) — NOT NULL — Country Id in ISO-2
  • code — varchar(32) — Region code
  • default_name — varchar(255) — Region Name

directory_country_region_name

  • locale — varchar(8) — Primary key — NOT NULL — Locale
  • region_id — int(10) — Foreign key → directory_country_region.region_id — NOT NULL — Region Id
  • name — varchar(255) — Region Name

directory_currency_rate

  • currency_from — varchar(3) — Primary key — NOT NULL — Currency Code Convert From
  • currency_to — varchar(3) — Primary key — NOT NULL — Currency Code Convert To
  • rate — decimal(24,12) — NOT NULL — Currency Conversion Rate

email_template

  • template_id — int(10) — Primary key — NOT NULL — Template ID
  • template_code — varchar(150) — NOT NULL — Template Name
  • template_text — text — NOT NULL — Template Content
  • template_styles — text — Templste Styles
  • template_type — int(10) — Template Type
  • template_subject — varchar(200) — NOT NULL — Template Subject
  • template_sender_name — varchar(200) — Template Sender Name
  • template_sender_email — varchar(200) — Template Sender Email
  • added_at — timestamp — NOT NULL — Date of Template Creation
  • modified_at — timestamp — NOT NULL — Date of Template Modification
  • orig_template_code — varchar(200) — Original Template Code
  • orig_template_variables — text — Original Template Variables

flag

  • flag_id — int(10) — Primary key — NOT NULL — Flag Id
  • flag_code — varchar(255) — NOT NULL — Flag Code
  • state — smallint(5) — NOT NULL — Flag State
  • flag_data — text — Flag Data
  • last_update — timestamp — NOT NULL — Date of Last Flag Update

googleoptimizer_code

  • code_id — int(10) — Primary key — NOT NULL — Google experiment code id
  • store_id — smallint(5) — Foreign key → store.store_id — NOT NULL — Store id
  • entity_id — int(10) — NOT NULL — Optimized entity id product id or catalog id
  • entity_type — varchar(50) — Optimized entity type
  • experiment_script — text — Google experiment script

import_history

  • history_id — int(10) — Primary key — NOT NULL — History record Id
  • started_at — timestamp — NOT NULL — Started at
  • user_id — int(10) — NOT NULL — User ID
  • imported_file — varchar(255) — Imported file
  • execution_time — varchar(255) — Execution time
  • summary — varchar(255) — Summary
  • error_file — varchar(255) — NOT NULL — Imported file with errors

importexport_importdata

  • id — int(10) — Primary key — NOT NULL — Id
  • entity — varchar(50) — NOT NULL — Entity
  • behavior — varchar(10) — NOT NULL — Behavior
  • data — longtext — Data

indexer_state

  • state_id — int(10) — Primary key — NOT NULL — Indexer State Id
  • indexer_id — varchar(255) — Indexer Id
  • status — varchar(16) — Indexer Status
  • updated — datetime — Indexer Status
  • hash_config — varchar(32) — NOT NULL — Hash of indexer config
  • table_suffix — varchar(255) — NOT NULL — Suffix for indexer table used for read operations

layout_link

  • layout_link_id — int(10) — Primary key — NOT NULL — Link Id
  • layout_update_id — int(10) — Foreign key → layout_update.layout_update_id — NOT NULL — Layout Update Id
  • store_id — smallint(5) — Foreign key → store.store_id — NOT NULL — Store Id
  • theme_id — int(10) — Foreign key → theme.theme_id — NOT NULL — Theme id
  • is_temporary — tinyint(1) — NOT NULL — Defines whether Layout Update is Temporary

layout_update

  • layout_update_id — int(10) — Primary key — NOT NULL — Layout Update Id
  • handle — varchar(255) — Handle
  • xml — text — Xml
  • sort_order — smallint(6) — NOT NULL — Sort Order
  • updated_at — timestamp — Last Update Timestamp

mview_state

  • state_id — int(10) — Primary key — NOT NULL — View State Id
  • view_id — varchar(255) — View Id
  • mode — varchar(16) — View Mode
  • status — varchar(16) — View Status
  • updated — datetime — View updated time
  • version_id — int(10) — View Version Id

oauth_consumer

  • entity_id — int(10) — Primary key — NOT NULL — Entity Id
  • created_at — timestamp — NOT NULL — Created At
  • updated_at — timestamp — Updated At
  • name — varchar(255) — NOT NULL — Name of consumer
  • key — varchar(32) — NOT NULL — Key code
  • secret — varchar(32) — NOT NULL — Secret code
  • callback_url — text — Callback URL
  • rejected_callback_url — text — NOT NULL — Rejected callback URL

oauth_nonce

  • consumer_id — int(10) — Foreign key → oauth_consumer.entity_id — NOT NULL — Consumer ID
  • nonce — varchar(32) — NOT NULL — Nonce String
  • timestamp — int(10) — NOT NULL — Nonce Timestamp

oauth_token

  • entity_id — int(10) — Primary key — NOT NULL — Entity ID
  • consumer_id — int(10) — Foreign key → oauth_consumer.entity_id — Oauth Consumer ID
  • admin_id — int(10) — Foreign key → admin_user.user_id — Admin user ID
  • customer_id — int(10) — Foreign key → customer_entity.entity_id — Customer user ID
  • type — varchar(16) — NOT NULL — Token Type
  • token — varchar(32) — NOT NULL — Token
  • secret — varchar(32) — NOT NULL — Token Secret
  • verifier — varchar(32) — Token Verifier
  • callback_url — text — NOT NULL — Token Callback URL
  • revoked — smallint(5) — NOT NULL — Is Token revoked
  • authorized — smallint(5) — NOT NULL — Is Token authorized
  • user_type — int(11) — User type
  • created_at — timestamp — NOT NULL — Token creation timestamp

oauth_token_request_log

  • log_id — int(10) — Primary key — NOT NULL — Log Id
  • user_name — varchar(255) — NOT NULL — Customer email or admin login
  • user_type — smallint(5) — NOT NULL — User type (admin or customer)
  • failures_count — smallint(5) — Number of failed authentication attempts in a row
  • lock_expires_at — timestamp — NOT NULL — Lock expiration time

password_reset_request_event

  • id — int(10) — Primary key — NOT NULL — Entity ID
  • request_type — smallint(5) — NOT NULL — Type of the event under a security control
  • account_reference — varchar(255) — An identifier for existing account or another target
  • created_at — timestamp — NOT NULL — Timestamp when the event occurs
  • ip — varchar(15) — NOT NULL — Remote user IP

search_query

  • query_id — int(10) — Primary key — NOT NULL — Query ID
  • store_id — smallint(5) — Foreign key → store.store_id — NOT NULL — Store ID
  • query_text — varchar(255) — Query text
  • num_results — int(10) — NOT NULL — Num results
  • popularity — int(10) — NOT NULL — Popularity
  • redirect — varchar(255) — Redirect
  • display_in_terms — smallint(6) — NOT NULL — Display in terms
  • is_active — smallint(6) — Active status
  • is_processed — smallint(6) — Processed status
  • updated_at — timestamp — NOT NULL — Updated at

search_synonyms

  • group_id — bigint(20) — Primary key — NOT NULL — Synonyms Group Id
  • store_id — smallint(5) — Foreign key → store.store_id — NOT NULL — Store Id - identifies the store view these synonyms belong to
  • website_id — smallint(5) — Foreign key → store_website.website_id — NOT NULL — Website Id - identifies the website id these synonyms belong to
  • synonyms — text — NOT NULL — list of synonyms making up this group
  • FULLTEXT — KEY

sendfriend_log

  • log_id — int(10) — Primary key — NOT NULL — Log ID
  • ip — bigint(20) — NOT NULL — Customer IP address
  • time — int(10) — NOT NULL — Log time
  • website_id — smallint(5) — NOT NULL — Website ID

session

  • session_id — varchar(255) — Primary key — NOT NULL — Session Id
  • session_expires — int(10) — NOT NULL — Date of Session Expiration
  • session_data — mediumblob — NOT NULL — Session Data

setup_module

  • module — varchar(50) — Primary key — NOT NULL — Module
  • schema_version — varchar(50) — Schema Version
  • data_version — varchar(50) — Data Version

sitemap

  • sitemap_id — int(10) — Primary key — NOT NULL — Sitemap Id
  • store_id — smallint(5) — Foreign key → store.store_id — NOT NULL — Store id
  • sitemap_type — varchar(32) — Sitemap Type
  • sitemap_filename — varchar(32) — Sitemap Filename
  • sitemap_path — varchar(255) — Sitemap Path
  • sitemap_time — timestamp — Sitemap Time

store

  • store_id — smallint(5) — Primary key — NOT NULL — Store Id
  • group_id — smallint(5) — Foreign key → store_group.group_id — NOT NULL — Group Id
  • website_id — smallint(5) — Foreign key → store_website.website_id — NOT NULL — Website Id
  • code — varchar(32) — Code
  • name — varchar(255) — NOT NULL — Store Name
  • sort_order — smallint(5) — NOT NULL — Store Sort Order
  • is_active — smallint(5) — NOT NULL — Store Activity

store_group

  • group_id — smallint(5) — Primary key — NOT NULL — Group Id
  • website_id — smallint(5) — Foreign key → store_website.website_id — NOT NULL — Website Id
  • code — varchar(32) — Store group unique code
  • name — varchar(255) — NOT NULL — Store Group Name
  • root_category_id — int(10) — NOT NULL — Root Category Id
  • default_store_id — smallint(5) — NOT NULL — Default Store Id

store_website

  • website_id — smallint(5) — Primary key — NOT NULL — Website Id
  • code — varchar(32) — Code
  • name — varchar(64) — Website Name
  • sort_order — smallint(5) — NOT NULL — Sort Order
  • default_group_id — smallint(5) — NOT NULL — Default Group Id
  • is_default — smallint(5) — Defines Is Website Default

theme

  • theme_id — int(10) — Primary key — NOT NULL — Theme identifier
  • parent_id — int(11) — Parent Id
  • theme_path — varchar(255) — Theme Path
  • theme_title — varchar(255) — NOT NULL — Theme Title
  • preview_image — varchar(255) — Preview Image
  • is_featured — tinyint(1) — NOT NULL — Is Theme Featured
  • area — varchar(255) — NOT NULL — Theme Area
  • type — smallint(6) — NOT NULL — Theme type: 0:physical, 1:virtual, 2:staging
  • code — text — Full theme code, including package

theme_file

  • theme_files_id — int(10) — Primary key — NOT NULL — Theme files identifier
  • theme_id — int(10) — Foreign key → theme.theme_id — NOT NULL — Theme Id
  • file_path — varchar(255) — Relative path to file
  • file_type — varchar(32) — NOT NULL — File Type
  • content — longtext — NOT NULL — File Content
  • sort_order — smallint(6) — NOT NULL — Sort Order
  • is_temporary — tinyint(1) — NOT NULL — Is Temporary File

translation

  • key_id — int(10) — Primary key — NOT NULL — Key Id of Translation
  • store_id — smallint(5) — Foreign key → store.store_id — NOT NULL — Store Id
  • string — varchar(255) — NOT NULL — Translation String
  • translate — varchar(255) — Translate
  • locale — varchar(20) — NOT NULL — Locale
  • crc_string — bigint(20) — NOT NULL — Translation String CRC32 Hash

ui_bookmark

  • bookmark_id — int(10) — Primary key — NOT NULL — Bookmark identifier
  • user_id — int(10) — Foreign key → admin_user.user_id — NOT NULL — User Id
  • namespace — varchar(255) — NOT NULL — Bookmark namespace
  • identifier — varchar(255) — NOT NULL — Bookmark Identifier
  • current — smallint(6) — NOT NULL — Mark current bookmark per user and identifier
  • title — varchar(255) — Bookmark title
  • config — longtext — Bookmark config
  • created_at — datetime — NOT NULL — Bookmark created at
  • updated_at — datetime — NOT NULL — Bookmark updated at

url_rewrite

  • url_rewrite_id — int(10) — Primary key — NOT NULL — Rewrite Id
  • entity_type — varchar(32) — NOT NULL — Entity type code
  • entity_id — int(10) — NOT NULL — Entity ID
  • request_path — varchar(255) — Request Path
  • target_path — varchar(255) — Target Path
  • redirect_type — smallint(5) — NOT NULL — Redirect Type
  • store_id — smallint(5) — NOT NULL — Store Id
  • description — varchar(255) — Description
  • is_autogenerated — smallint(5) — NOT NULL — Is rewrite generated automatically flag
  • metadata — varchar(255) — Meta data for url rewrite

variable

  • variable_id — int(10) — Primary key — NOT NULL — Variable Id
  • code — varchar(255) — Variable Code
  • name — varchar(255) — Variable Name

variable_value

  • value_id — int(10) — Primary key — NOT NULL — Variable Value Id
  • store_id — smallint(5) — Foreign key → store.store_id — NOT NULL — Store Id
  • variable_id — int(10) — Foreign key → variable.variable_id — NOT NULL — Variable Id
  • plain_value — text — Plain Text Value
  • html_value — text — Html Value

widget

  • widget_id — int(10) — Primary key — NOT NULL — Widget Id
  • widget_code — varchar(255) — Widget code for template directive
  • widget_type — varchar(255) — Widget Type
  • parameters — text — Parameters

widget_instance

  • instance_id — int(10) — Primary key — NOT NULL — Instance Id
  • theme_id — int(10) — Foreign key → theme.theme_id — NOT NULL — Theme id
  • instance_type — varchar(255) — Instance Type
  • title — varchar(255) — Widget Title
  • store_ids — varchar(255) — NOT NULL — Store ids
  • widget_parameters — text — Widget parameters
  • sort_order — smallint(5) — NOT NULL — Sort order

widget_instance_page

  • page_id — int(10) — Primary key — NOT NULL — Page Id
  • instance_id — int(10) — Foreign key → widget_instance.instance_id — NOT NULL — Instance Id
  • page_group — varchar(25) — Block Group Type
  • layout_handle — varchar(255) — Layout Handle
  • block_reference — varchar(255) — Container
  • page_for — varchar(25) — For instance entities
  • entities — text — Catalog entities (comma separated)
  • page_template — varchar(255) — Path to widget template

widget_instance_page_layout

  • page_id — int(10) — Foreign key → widget_instance_page.page_id — NOT NULL — Page Id
  • layout_update_id — int(10) — Foreign key → layout_update.layout_update_id — NOT NULL — Layout Update Id

wishlist

  • wishlist_id — int(10) — Primary key — NOT NULL — Wishlist ID
  • customer_id — int(10) — Foreign key → customer_entity.entity_id — NOT NULL — Customer ID
  • shared — smallint(5) — NOT NULL — Sharing flag (0 or 1)
  • sharing_code — varchar(32) — Sharing encrypted code
  • updated_at — timestamp — Last updated date

wishlist_item

  • wishlist_item_id — int(10) — Primary key — NOT NULL — Wishlist item ID
  • product_id — int(10) — Foreign key → catalog_product_entity.entity_id — NOT NULL — Product ID
  • wishlist_id — int(10) — Foreign key → wishlist.wishlist_id — NOT NULL — Wishlist ID
  • store_id — smallint(5) — Foreign key → store.store_id — Store ID
  • added_at — timestamp — Add date and time
  • description — text — Short description of wish list item
  • qty — decimal(12,4) — NOT NULL — Qty

wishlist_item_option

  • option_id — int(10) — Primary key — NOT NULL — Option Id
  • wishlist_item_id — int(10) — Foreign key → wishlist_item.wishlist_item_id — NOT NULL — Wishlist Item Id
  • product_id — int(10) — NOT NULL — Product Id
  • code — varchar(255) — NOT NULL — Code
  • value — text — Value