Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,113 of 9,113 pages
About the help in other languages
All help pages

cjw_newsletter 4.2.0: the schema change

Every table and column 4.2.0 adds, in one change for all feature areas. The source of truth is share/db_schema.dba; sql/{mysql,postgresql,sqlite}/schema.sql are made from it, and an installation of 4.1.20 is brought to…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/ext/cjw_newsletter/schema-4.2.md

On this page

cjw_newsletter 4.2.0: the schema change

Every table and column 4.2.0 adds, in one change for all feature areas. The source of truth is share/db_schema.dba; sql/{mysql,postgresql,sqlite}/schema.sql are made from it, and an installation of 4.1.20 is brought to 4.2.0 with update/database/<engine>/4.2/dbupdate-4.1.20-to-4.2.0.sql (run once; a second run fails). The PostgreSQL upgrade also renames the sequences of the 4.1 tables from <table>_s to <table>_id_seq, the name the database driver reads.

Each table belongs to one feature area; its class is in classes/<area folder>/, data only (definition and fetch helpers). New columns of 4.1 tables are in the definitions of their 4.1 classes. Timestamps are Unix times; lists of ids or names in one column use cjw's ;a;b; form. Every new column has a default, so the upgrade works on tables with rows.

AreaFolderTables and columns
N1 Deliverabilityclasses/deliverability/cjwnl_throttle_state, cjwnl_send_batch, cjwnl_mailin_address, cjwnl_mailin_message, cjwnl_test_group, cjwnl_edition_send.test_group_id, cjwnl_edition_send.throttle_transport, cjwnl_edition_send_item.retry_count, cjwnl_edition_send_item.next_retry, cjwnl_edition_send_item.batch_id, cjwnl_user.soft_bounce_count, cjwnl_user.last_bounce
N2 Editorialclasses/editorial/cjwnl_schedule, cjwnl_schedule_log, cjwnl_article_pool, cjwnl_edition_article, cjwnl_approval, cjwnl_edition_send.schedule_id, cjwnl_list.approval_required, cjwnl_list.article_pool_id
N3 Renderingclasses/rendering/cjwnl_interest, cjwnl_user_interest, cjwnl_edition_send_output, cjwnl_edition_send.skin_name, cjwnl_edition_send_item.language, cjwnl_list.skin_name_array_string, cjwnl_list.main_language, cjwnl_list.language_array_string, cjwnl_list.interest_source, cjwnl_user.language
N4 Statisticsclasses/statistics/cjwnl_link, cjwnl_link_click, cjwnl_open, cjwnl_stat_total, cjwnl_ab_test, cjwnl_ab_variant, cjwnl_edition_send.tracking_mode, cjwnl_edition_send.ab_test_id, cjwnl_edition_send_item.ab_variant_id, cjwnl_edition_send_item.first_opened, cjwnl_edition_send_item.open_count, cjwnl_edition_send_item.click_count, cjwnl_list.tracking_mode
N5 SMSclasses/sms/cjwnl_sms_code, cjwnl_sms_message, cjwnl_sms_inbound, cjwnl_edition_send.channel, cjwnl_list.sms_enabled, cjwnl_list.sms_sender, cjwnl_user.phone_number, cjwnl_user.phone_status, cjwnl_user.phone_confirmed
N6 Import/export and migrationclasses/importexport/cjwnl_import_mapping, cjwnl_migration_log, cjwnl_import.mapping_id, cjwnl_import.is_dry_run, cjwnl_import.consent_source, cjwnl_import.status, cjwnl_import.skipped_count, cjwnl_import.error_count

New columns of 4.1 tables

cjwnl_edition_send

