The "xwikiattachment" Table

The xwikiattachment table corresponds to the com.xpn.xwiki.doc.XWikiAttachment class and it stores attachment related information, content and versions excluded.

The mapping information is available in the xwiki.hbm.xml file:

<class name="com.xpn.xwiki.doc.XWikiAttachment" table="xwikiattachment">
 <id name="id" type="long" unsaved-value="undefined">
   <column name="XWA_ID" not-null="true" />
   <generator class="assigned" />
 </id>
 <property name="docId" type="long" column="XWA_DOC_ID" index="ATT_DOC_ID" />
 <property name="filename" type="string" column="XWA_FILENAME" length="255" not-null="true" />
 <property name="filesize" type="integer" column="XWA_SIZE" />
 <property name="date" type="timestamp" column="XWA_DATE" index="ATT_DATE" not-null="true" />
 <property name="author" type="string" column="XWA_AUTHOR" length="255" index="ATT_AUTHOR" />
 <property name="version" type="string" column="XWA_VERSION" length="255" not-null="true" />
 <!-- Align the max comment size with the document max comment size (i.e. XWD_COMMENT) -->
 <property name="comment" type="string" column="XWA_COMMENT" length="1023" />
</class>

The columns of the xwikiattachment table are:

ColumnData typeClass propertyDefault valuenot-nullIndex
XWA_ID (primary key)bigint(20)-0true-
XWA_DOC_IDbigint(20)docIdnullfalseATT_DOC_ID
XWA_FILENAMEvarchar(255)filename-true-
XWA_SIZEint(11)filesizenullfalse-
XWA_DATEdatetimedate0000-00-00 00:00:00trueATT_DATE
XWA_AUTHORvarchar(255)authornullfalseATT_AUTHOR
XWA_VERSIONvarchar(255)version -true-
XWA_COMMENTvarchar(1023)commentnullfalse-

   

Search this space