Skip to main content

Database Schema Reference: J2Store to J2Commerce

This document is a complete database schema reference for extension developers migrating code from J2Store v4 to J2Commerce 6. Every table name, column name, type, and default documented here was verified directly against the install SQL files of both products — no columns or tables are assumed.

Source of truth: administrator/components/com_j2commerce/sql/install.mysql.utf8.sql

Comparison base: administrator/components/com_j2store/sql/install/mysql/install.j2store.sql


Overview

J2Commerce 6 is a rewrite of J2Store v4 targeting native Joomla 6 MVC. The database was redesigned alongside the codebase. Most changes fall into three categories:

  1. Prefix rename — every table and its primary key column use j2commerce_ instead of j2store_.
  2. Joomla 6 audit columns — tables that represent managed entities gained the standard Joomla access-control and audit column set.
  3. New functionality — columns and tables that support features not present in J2Store v4.
  4. Removed tables — a small number of J2Store tables were eliminated in favour of Joomla 6 native patterns (e.g., #__j2store_configurations#__extensions.params).

Apply the universal rules first (section 2), then check the Removed Tables section, then section 4 for per-table differences. If a table you rely on is not listed in either section, only the universal prefix rules apply.


Universal Naming Changes

These rules apply to every table and every query.

Table prefix

J2StoreJ2Commerce
#__j2store_*#__j2commerce_*

Primary key column naming

J2Store used j2store_{entity}_id. J2Commerce uses j2commerce_{entity}_id.

J2Store exampleJ2Commerce equivalent
j2store_order_idj2commerce_order_id
j2store_product_idj2commerce_product_id
j2store_orderitem_idj2commerce_orderitem_id
j2store_country_idj2commerce_country_id

enabled column type

J2Store used int(11) for enabled. J2Commerce uses tinyint with NOT NULL DEFAULT 0 or NOT NULL DEFAULT 1 as appropriate.

Character set

J2Store tables used CHARSET=utf8. J2Commerce tables use CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci.

MySQL 8 integer display widths

All MySQL integer display widths (int(11), tinyint(4), bigint(20)) are removed throughout J2Commerce. MySQL 8 ignores display widths for integer types — this is cosmetic cleanup only with no semantic effect. Per-table sections below do not list these changes.

Before/after PHP query example

// J2Store v4
$query = $db->getQuery(true)
->select('j2store_order_id, order_total, order_state_id')
->from('#__j2store_orders')
->where('user_id = :uid')
->bind(':uid', $userId, ParameterType::INTEGER);

// J2Commerce 6
$query = $db->getQuery(true)
->select('j2commerce_order_id, order_total, order_state_id')
->from('#__j2commerce_orders')
->where('user_id = :uid')
->bind(':uid', $userId, ParameterType::INTEGER);

New Tables in J2Commerce 6

These tables have no equivalent in J2Store v4.

#__j2commerce_emailtype_tags

Stores the available template tag definitions for each email type. Extensions can register their own tags via this table.

ColumnTypeNullableNotes
j2commerce_emailtype_tag_idintNOT NULLAuto-increment PK
email_typevarchar(255)NOT NULLe.g., transactional
tag_namevarchar(100)NOT NULLe.g., ORDER_ID
tag_labelvarchar(255)NOT NULLLanguage key
tag_descriptiontextNULL
tag_groupvarchar(100)NULLDefault: general
orderingintNOT NULLDefault: 0

#__j2commerce_emailtype_contexts

Defines named sending contexts for each email type (e.g., order_confirmed, order_shipped). Extensions that add their own email types must register their contexts here.

ColumnTypeNullableNotes
j2commerce_emailtype_context_idintNOT NULLAuto-increment PK
email_typevarchar(255)NOT NULL
contextvarchar(100)NOT NULLe.g., order_confirmed
labelvarchar(255)NOT NULLLanguage key
descriptiontextNULL
orderingintNOT NULLDefault: 0

Unique constraint on (email_type, context).

#__j2commerce_geocode_cache

Caches latitude/longitude results from geocoding API calls, keyed by a 32-character MD5 hash of the address string.

ColumnTypeNullableNotes
idint unsignedNOT NULLAuto-increment PK
address_hashchar(32)NOT NULLMD5 of normalized address — unique
address_textvarchar(500)NOT NULLDefault: ''. Original address string
latitudedecimal(10,7)NOT NULL
longitudedecimal(10,7)NOT NULL
createddatetimeNOT NULLDefault: CURRENT_TIMESTAMP

#__j2commerce_orderfees

Stores line-item fees attached to an order (separate from shipping or discounts). J2Store stored these as a single aggregate field in orders.order_surcharge.

ColumnTypeNullableNotes
j2commerce_orderfee_idint unsignedNOT NULLAuto-increment PK
order_idvarchar(255)NOT NULLFK to orders.order_id
namevarchar(255)NOT NULLDefault: ''
amountdecimal(15,5)NOT NULLDefault: 0.00000
tax_class_idintNOT NULLDefault: 0
taxableintNOT NULLDefault: 0
taxdecimal(15,5)NOT NULLDefault: 0.00000
tax_datatextNULLJSON breakdown
fee_typevarchar(255)NOT NULLDefault: ''

#__j2commerce_paymentprofiles

Stores saved payment tokens for recurring billing and saved-card checkout.

ColumnTypeNullableNotes
idint unsignedNOT NULLAuto-increment PK
user_idintNOT NULL
providervarchar(50)NOT NULLDefault: authorizenet
customer_profile_idvarchar(50)NOT NULLGateway customer ID
payment_tokenvarchar(100)NOT NULLDefault: ''
token_labelvarchar(100)NOT NULLDefault: ''. Displayed to customer
is_renewal_defaulttinyint unsignedNOT NULLDefault: 0
environmentvarchar(10)NOT NULLDefault: production
is_defaulttinyint unsignedNOT NULLDefault: 0
created_atdatetimeNOT NULLDefault: CURRENT_TIMESTAMP
updated_atdatetimeNOT NULLON UPDATE CURRENT_TIMESTAMP

Unique constraint on (user_id, provider, environment, payment_token).

#__j2commerce_queue_logs

Per-run execution log for queue batch processing jobs.

ColumnTypeNullableNotes
j2commerce_queue_log_idint unsignedNOT NULLAuto-increment PK
queue_typevarchar(100)NOT NULL
task_idint unsignedNULLJoomla scheduler task ID
started_atdatetimeNOT NULL
finished_atdatetimeNULL
duration_msint unsignedNULLExecution time in milliseconds
items_totalsmallint unsignedNOT NULLDefault: 0
items_successsmallint unsignedNOT NULLDefault: 0
items_failedsmallint unsignedNOT NULLDefault: 0
items_skippedsmallint unsignedNOT NULLDefault: 0
statusvarchar(20)NOT NULLrunning, completed, error
error_messagetextNULL
detailsmediumtextNULLJSON per-item results
created_ondatetimeNOT NULLDefault: CURRENT_TIMESTAMP

Removed Tables

These J2Store tables have no equivalent in J2Commerce. Any extension that reads or writes them must be updated.

#__j2store_configurations

J2Commerce does not have a #__j2commerce_configurations table. Component settings are stored in the standard Joomla #__extensions table, in the params column of the com_j2commerce extension row — the same pattern used by all native Joomla 6 components.

Before (J2Store):

// Reading a setting from the j2store_configurations table
$db = Factory::getDbo();
$query = $db->getQuery(true)
->select('config_meta_value')
->from('#__j2store_configurations')
->where('config_meta_key = :key')
->bind(':key', $key);
$db->setQuery($query);
$value = $db->loadResult();

After (J2Commerce):

// Reading a setting via Joomla's ComponentHelper
use Joomla\CMS\Component\ComponentHelper;

$params = ComponentHelper::getParams('com_j2commerce');
$value = $params->get('your_setting_key', 'default_value');

Settings are written through the standard Joomla component configuration form (com_config) and stored automatically in #__extensions.params as a JSON string. Extensions must not write directly to #__extensions — use ComponentHelper::getParams() for reads and the component config UI for writes.


Per-Table Differences

The following tables have structural changes beyond the universal prefix rename. Only tables with verified column-level differences are listed.

#__j2commerce_addresses

Gained the full Joomla 6 audit column set plus enabled, ordering, and params.

Added columns:

ColumnTypeDefaultNotes
accessint unsigned0Joomla access level
created_ondatetimeCURRENT_TIMESTAMP
created_byint unsigned0
modified_ondatetimeCURRENT_TIMESTAMP
modified_byint unsigned0
checked_outint unsignedNULL
checked_out_timedatetimeNULL
orderingint0
enabledtinyint1
paramstextNULL

Migration note: Extensions that INSERT into addresses must supply defaults for enabled (1), ordering (0), and access (0). All other new columns accept their defaults automatically.


#__j2commerce_carts

Added cart_voucher and cart_coupon columns. J2Store stored voucher and coupon state inside the serialized cart_params blob; J2Commerce promotes them to dedicated indexed columns.

Added columns:

ColumnTypeDefaultNotes
cart_vouchervarchar(255)''Active voucher code
cart_couponvarchar(255)''Active coupon code

Migration note: Extensions that read coupon or voucher state from a cart row must use these columns. Do not attempt to parse cart_params for these values.


#__j2commerce_countries

Gained the full audit column set. The enabled and ordering columns existed in J2Store but used int(11) — J2Commerce uses tinyint NOT NULL DEFAULT 0 and int NOT NULL DEFAULT 0.

Added columns:

ColumnTypeDefaultNotes
accessint unsigned0
created_ondatetimeCURRENT_TIMESTAMP
created_byint unsigned0
modified_ondatetimeCURRENT_TIMESTAMP
modified_byint unsigned0
checked_outint unsignedNULL
checked_out_timedatetimeNULL

#__j2commerce_coupons

Gained audit columns. The valid_from and valid_to columns changed from datetime NOT NULL (J2Store) to datetime DEFAULT NULL (J2Commerce) — allowing coupons with no expiry without needing 0000-00-00.

Added columns:

ColumnTypeDefaultNotes
accessint unsigned0
created_ondatetimeCURRENT_TIMESTAMP
created_byint unsigned0
modified_ondatetimeCURRENT_TIMESTAMP
modified_byint unsigned0
checked_outint unsignedNULL
checked_out_timedatetimeNULL

Changed columns:

ColumnJ2Store typeJ2Commerce type
valid_fromdatetime NOT NULLdatetime DEFAULT NULL
valid_todatetime NOT NULLdatetime DEFAULT NULL

#__j2commerce_currencies

currency_value changed from float(15,8) to decimal(15,8) — eliminates floating-point rounding errors in exchange rate storage. The locked_on/locked_by columns changed from NOT NULL DEFAULT '0000-00-00 00:00:00' to nullable DEFAULT NULL.

Changed columns:

ColumnJ2Store typeJ2Commerce type
currency_valuefloat(15,8) NOT NULLdecimal(15,8) NOT NULL
locked_ondatetime NOT NULL DEFAULT '0000-00-00 00:00:00'datetime DEFAULT NULL
locked_bybigint(20) unsigned NOT NULL DEFAULT '0'bigint unsigned NOT NULL DEFAULT 0
created_ondatetime NOT NULL DEFAULT '0000-00-00 00:00:00'datetime DEFAULT CURRENT_TIMESTAMP
modified_ondatetime NOT NULL DEFAULT '0000-00-00 00:00:00'datetime DEFAULT CURRENT_TIMESTAMP

Added columns:

ColumnTypeDefaultNotes
accessint unsigned0

#__j2commerce_customfields

Added three UI hint columns and the full audit column set.

Added columns:

ColumnTypeDefaultNotes
field_placeholdervarchar(250)NULLHTML placeholder attribute
field_autocompletevarchar(100)NULLHTML autocomplete value
field_widthvarchar(20)''Bootstrap column class, e.g., col-md-6
accessint unsigned0
created_ondatetimeCURRENT_TIMESTAMP
created_byint unsigned0
modified_ondatetimeCURRENT_TIMESTAMP
modified_byint unsigned0
checked_outint unsignedNULL
checked_out_timedatetimeNULL

#__j2commerce_emailtemplates

Gained context, body_json, body_source (changed semantics — see note), custom_css, and the full audit column set.

Added columns:

ColumnTypeDefaultNotes
contextvarchar(100)''Maps to emailtype_contexts.context
body_jsonmediumtextNULLStructured body for visual editor
custom_csstextNULLPer-template CSS overrides
accessint unsigned0
created_ondatetimeCURRENT_TIMESTAMP
created_byint unsigned0
modified_ondatetimeCURRENT_TIMESTAMP
modified_byint unsigned0
checked_outint unsignedNULL
checked_out_timedatetimeNULL

Changed columns:

ColumnJ2Store defaultJ2Commerce defaultNotes
body_sourcevarchar(255) NOT NULLvarchar(255) NOT NULL DEFAULT 'editor'Added default
body_source_filevarchar(255) NOT NULLvarchar(255) NOT NULL DEFAULT ''Added default

Migration note: J2Store email templates have no context. When migrating templates, set context to order_confirmed (or the appropriate value from emailtype_contexts) based on the order status the template was previously associated with.


#__j2commerce_filtergroups

Gained audit columns.

Added columns:

ColumnTypeDefaultNotes
accessint unsigned0
created_ondatetimeCURRENT_TIMESTAMP
created_byint unsigned0
modified_ondatetimeCURRENT_TIMESTAMP
modified_byint unsigned0
checked_outint unsignedNULL
checked_out_timedatetimeNULL

#__j2commerce_geozones

Gained ordering and audit columns. J2Store had no ordering column on this table.

Added columns:

ColumnTypeDefaultNotes
accessint unsigned0
created_ondatetimeCURRENT_TIMESTAMP
created_byint unsigned0
modified_ondatetimeCURRENT_TIMESTAMP
modified_byint unsigned0
checked_outint unsignedNULL
checked_out_timedatetimeNULL
orderingint0

#__j2commerce_invoicetemplates

Gained body_json, body_source, body_source_file, custom_css, and the full audit column set.

Added columns:

ColumnTypeDefaultNotes
body_jsonmediumtextNULLStructured body
body_sourcevarchar(255)'editor'
body_source_filevarchar(255)''
custom_csstextNULL
accessint unsigned0
created_ondatetimeCURRENT_TIMESTAMP
created_byint unsigned0
modified_ondatetimeCURRENT_TIMESTAMP
modified_byint unsigned0
checked_outint unsignedNULL
checked_out_timedatetimeNULL

#__j2commerce_lengths

Added num_decimals and the full audit column set.

Added columns:

ColumnTypeDefaultNotes
num_decimalsint2Decimal places for display
accessint unsigned0
created_ondatetimeCURRENT_TIMESTAMP
created_byint unsigned0
modified_ondatetimeCURRENT_TIMESTAMP
modified_byint unsigned0
checked_outint unsignedNULL
checked_out_timedatetimeNULL

#__j2commerce_manufacturers

Added brand_desc_id and the full audit column set.

Added columns:

ColumnTypeDefaultNotes
brand_desc_idint0FK to Joomla article (brand description)
accessint unsigned0
created_ondatetimeCURRENT_TIMESTAMP
created_byint unsigned0
modified_ondatetimeCURRENT_TIMESTAMP
modified_byint unsigned0
checked_outint unsignedNULL
checked_out_timedatetimeNULL

#__j2commerce_options

Gained audit columns.

Added columns:

ColumnTypeDefaultNotes
accessint unsigned0
created_ondatetimeCURRENT_TIMESTAMP
created_byint unsigned0
modified_ondatetimeCURRENT_TIMESTAMP
modified_byint unsigned0
checked_outint unsignedNULL
checked_out_timedatetimeNULL

#__j2commerce_orderdiscounts

Added from_order_id for renewal order lineage tracking.

Added columns:

ColumnTypeDefaultNotes
from_order_idvarchar(255)'0'Source order ID for renewal orders

#__j2commerce_orderdownloads

Added from_order_id.

Added columns:

ColumnTypeDefaultNotes
from_order_idvarchar(255)'0'Source order ID for renewal orders

#__j2commerce_orderhistories

Added from_order_id.

Added columns:

ColumnTypeDefaultNotes
from_order_idvarchar(255)'0'Source order ID for renewal orders

#__j2commerce_orderinfos

Added from_order_id.

Added columns:

ColumnTypeDefaultNotes
from_order_idvarchar(255)'0'Source order ID for renewal orders

#__j2commerce_orderitems

Added from_order_id and orderitem_type.

Added columns:

ColumnTypeDefaultNotes
from_order_idvarchar(255)'0'Source order ID for renewal orders
orderitem_typevarchar(255)'normal'e.g., normal, renewal

#__j2commerce_orders

Added several columns for renewal order support, campaign tracking, and Joomla 6 audit compliance.

Added columns:

ColumnTypeDefaultNotes
from_order_idvarchar(255)'0'Source order for renewal
order_typevarchar(255)'normal'e.g., normal, renewal
parent_idintNULLParent order PK for child orders
subscription_idintNULLFK to subscription record
order_subtotal_ex_taxdecimal(15,5)NULLSubtotal excluding tax
order_discount_taxdecimal(15,5)NULLTax portion of discount
order_refunddecimal(15,5)NULLRefunded amount
order_feesdecimal(15,5)NULLTotal fees (aggregate from orderfees)
order_paramstextNULLJSON extra parameters
accessint unsigned0
checked_outint unsignedNULL
checked_out_timedatetimeNULL
campaign_double_opt_inintNULLEmail marketing opt-in flag
campaign_order_idvarchar(255)NULLExternal campaign order reference

Changed columns:

ColumnJ2Store typeJ2Commerce type
created_ondatetime NOT NULL (no default)datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
created_byint(11) NOT NULLint unsigned NOT NULL DEFAULT '0'
modified_ondatetime NOT NULL (no default)datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
modified_byint(11) NOT NULLint unsigned NOT NULL DEFAULT '0'

#__j2commerce_orderstatuses

Gained audit columns.

Added columns:

ColumnTypeDefaultNotes
accessint unsigned0
created_ondatetimeCURRENT_TIMESTAMP
created_byint unsigned0
modified_ondatetimeCURRENT_TIMESTAMP
modified_byint unsigned0
checked_outint unsignedNULL
checked_out_timedatetimeNULL

#__j2commerce_ordertaxes

Added from_order_id.

Added columns:

ColumnTypeDefaultNotes
from_order_idvarchar(255)'0'Source order ID for renewal orders

#__j2commerce_productimages

Added thumbnail (tiny_image*) columns and additional thumbnail columns for multi-image support.

Added columns:

ColumnTypeDefaultNotes
tiny_imagetextNULLSmall thumbnail path
tiny_image_altvarchar(255)''
additional_thumb_imageslongtextNULLJSON array of thumb paths
additional_thumb_images_altlongtextNULL
additional_tiny_imageslongtextNULLJSON array of tiny paths
additional_tiny_images_altlongtextNULL

#__j2commerce_products

Added main_tag, access, hits, checked_out, checked_out_time, and ordering. The created_on/modified_on type changed from varchar to datetime.

Added columns:

ColumnTypeDefaultNotes
main_tagvarchar(255)NULLPrimary Joomla tag ID
accessint unsigned0
hitsint unsigned0View count
checked_outint unsignedNULL
checked_out_timedatetimeNULL
orderingint0

Changed columns:

ColumnJ2Store typeJ2Commerce typeNotes
created_onvarchar(255) DEFAULT NULLdatetime NOT NULL DEFAULT CURRENT_TIMESTAMPType corrected
modified_onvarchar(45) DEFAULT NULLdatetime NOT NULL DEFAULT CURRENT_TIMESTAMPType corrected
enabledint(11) DEFAULT NULLtinyint NOT NULL DEFAULT 0
productfilter_idsvarchar(255) NOT NULLvarchar(255) DEFAULT NULLNullability changed

#__j2commerce_product_optionvalues

Added ordering column. J2Store did not have an ordering column on this table.

Added columns:

ColumnTypeDefaultNotes
orderingint0Display order of option values

#__j2commerce_taxprofiles

Gained audit columns.

Added columns:

ColumnTypeDefaultNotes
accessint unsigned0
created_ondatetimeCURRENT_TIMESTAMP
created_byint unsigned0
modified_ondatetimeCURRENT_TIMESTAMP
modified_byint unsigned0
checked_outint unsignedNULL
checked_out_timedatetimeNULL

#__j2commerce_taxrates

Gained audit columns.

Added columns:

ColumnTypeDefaultNotes
accessint unsigned0
created_ondatetimeCURRENT_TIMESTAMP
created_byint unsigned0
modified_ondatetimeCURRENT_TIMESTAMP
modified_byint unsigned0
checked_outint unsignedNULL
checked_out_timedatetimeNULL

#__j2commerce_variants

params, sold, created_on, and modified_on types were corrected. J2Store stored created_on and modified_on as varchar — J2Commerce uses datetime.

Changed columns:

ColumnJ2Store typeJ2Commerce type
created_onvarchar(255) DEFAULT NULLdatetime NOT NULL DEFAULT CURRENT_TIMESTAMP
modified_onvarchar(45) DEFAULT NULLdatetime NOT NULL DEFAULT CURRENT_TIMESTAMP
allow_backorderint(11) NOT NULLint NOT NULL
isdefault_variantint(11) NOT NULLint NOT NULL

Added columns:

ColumnTypeDefaultNotes
paramstextNULLExtra variant parameters
solddecimal(12,4)NULLSold quantity tracked at variant level

#__j2commerce_vendors

Renamed j2store_user_id to j2commerce_user_id. Gained audit columns.

Renamed columns:

J2Store columnJ2Commerce column
j2store_user_idj2commerce_user_id

Added columns:

ColumnTypeDefaultNotes
accessint unsigned0
created_ondatetimeCURRENT_TIMESTAMP
created_byint unsigned0
modified_ondatetimeCURRENT_TIMESTAMP
modified_byint unsigned0
checked_outint unsignedNULL
checked_out_timedatetimeNULL

Migration note: Any extension that references j2store_user_id in a query against the vendors table must update the column name to j2commerce_user_id.


#__j2commerce_vouchers

Gained valid_from, valid_to, from_order_id, and audit columns. J2Store vouchers had no date validity range.

Added columns:

ColumnTypeDefaultNotes
valid_fromdatetimeNULLVoucher start date
valid_todatetimeNULLVoucher expiry date
from_order_idvarchar(255)'0'Source order for renewal
accessint unsigned0
modified_ondatetimeCURRENT_TIMESTAMP
modified_byint unsigned0
checked_outint unsignedNULL
checked_out_timedatetimeNULL

Changed columns:

ColumnJ2Store typeJ2Commerce type
created_ondatetime NOT NULL (no default)datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
created_byint(11) NOT NULLint unsigned NOT NULL DEFAULT 0

#__j2commerce_weights

Added num_decimals and the full audit column set.

Added columns:

ColumnTypeDefaultNotes
num_decimalsint2Decimal places for display
accessint unsigned0
created_ondatetimeCURRENT_TIMESTAMP
created_byint unsigned0
modified_ondatetimeCURRENT_TIMESTAMP
modified_byint unsigned0
checked_outint unsignedNULL
checked_out_timedatetimeNULL

#__j2commerce_queues

J2Store had a 10-column queue table. J2Commerce fully redesigned it with worker locking, retry logic, dead-letter support, and proper datetime types.

Added columns (not in J2Store):

ColumnTypeDefaultNotes
item_typevarchar(50)'order'Subject type
error_messagetextNULLLast error text
attempt_countsmallint unsigned0Retry count
max_attemptssmallint unsigned10Max retries before dead-letter
next_attempt_atdatetimeNULLEarliest retry time
locked_atdatetimeNULLConcurrency lock timestamp
locked_byvarchar(64)NULLProcess ID holding lock
processed_atdatetimeNULLCompletion timestamp

Changed columns:

ColumnJ2Store typeJ2Commerce typeNotes
queue_typevarchar(255)varchar(100)Shortened
queue_datalongtextmediumtext
paramslongtextmediumtext
priorityint(11)tinyint
statusvarchar(255)varchar(20)Values: pending, processing, completed, failed, dead
created_onvarchar(255)datetime NOT NULL DEFAULT CURRENT_TIMESTAMPType corrected
modified_onvarchar(255)datetime NOT NULL ON UPDATE CURRENT_TIMESTAMPType corrected

Removed columns:

ColumnJ2Store typeNotes
expireddatetimeReplaced by next_attempt_at

#__j2commerce_productprice_index

Minor schema cleanup: explicit defaults added to price columns; redundant unique index removed.

Changed columns:

ColumnJ2StoreJ2CommerceNotes
min_pricedecimal(15,5) NOT NULL (no default)decimal(15,5) NOT NULL DEFAULT 0.00000Default added
max_pricedecimal(15,5) NOT NULL (no default)decimal(15,5) NOT NULL DEFAULT 0.00000Default added

Changed indexes: J2Store defined both PRIMARY KEY (product_id) and a redundant UNIQUE KEY uq_product (product_id). J2Commerce removes the redundant unique key.


#__j2commerce_zones

Gained audit columns.

Added columns:

ColumnTypeDefaultNotes
accessint unsigned0
created_ondatetimeCURRENT_TIMESTAMP
created_byint unsigned0
modified_ondatetimeCURRENT_TIMESTAMP
modified_byint unsigned0
checked_outint unsignedNULL
checked_out_timedatetimeNULL

Tables With No Structural Changes Beyond Prefix Rename

The following tables required only the universal table prefix and primary key column rename. Apply the rules from section 2 mechanically — no column changes are needed.

  • #__j2commerce_cartitems
  • #__j2commerce_filters
  • #__j2commerce_geozonerules
  • #__j2commerce_metafields
  • #__j2commerce_optionvalues
  • #__j2commerce_orderitemattributes
  • #__j2commerce_ordershippings
  • #__j2commerce_productfiles
  • #__j2commerce_product_filters
  • #__j2commerce_product_options
  • #__j2commerce_product_prices
  • #__j2commerce_product_variant_optionvalues
  • #__j2commerce_productquantities
  • #__j2commerce_shippingmethods
  • #__j2commerce_shippingrates
  • #__j2commerce_taxrules
  • #__j2commerce_uploads

Joomla 6 Audit Fields Reference

Many J2Commerce tables gained the standard Joomla 6 managed-entity column set. These columns are not repeated in every table section above — consult this reference when working with them.

ColumnTypeDefaultPurpose
accessint unsigned NOT NULL0Joomla access level ID (maps to #__viewlevels)
created_ondatetime NOT NULLCURRENT_TIMESTAMPRow creation timestamp
created_byint unsigned NOT NULL0Joomla user ID who created the row
modified_ondatetime NOT NULLCURRENT_TIMESTAMPLast modification timestamp
modified_byint unsigned NOT NULL0Joomla user ID who last modified the row
checked_outint unsignedNULLUser ID holding edit lock; NULL when not locked
checked_out_timedatetimeNULLWhen the edit lock was acquired

How J2Commerce Table classes populate these

The check() method in each Table class sets defaults for created_on and modified_on when empty. The standard onBeforeStore() hook provided by Joomla's Table base class sets modified_on automatically on every save, and created_on only when the row is new. The checked_out and checked_out_time columns are managed by the admin controller's checkout() / checkin() flow.

// File: administrator/components/com_j2commerce/src/Table/CountryTable.php

public function check(): bool
{
if (empty($this->ordering)) {
$this->ordering = 0;
}

if (!isset($this->enabled) || $this->enabled === '') {
$this->enabled = 1;
}

return parent::check();
}

The access column defaults to 0 on INSERT. J2Commerce admin list views filter by access level automatically when displaying rows to a user; extension code that creates rows programmatically should set access explicitly if the row should be visible only to specific user groups.