SR2 SupportCenterCaps

Contact Support
 

Email:
support@refreshsoftware.com

Phone:
508-318-4480


  Link to this page

Home >  Developer Resources >  Asset Types >  Creating an Asset Type Table

Creating an Asset Type Table

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:

  • activateDate
  • author
  • assetTypeID
  • assetID
  • assetname 
  • currentVersionID
  • expireDate
  • familyChildren
  • filter
  • filename
  • fxml
  • location
  • method
  • name
  • nextStep
  • notes
  • oid
  • pageTypeID
  • pageID 
  • pagename
  • proceed2
  • publish
  • publishedVersionID 
  • pvid 
  • restoreID
  • templateID
  • title
  • versionnum
  • workflowID

 

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);