ColumnTypeAreaMeaning
skin_namevarchar(255), default ''N3Skin chosen for this send; empty = the skin of the list.
channelvarchar(20), default emailN5email or sms.
schedule_idint, default 0N2cjwnl_schedule.id that made the send; 0 = sent by hand.
tracking_modetinyint, default 0N4Copied from the list when the send is made: 0 no tracking, 1 anonymous totals only, 2 per person for recipients who agreed (category newsletter_statistics).
ab_test_idint, default 0N4cjwnl_ab_test.id; 0 = no A/B test.
test_group_idint, default 0N1cjwnl_test_group.id of a test send; 0 = a real send.
throttle_transportvarchar(50), default ''N1Transport whose rate limit applies (cjwnl_throttle_state.transport); empty = the default transport.

cjwnl_edition_send_item

ColumnTypeAreaMeaning
retry_counttinyint, default 0N1Soft-bounce retries made so far (at most [DeliverabilitySettings] SoftBounceMaxRetries).
next_retryint, default 0N1Not to be sent again before this time; 0 = no retry pending.
batch_idint, default 0N1cjwnl_send_batch.id that sent the item.
languagevarchar(20), default ''N3Locale the item was rendered in; empty = the main language of the list.
ab_variant_idint, default 0N4cjwnl_ab_variant.id whose subject the item got; 0 = none.
first_openedint, default 0N4First open (per person, only with consent; cleared after the retention period).
open_countint, default 0N4Opens (per person, only with consent).
click_countint, default 0N4Clicks (per person, only with consent).

cjwnl_list

ColumnTypeAreaMeaning
skin_name_array_stringvarchar(255), default ''N3Skins allowed for sends of the list, as ;default;company;; empty = every skin.
main_languagevarchar(20), default ''N3Locale a subscriber gets when the edition has no translation in their language; empty = the siteaccess locale.
language_array_stringvarchar(255), default ''N3Locales offered to subscribers, as ;eng-US;ger-DE;.
interest_sourcevarchar(20), default ''N3Where interests come from: empty (none), topics (cjwnl_interest of the list) or eztags.
approval_requiredtinyint (0/1), default 0N21 = a send waits for an approval (cjwnl_approval).
article_pool_idint, default 0N2cjwnl_article_pool.id of the list; 0 = the global default pool.
tracking_modetinyint, default 0N4Default tracking of the sends: 0 off (the default), 1 anonymous totals, 2 per person with consent.
sms_enabledtinyint (0/1), default 0N51 = SMS editions may be sent to the list.
sms_sendervarchar(50), default ''N5Sender id or number of the SMS; empty = that of the transport.

cjwnl_user

ColumnTypeAreaMeaning
languagevarchar(20), default ''N3Preferred locale; empty = the main language of the list.
soft_bounce_counttinyint, default 0N1Soft bounces since the last delivered mail.
last_bounceint, default 0N1Time of the last bounce.
phone_numbervarchar(50), default ''N5Mobile number in E.164 form; empty = none.
phone_statustinyint, default 0N50 none, 1 code sent and pending, 2 confirmed, 3 stopped (STOP keyword).
phone_confirmedint, default 0N5When the number was confirmed with the code.

cjwnl_import

ColumnTypeAreaMeaning
mapping_idint, default 0N6cjwnl_import_mapping.id used; 0 = the fixed columns of 4.1.
is_dry_runtinyint (0/1), default 0N61 = counted and checked only, nothing written.
consent_sourcevarchar(100), default ''N6Source written to the consent log for the imported subscriptions.
statustinyint, default 0N60 new, 1 previewed, 2 running, 3 done, 9 failed.
skipped_countint, default 0N6Rows skipped (existing, suppressed, invalid).
error_countint, default 0N6Rows that failed.

New tables

cjwnl_throttle_state

Area N1 Deliverability, class CjwNewsletterThrottleState (classes/deliverability/cjwnewsletterthrottlestate.php). The rate of one transport in the current window. The queue run reads and raises sent_count and stops (to be resumed by the next run) when [ThrottleSettings] MaxPerMinute[] / MaxPerHour[] is reached. One row per transport and window type.

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
transportvarchar(50), default ''Transport name (smtp, sendmail, file, sms, or the name of an SMS transport).
window_typevarchar(10), default minuteminute or hour.
window_startint, default 0Start of the current window.
sent_countint, default 0Mails sent in the current window.
paused_untilint, default 0No sending before this time (a pause set by an admin or after an error); 0 = not paused.
modifiedint, default 0When the row was last changed (Unix time).

