When creating an Asset Type table, the only required field is one named "id" and it should have a data type of VARCHAR (32) (SQL Server) or VARCHAR2(32) (Oracle). SiteRefresh populates this field with the revision control ID field. It is important to note that this is the only field that can be marked as unique. This is because, for each revision, a new record is appended to the table, so duplicates can easily result.
Reserved Names
Do not use any of the following reserved field names in a Asset Type table:
|
|
Create Table Example
SQL Server
CREATE TABLE general ( Id varchar(32) PRIMARY KEY FOREIGN KEY REFERENCES assetVersions(ID), content text );
Oracle
CREATE TABLE general (
Id varchar2(32) PRIMARY KEY,
content clob
);
ALTER TABLE general ADD
FOREIGN KEY (id) REFERENCES assetVersions(id);