wiki.techinc.nl/maintenance/archives/patch-content.sql
daniel 943c724198 MCR database schema
Schema additions/updates for MySQL, SQLite, PostgreSQL, MSSQL
and Oracle to add new tables:

* content
* content_models
* slots
* slot_roles

See also https://www.mediawiki.org/wiki/Multi-Content_Revisions/Database_Schema

Bug: T174028
Change-Id: I30a3a9834d54d0e6957553d91908b2b73b2c802f
2017-12-23 17:43:09 -05:00

21 lines
No EOL
735 B
SQL

--
-- The content table represents content objects. It's primary purpose is to provide the necessary
-- meta-data for loading and interpreting a serialized data blob to create a content object.
--
CREATE TABLE /*_*/content (
-- ID of the content object
content_id bigint unsigned PRIMARY KEY AUTO_INCREMENT,
-- Nominal size of the content object (not necessarily of the serialized blob)
content_size int unsigned NOT NULL,
-- Nominal hash of the content object (not necessarily of the serialized blob)
content_sha1 varbinary(32) NOT NULL,
-- reference to model_id
content_model smallint unsigned NOT NULL,
-- URL-like address of the content blob
content_address varbinary(255) NOT NULL
) /*$wgDBTableOptions*/;