Indexes: cjwnl_throttle_state_window (unique, transport, window_type).

cjwnl_send_batch

Area N1 Deliverability, class CjwNewsletterSendBatch (classes/deliverability/cjwnewslettersendbatch.php). A batch of a send. status: 0 new, 1 running, 2 done, 3 paused (rate limit), 9 failed. A stopped run resumes after last_item_id.

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
edition_send_idint, default 0cjwnl_edition_send.id.
channelvarchar(20), default emailemail or sms.
batch_numberint, default 0Number of the batch within the send, from 1.
item_countint, default 0Items the batch took.
sent_countint, default 0Items sent.
failed_countint, default 0Items that failed.
last_item_idint, default 0Last item handled (resume point).
statustinyint, default 0State, see the table description.
createdint, default 0When the row was made (Unix time).
startedint, default 0When the batch started.
finishedint, default 0When the batch finished.

Indexes: cjwnl_send_batch_send (edition_send_id, status).

cjwnl_mailin_address

Area N1 Deliverability, class CjwNewsletterMailinAddress (classes/deliverability/cjwnewslettermailinaddress.php). An address that takes subscribe/unsubscribe mails for a list. The kernel IMAP/POP3 reader reads the mailbox together with the bounces and routes by recipient address; a subscribe only starts the double opt-in.

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
list_contentobject_idint, default 0Content object id of the newsletter list (0 = every list, or the global default).
emailvarchar(255), default ''The address (lower case).
plus_tagvarchar(100), default ''Tag of a plus-address (news+<tag>@...); empty = the address itself.
actionvarchar(20), default bothsubscribe, unsubscribe or both (the keyword in the subject decides).
mailbox_idint, default 0cjwnl_mailbox.id that receives it; 0 = the kernel bounce mailbox.
is_activetinyint (0/1), default 11 = mails are processed.
createdint, default 0When the row was made (Unix time).
modifiedint, default 0When the row was last changed (Unix time).

Indexes: cjwnl_mailin_address_email (unique, email, plus_tag); cjwnl_mailin_address_list (list_contentobject_id).

cjwnl_mailin_message

Area N1 Deliverability, class CjwNewsletterMailinMessage (classes/deliverability/cjwnewslettermailinmessage.php). status: 0 new, 1 pending confirmation, 2 done, 9 rejected. The sender address is kept only until the message is processed and is erased with the user.

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
mailin_address_idint, default 0cjwnl_mailin_address.id.
message_identifiervarchar(255), default ''Message-Id of the mail (a mail is never processed twice).
email_fromvarchar(255), default ''Sender address.
actionvarchar(20), default ''subscribe or unsubscribe as understood.
statustinyint, default 0State, see the table description.
pending_tokenvarchar(64), default ''Id of the kernel pending confirmation (expmail_pending) it started, if any.
newsletter_user_idint, default 0cjwnl_user.id found or created; 0 = none.
notetext, nullWhy it was rejected, or what was done.
createdint, default 0When the row was made (Unix time).
processedint, default 0When it was processed.

Indexes: cjwnl_mailin_message_ident (message_identifier); cjwnl_mailin_message_status (status, created).

cjwnl_test_group

Area N1 Deliverability, class CjwNewsletterTestGroup (classes/deliverability/cjwnewslettertestgroup.php). Test addresses for test sends (at most [TestSendSettings] MaxTestGroupSize). Test sends are never gated and never counted in the statistics.

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
list_contentobject_idint, default 0Content object id of the newsletter list (0 = every list, or the global default).
namevarchar(255), default ''Name shown in the send form.
email_listtext, nullAddresses, one per line.
creator_contentobject_idint, default 0Content object id of the user who made it.
createdint, default 0When the row was made (Unix time).
modifiedint, default 0When the row was last changed (Unix time).

