< Requests for comment < Associated namespaces

Preliminary notes

See: User:Skizzerz/Namespaces#Preliminary_notes

Planning

New database schemas

  • New namespace table needed to hold namespace relational data, based on previous work by Skizzerz.
  • Cannot guarantee that a talk namespace number will directly follow the namespace it is tied to, so this change needs to be reflected in code.
Schema for namespace table
FieldTypeExtraNotes
ns_idintNOT NULL PRIMARY KEY
  • Namespace id, tied to NS_* constant.
  • Cannot autoincrement due to negative namespace numbers
ns_canonical_namevarchar(32)NOT NULL
  • Canonical namespace name
ns_local_namevarchar(64)NOT NULL
  • Localized namespace name
    • The (primary) name in the content language
ns_settingsjson/blobNOT NULL DEFAULT ""
  • Index nl_namespace_name on nl_namespace and nl_name
  • Unique index nl_namespace_default on nl_namespace and nl_default
namespace_relations
FieldType
nsr_idint
nsr_from_idint (corresponds to ns_id)
nsr_target_idint (corresponds to ns_id)
nsr_typevarchar(32)
  • Type of namespace from a predefined list.
  • Possible options: talk, documentation, schema, data-item, dataproperty...

Example

idfrom_idtarget_idtype
01110talk
11610documentation
21710schema
31116talk
41117talk

See also

This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.