Extension:CentralNotice/Database schema

From MediaWiki.org
Jump to: navigation, search

This page documents all the tables that CentralNotice will create upon installation.

cn_notices[edit]

Stores details on all the campaigns known to CentralNotice.

Key Name Type Default Description
primary not_id int NOT NULL AUTO_INCREMENT 0 Identifying key for the campaign.
not_name varchar(255) NOT NULL NULL Friendly name of the campaign; displayed to the users and reported to analytics.
not_start char(14) NOT NULL NULL MediaWiki datetime string representing when this campaign should auto-start if enabled.
not_end char(14) NOT NULL NULL MediaWiki datetime string representing when this campaign should auto-end if enabled.
not_enabled tinyint(1) NOT NULL NULL Boolean value determining if the campaign is set to auto-start/end. 0 = will not auto-start/end.
not_language
Removed: v2.3
Deprecated: v?
Long deprecated; unknown what we originally used it for.
not_project
Removed: v2.3
Deprecated: v?
Long deprecated; unknown what we originally used it for.
not_preferred tinyint(1) NOT NULL 0 Priority level of the campaign. Lower numbers have higher priority.
not_locked tinyint(1) NOT NULL 0 Boolean value indicating if editing is allowed on this campaign. 0 = editing allowed.
not_geo tinyint(1) 0 Boolean value indicating if the campaign has geo-target selectors. If it does there will be a row for each country targeted in cn_notice_countries. 0 = campaign not geo-targeted.
not_buckets tinyint(1) NOT NULL 1
Since: v2.1
Integer value indicating how many buckets this campaign supports. Minimum value of 1; maximum value of $wgNoticeNumberOfControllerBuckets.
not_weight int(11) NOT NULL 0
Since: v2.3
Integer value indicating how much weight this campaign carries. Used for slot allocation within a priority level.
not_mobile_carrier tinyint(1) NOT NULL 0
Since: v2.3
Boolean value indicating if the campaign has mobile-carrier selectors. If it does there will be a row for each carrier targeted in cn_notice_mobile_carriers. 0 = campaign not carrier-targeted.
not_archived tinyint(1) NOT NULL 0
Since: v2.3
Boolean value indicating if the campaign should be shown by default on the 'campaigns' page. 0 = show by default.

cn_assignments[edit]

Associates banners to campaigns and sets any banner metadata that is campaign specific and not many to one.

Key Name Type Default Description
primary asn_id int(11) NOT NULL AUTO_INCREMENT NULL Assignment ID
not_id int(11) NOT NULL NULL Foreign key to the cn_notices table; identifying the campaign.
tmp_id int(11) NOT NULL NULL Foreign key to the cn_templates table; identifying the banner.
tmp_weight int(11) NOT NULL NULL Integer weight that shows the priority that this banner has relative to others. As of v2.3 this is restricted to the range 1 - 100 inclusive and is relative only within the associated campaign.
asn_bucket tinyint(1) 1 Bucket this banner is assigned. Should not be greater than not_buckets in the cn_notices table.

cn_templates[edit]

Stores details on all banners known to CentralNotice.

Key Name Type Default Description
primary tmp_id int(11) NOT NULL AUTO_INCREMENT NULL Identifying key for the banner.
tmp_name tmp_name varchar(255) NULL Non canonical name of the banner.
tmp_display_anon tinyint(1) NOT NULL 1 Boolean value determining if the banner should be displayed to anonymous users. 1 = show to anonymous.
tmp_display_account tinyint(1) NOT NULL 0 Boolean value determining if the banner should be displayed to logged in users. 1 = show to logged in.
tmp_fundraising tinyint(1) NOT NULL 0
Deprecated: v2.3
Boolean determining if this is a fundraising banner (affects cookies). As of v2.3 this has been replaced by the concept of categories.
tmp_autolink tinyint(1) NOT NULL 0
Deprecated: v2.3
Boolean determining if landing page links should be automatically created from tmp_landing_pages. As of v2.3 this has been replaced by the concept of banner mixins.
tmp_landing_pages varchar(255) NULL
Deprecated: v2.3
Landing pages to choose from when automatically creating links. As of v2.3 this has been replaced by the concept of banner mixins.
tmp_archived tinyint(1) NOT NULL 0 Boolean identifying if this banner should be displayed by default on the banners page. 0 = show by default.
tmp_category tinyint NOT NULL 0 Foreign key into a configuration variable determining what the hide cookie name should be and how long it lasts.
tmp_preview_sandbox tinyint NOT NULL 0 Boolean indicating if this banner must be sandboxed inside an iframe when previewing it. 1 = sandbox inside iframe.

cn_notice_languages[edit]

Stores details on all the campaigns known to CentralNotice.

Key Name Type Default Description
primary not_id int NOT NULL AUTO_INCREMENT 0 Identifying key for the campaign.


Stores details on all the campaigns known to CentralNotice.

Key Name Type Default Description
primary not_id int NOT NULL AUTO_INCREMENT 0 Identifying key for the campaign.

cn_notice_projects[edit]

Stores details on all the campaigns known to CentralNotice.

Key Name Type Default Description
primary not_id int NOT NULL AUTO_INCREMENT 0 Identifying key for the campaign.

cn_notice_countries[edit]

Stores details on all the campaigns known to CentralNotice.

Key Name Type Default Description
primary not_id int NOT NULL AUTO_INCREMENT 0 Identifying key for the campaign.

cn_known_mixins[edit]

Since: v2.3

Stores details on all the campaigns known to CentralNotice.

Key Name Type Default Description
primary not_id int NOT NULL AUTO_INCREMENT 0 Identifying key for the campaign.

cn_template_mixins[edit]

Stores details on all the campaigns known to CentralNotice.

Key Name Type Default Description
primary not_id int NOT NULL AUTO_INCREMENT 0 Identifying key for the campaign.

cn_template_messages[edit]

Stores details on all the campaigns known to CentralNotice.

Key Name Type Default Description
primary not_id int NOT NULL AUTO_INCREMENT 0 Identifying key for the campaign.

cn_known_mobile_carriers[edit]

Stores details on all the campaigns known to CentralNotice.

Key Name Type Default Description
primary not_id int NOT NULL AUTO_INCREMENT 0 Identifying key for the campaign.

cn_notice_mobile_carriers[edit]

Stores details on all the campaigns known to CentralNotice.

Key Name Type Default Description
primary not_id int NOT NULL AUTO_INCREMENT 0 Identifying key for the campaign.

cn_notice_log[edit]

Stores details on all the campaigns known to CentralNotice.

Key Name Type Default Description
primary not_id int NOT NULL AUTO_INCREMENT 0 Identifying key for the campaign.

cn_template_log[edit]

Stores details on all the campaigns known to CentralNotice.

Key Name Type Default Description
primary not_id int NOT NULL AUTO_INCREMENT 0 Identifying key for the campaign.