Indexes: cjwnl_test_group_list (list_contentobject_id).

cjwnl_schedule

Area N2 Editorial, class CjwNewsletterSchedule (classes/editorial/cjwnewsletterschedule.php). A recurring send. status: 0 active, 1 paused, 9 removed. The queue-create part and ext:cjw_newsletter:schedule run take the schedules whose next_run has come.

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
list_contentobject_idint, default 0Content object id of the newsletter list (0 = every list, or the global default).
modevarchar(20), default latestcopy (copy the template edition and send the copy) or latest (send the latest unsent edition of the list).
template_edition_contentobject_idint, default 0Edition copied in mode copy.
recurrence_typevarchar(1), default wd chosen weekdays, w weekly, m monthly.
recurrence_valuevarchar(255), default ''Weekdays 1,3,5 (ISO, 1 = Monday) for d; weekday for w; day of the month for m (a day beyond the month means its last day).
send_timeint, default 0Time of day, seconds after midnight in timezone.
timezonevarchar(64), default ''Time zone name; empty = [ScheduleSettings] DefaultTimezone or the site's.
auto_filltinyint (0/1), default 01 = the copy is filled from the pool with content published since the last send.
article_pool_idint, default 0Pool of the auto-fill; 0 = the pool of the list.
skip_if_emptytinyint (0/1), default 11 = no send (logged as skipped) when the auto-fill finds nothing.
condition_handlervarchar(255), default ''Class asked before each run ([ScheduleSettings] ConditionHandlers[]); empty = none.
next_runint, default 0Next run.
last_runint, default 0Last run.
last_edition_send_idint, default 0Send made by the last run.
last_resultvarchar(50), default ''Result of the last run (as cjwnl_schedule_log.result).
statustinyint, default 0State, see the table description.
creator_contentobject_idint, default 0Content object id of the user who made it.
createdint, default 0When the row was made (Unix time).
modifiedint, default 0When the row was last changed (Unix time).

Indexes: cjwnl_schedule_due (status, next_run); cjwnl_schedule_list (list_contentobject_id).

cjwnl_schedule_log

Area N2 Editorial, class CjwNewsletterScheduleLog (classes/editorial/cjwnewsletterschedulelog.php). One run of a schedule.

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
schedule_idint, default 0cjwnl_schedule.id.
run_atint, default 0When it ran.
resultvarchar(20), default ''sent, skipped_empty, skipped_condition, skipped_dry_run or failed.
edition_contentobject_idint, default 0Edition sent or made.
edition_send_idint, default 0cjwnl_edition_send.id.
article_countint, default 0Articles the auto-fill added.
messagetext, nullDetails (the error of a failed run).

Indexes: cjwnl_schedule_log_schedule (schedule_id, run_at).

cjwnl_article_pool

Area N2 Editorial, class CjwNewsletterArticlePool (classes/editorial/cjwnewsletterarticlepool.php). Where the articles for editions come from. All filters are applied with fetch( content, list ) filters, never in hand-made SQL. A list without a pool uses the row with list_contentobject_id 0 and is_default 1, else [ArticlePoolSettings].

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
list_contentobject_idint, default 0Content object id of the newsletter list (0 = every list, or the global default).
namevarchar(255), default ''Name shown to editors.
is_defaulttinyint (0/1), default 01 = the global default pool.
parent_node_id_array_stringvarchar(255), default ''Nodes searched, as ;2;45;.
class_identifier_array_stringvarchar(255), default ''Classes, as ;article;cjw_newsletter_article;.
section_id_array_stringvarchar(255), default ''Sections, as ;1;3;; empty = any.
tag_id_array_stringvarchar(255), default ''eztags tag ids, as ;12;14;; empty = any.
state_id_array_stringvarchar(255), default ''Object state ids, as ;1;; empty = any.
max_age_daysint, default 0Only content published in the last n days; 0 = any age.
max_itemsint, default 10Most articles the auto-fill takes.
sort_byvarchar(50), default publishedpublished, modified, priority or name.
filter_datatext, nullFurther filters (JSON), read and cast in PHP.
creator_contentobject_idint, default 0Content object id of the user who made it.
createdint, default 0When the row was made (Unix time).
modifiedint, default 0When the row was last changed (Unix time).

