Merge "Allow programmatic input in Command"
[lhc/web/wiklou.git] / maintenance / mssql / archives / patch-content.sql
1 --
2 -- The content table represents content objects. It's primary purpose is to provide the necessary
3 -- meta-data for loading and interpreting a serialized data blob to create a content object.
4 --
5 CREATE TABLE /*_*/content (
6
7 -- ID of the content object
8 content_id bigint unsigned NOT NULL CONSTRAINT PK_content PRIMARY KEY IDENTITY,
9
10 -- Nominal size of the content object (not necessarily of the serialized blob)
11 content_size int unsigned NOT NULL,
12
13 -- Nominal hash of the content object (not necessarily of the serialized blob)
14 content_sha1 varchar(32) NOT NULL,
15
16 -- reference to model_id
17 content_model smallint unsigned NOT NULL CONSTRAINT FK_content_content_models FOREIGN KEY REFERENCES /*_*/content_models(model_id),
18
19 -- URL-like address of the content blob
20 content_address nvarchar(255) NOT NULL
21 );