summaryrefslogtreecommitdiff
path: root/www/wiki/maintenance/mssql/archives/patch-content.sql
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/maintenance/mssql/archives/patch-content.sql')
-rw-r--r--www/wiki/maintenance/mssql/archives/patch-content.sql21
1 files changed, 21 insertions, 0 deletions
diff --git a/www/wiki/maintenance/mssql/archives/patch-content.sql b/www/wiki/maintenance/mssql/archives/patch-content.sql
new file mode 100644
index 00000000..c5b079ab
--- /dev/null
+++ b/www/wiki/maintenance/mssql/archives/patch-content.sql
@@ -0,0 +1,21 @@
+--
+-- 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 NOT NULL CONSTRAINT PK_content PRIMARY KEY IDENTITY,
+
+ -- 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 varchar(32) NOT NULL,
+
+ -- reference to model_id
+ content_model smallint unsigned NOT NULL CONSTRAINT FK_content_content_models FOREIGN KEY REFERENCES /*_*/content_models(model_id),
+
+ -- URL-like address of the content blob
+ content_address nvarchar(255) NOT NULL
+); \ No newline at end of file