Indexes: cjwnl_article_pool_list (list_contentobject_id).

cjwnl_edition_article

Area N2 Editorial, class CjwNewsletterEditionArticle (classes/editorial/cjwnewslettereditionarticle.php). An article taken into an edition from a pool (an editor's pick or the auto-fill). Also the source of "which editions carried this article" in the article statistics.

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
edition_contentobject_idint, default 0Content object id of the edition.
contentobject_idint, default 0Content object id of the article.
article_pool_idint, default 0Pool it came from; 0 = picked without a pool.
positionint, default 0Order in the edition.
added_bytinyint, default 00 an editor, 1 the auto-fill, 2 the interests block.
creator_contentobject_idint, default 0Content object id of the user who made it.
createdint, default 0When the row was made (Unix time).

Indexes: cjwnl_edition_article_edition (unique, edition_contentobject_id, contentobject_id); cjwnl_edition_article_object (contentobject_id).

cjwnl_approval

Area N2 Editorial, class CjwNewsletterApproval (classes/editorial/cjwnewsletterapproval.php). status: 0 pending, 1 approved, 2 rejected, 3 withdrawn (a new version replaces it). A list with approval_required cannot be sent until the current version is approved.

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
edition_contentobject_idint, default 0Content object id of the edition.
edition_contentobject_versionint, default 0Version approved.
list_contentobject_idint, default 0Content object id of the newsletter list (0 = every list, or the global default).
collaboration_item_idint, default 0ezcollaboration_item.id in the approver's inbox.
statustinyint, default 0State, see the table description.
requested_byint, default 0User id who asked for the approval.
requestedint, default 0When.
decided_byint, default 0User id who decided.
decidedint, default 0When.
commenttext, nullThe approver's comment.

Indexes: cjwnl_approval_edition (edition_contentobject_id, edition_contentobject_version); cjwnl_approval_collaboration (collaboration_item_id).

cjwnl_interest

Area N3 Rendering, class CjwNewsletterInterest (classes/rendering/cjwnewsletterinterest.php). An interest subscribers can pick on the central preference page; the "articles for your interests" block fills per person from the pool.

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
list_contentobject_idint, default 0Content object id of the newsletter list (0 = every list, or the global default).
identifiervarchar(100), default ''Identifier, unique per list.
namevarchar(255), default ''Name shown to subscribers.
sourcevarchar(20), default topictopic or eztags.
eztags_idint, default 0eztags tag id for eztags; 0 otherwise.
priorityint, default 0Order on the page.
is_activetinyint (0/1), default 11 = offered.
createdint, default 0When the row was made (Unix time).
modifiedint, default 0When the row was last changed (Unix time).

Indexes: cjwnl_interest_identifier (unique, list_contentobject_id, identifier).

cjwnl_user_interest

Area N3 Rendering, class CjwNewsletterUserInterest (classes/rendering/cjwnewsletteruserinterest.php). An interest a user picked. Removed with the user.

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
newsletter_user_idint, default 0cjwnl_user.id.
interest_idint, default 0cjwnl_interest.id.
createdint, default 0When the row was made (Unix time).

Indexes: cjwnl_user_interest_pair (unique, newsletter_user_id, interest_id); cjwnl_user_interest_interest (interest_id).

cjwnl_edition_send_output

Area N3 Rendering, class CjwNewsletterEditionSendOutput (classes/rendering/cjwnewslettereditionsendoutput.php). The rendered output of a send in one more language. The main language stays in cjwnl_edition_send.output_xml.

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
edition_send_idint, default 0cjwnl_edition_send.id.
languagevarchar(20), default ''Locale.
output_xmllongtext, nullOutput XML as in cjwnl_edition_send.output_xml.
createdint, default 0When the row was made (Unix time).

Indexes: cjwnl_edition_send_output_lang (unique, edition_send_id, language).

Area N4 Statistics, class CjwNewsletterLink (classes/statistics/cjwnewsletterlink.php). A link of a send, rewritten to the click redirect when the queue is made. The redirect only goes to URLs stored here (no open redirect); mailto:, anchors and the gate's links are never rewritten.

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
edition_send_idint, default 0cjwnl_edition_send.id.
url_hashvarchar(64), default ''sha256 of the URL (unique per send).
urltext, nullThe URL.
contentobject_idint, default 0Article the link points to, if any (article statistics).
positionint, default 0Order in the mail.
click_countint, default 0All clicks (anonymous total).
createdint, default 0When the row was made (Unix time).

Indexes: cjwnl_link_send_url (unique, edition_send_id, url_hash); cjwnl_link_object (contentobject_id).

Area N4 Statistics, class CjwNewsletterLinkClick (classes/statistics/cjwnewsletterlinkclick.php). One click. Per person only for recipients who agreed; removed after [TrackingSettings] PersonRetentionMonths and at once on withdrawal or erasure, the totals stay in cjwnl_stat_total.

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
link_idint, default 0cjwnl_link.id.
edition_send_item_idint, default 0cjwnl_edition_send_item.id; 0 when it is not counted per person.
createdint, default 0When the row was made (Unix time).

Indexes: cjwnl_link_click_link (link_id); cjwnl_link_click_item (edition_send_item_id); cjwnl_link_click_created (created).

cjwnl_open

Area N4 Statistics, class CjwNewsletterOpen (classes/statistics/cjwnewsletteropen.php). One open (pixel). Same retention as the clicks.

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
edition_send_idint, default 0cjwnl_edition_send.id.
edition_send_item_idint, default 0cjwnl_edition_send_item.id; 0 when it is not counted per person.
createdint, default 0When the row was made (Unix time).

Indexes: cjwnl_open_send (edition_send_id); cjwnl_open_item (edition_send_item_id); cjwnl_open_created (created).

cjwnl_stat_total

Area N4 Statistics, class CjwNewsletterStatTotal (classes/statistics/cjwnewsletterstattotal.php). Anonymous totals per send, link, type and day; what the reports, the dashboard trends and the CSV export read.

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
edition_send_idint, default 0cjwnl_edition_send.id.
link_idint, default 0cjwnl_link.id; 0 for opens and send-level counts.
stat_typevarchar(20), default ''sent, open, unique_open, click, unique_click, bounce, unsubscribe, blocked.
stat_dayint, default 0Day as yyyymmdd.
totalint, default 0Count.

Indexes: cjwnl_stat_total_key (unique, edition_send_id, link_id, stat_type, stat_day); cjwnl_stat_total_day (stat_type, stat_day).

cjwnl_ab_test

Area N4 Statistics, class CjwNewsletterAbTest (classes/statistics/cjwnewsletterabtest.php). status: 0 sampling, 1 waiting, 2 winner chosen, 3 done, 9 cancelled. Defaults from [ABTestSettings]: two samples of 10 %, winner by open rate (clicks when only anonymous totals exist) after 4 hours.

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
edition_send_idint, default 0cjwnl_edition_send.id.
statustinyint, default 0State, see the table description.
sample_percentint, default 10Share of the recipients per variant.
variant_countint, default 2Number of variants.
criterionvarchar(20), default openopen or click.
wait_secondsint, default 14400Wait between the samples and the choice.
winner_variant_idint, default 0cjwnl_ab_variant.id that won; 0 = not yet.
samples_sentint, default 0When the samples were sent.
decidedint, default 0When the winner was chosen.
createdint, default 0When the row was made (Unix time).
modifiedint, default 0When the row was last changed (Unix time).

Indexes: cjwnl_ab_test_send (unique, edition_send_id); cjwnl_ab_test_status (status).

cjwnl_ab_variant

Area N4 Statistics, class CjwNewsletterAbVariant (classes/statistics/cjwnewsletterabvariant.php). One subject variant.

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
ab_test_idint, default 0cjwnl_ab_test.id.
variant_keyvarchar(10), default ''A, B, ...
subjectvarchar(255), default ''Subject of the variant.
item_countint, default 0Items sent with it.
open_countint, default 0Opens (unique).
click_countint, default 0Clicks (unique).
createdint, default 0When the row was made (Unix time).

Indexes: cjwnl_ab_variant_test (unique, ab_test_id, variant_key).

cjwnl_sms_code

Area N5 SMS, class CjwNewsletterSmsCode (classes/sms/cjwnewslettersmscode.php). A confirmation code sent by SMS. Only its hash is stored.

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
newsletter_user_idint, default 0cjwnl_user.id.
phone_numbervarchar(50), default ''Number the code was sent to.
code_hashvarchar(64), default ''sha256 of the code with the site secret.
purposevarchar(20), default confirmconfirm.
attemptstinyint, default 0Wrong entries so far (at most [SmsSettings] CodeMaxAttempts).
expiresint, default 0Valid until.
usedint, default 0When it was used; 0 = not yet.
createdint, default 0When the row was made (Unix time).

Indexes: cjwnl_sms_code_user (newsletter_user_id, purpose).

cjwnl_sms_message

Area N5 SMS, class CjwNewsletterSmsMessage (classes/sms/cjwnewslettersmsmessage.php). One SMS of an SMS edition. status: 0 new, 1 sent, 2 failed, 8 template, 9 aborted. The text of an SMS send (with its placeholders) is the one row with newsletter_user_id 0 and status 8 ("template"); the rows of the recipients are made from it when the queue is created.

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
edition_send_idint, default 0cjwnl_edition_send.id.
newsletter_user_idint, default 0cjwnl_user.id.
phone_numbervarchar(50), default ''Number sent to.
bodytext, nullText sent.
statustinyint, default 0State, see the table description.
transportvarchar(50), default ''SMS transport used.
provider_message_idvarchar(255), default ''Id the provider returned.
errortext, nullError of a failed send.
batch_idint, default 0cjwnl_send_batch.id.
createdint, default 0When the row was made (Unix time).
processedint, default 0When it was sent or failed.

Indexes: cjwnl_sms_message_send (edition_send_id, status); cjwnl_sms_message_user (newsletter_user_id).

cjwnl_sms_inbound

Area N5 SMS, class CjwNewsletterSmsInbound (classes/sms/cjwnewslettersmsinbound.php). An SMS that came in (from the provider callback).

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
phone_numbervarchar(50), default ''Sender number.
keywordvarchar(50), default ''First word, upper case (STOP, ...).
bodytext, nullFull text.
newsletter_user_idint, default 0User found by the number; 0 = none.
actionvarchar(20), default ''What was done: stop, ignored.
provider_message_idvarchar(255), default ''Id of the provider.
createdint, default 0When the row was made (Unix time).
processedint, default 0When it was processed.

Indexes: cjwnl_sms_inbound_phone (phone_number).

cjwnl_import_mapping

Area N6 Import/export and migration, class CjwNewsletterImportMapping (classes/importexport/cjwnewsletterimportmapping.php). A stored column mapping for CSV imports.

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
namevarchar(255), default ''Name shown in the import form.
list_contentobject_idint, default 0Content object id of the newsletter list (0 = every list, or the global default).
mappingtext, nullJSON: column index or header => field ([ImportMappingSettings] MappableFields[]) or ignore.
delimitervarchar(5), default ;Field delimiter.
has_headertinyint (0/1), default 11 = the first row holds the column names.
encodingvarchar(20), default UTF-8Encoding of the file.
consent_sourcevarchar(100), default ''Source written to the consent log.
creator_contentobject_idint, default 0Content object id of the user who made it.
createdint, default 0When the row was made (Unix time).
modifiedint, default 0When the row was last changed (Unix time).

Indexes: cjwnl_import_mapping_list (list_contentobject_id).

cjwnl_migration_log

Area N6 Import/export and migration, class CjwNewsletterMigrationLog (classes/importexport/cjwnewslettermigrationlog.php). One row of the old eznewsletter tables that ext:cjw_newsletter:import-eznewsletter read. The old tables are never changed.

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
run_idvarchar(40), default ''Id of the run.
source_tablevarchar(100), default ''Old table (ezsubscription, ezsubscriptionuserdata, ...).
source_idvarchar(100), default ''Key of the old row.
target_tablevarchar(100), default ''cjwnl table written.
target_idint, default 0Id written; 0 = none.
actionvarchar(20), default ''created, merged, skipped or failed.
is_dry_runtinyint (0/1), default 01 = a dry run, nothing was written.
messagetext, nullDetails.
createdint, default 0When the row was made (Unix time).

Indexes: cjwnl_migration_log_run (run_id); cjwnl_migration_log_source (source_table, source_id).

4.3.0

Added by the 4.3 update.

cjwnl_segment

Class CjwNewsletterSegment (classes/segments/). A saved segment of a newsletter list.

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
list_contentobject_idint, default 0Content object id of the newsletter list.
namevarchar(255), default ''Name of the segment.
match_modevarchar(3), default allall = a subscriber must meet every condition, any = at least one.
conditionstext, nullJSON list of the conditions.
creator_contentobject_idint, default 0Content object id of the user who made it.
createdint, default 0When the row was made (Unix time).
modifiedint, default 0When the row was last changed (Unix time).

Indexes: cjwnl_segment_list (list_contentobject_id).

cjwnl_series

Class CjwNewsletterSeries (classes/series/). The welcome series of a newsletter list (one per list).

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
list_contentobject_idint, default 0Content object id of the newsletter list.
segment_idint, default 0Segment a member must belong to when a step is sent; 0 = every member.
statusint, default 00 = active, 1 = paused; a new series is saved paused.
creator_contentobject_idint, default 0Content object id of the user who made it.
createdint, default 0When the row was made (Unix time).
modifiedint, default 0When the row was last changed (Unix time).

Indexes: cjwnl_series_list (list_contentobject_id, unique).

cjwnl_series_step

Class CjwNewsletterSeriesStep. One step of a series: an edition and the days to wait.

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
series_idint, default 0Id of the series.
positionint, default 0Order of the step within the series.
edition_contentobject_idint, default 0Content object id of the edition sent in this step.
delay_daysint, default 0Days after the previous step (after entering, for the first step).
createdint, default 0When the row was made (Unix time).
modifiedint, default 0When the row was last changed (Unix time).

Indexes: cjwnl_series_step_pos (series_id, position, unique).

cjwnl_series_member

Class CjwNewsletterSeriesMember. A subscription in a series and how far it has come.

ColumnTypeMeaning
idint, auto incrementKey (auto increment).
series_idint, default 0Id of the series.
subscription_idint, default 0Id of the subscription.
newsletter_user_idint, default 0Id of the newsletter user.
enteredint, default 0When the subscription entered the series (Unix time).
last_positionint, default 0Position of the last step received.
last_sentint, default 0When the last step was queued (Unix time).
pending_send_idint, default 0Send that holds the step now in progress; 0 = none.
pending_positionint, default 0Position of that step.

Indexes: cjwnl_series_member_sub (series_id, subscription_id, unique); cjwnl_series_member_pending (pending_send_id).

New columns

TableColumnTypeMeaning
cjwnl_edition_sendsegment_idint, default 0Segment the send goes to; 0 = the whole list.
cjwnl_edition_send_itemperson_trackingtinyint, default 0Bit field: 1 = links tracked per person, 2 = open pixel tracked per person.
cjwnl_edition_sendseries_step_idint, default 0Series step the send belongs to; 0 = not a series send.

Something wrong on this page? Report an error

Documentation license

This page is part of the documentation of the extension cjw_newsletter and is distributed under the license of that extension.