Attestation table
<!-- 1220: Perspective Rating -->
-
<changeSet author="dwatkins"
id="20170201-1220-1">
<createTable tableName="perspective_rating">
</createTable>
</changeSet>
+
+ <!-- 1366: Attestation -->
+ <changeSet author="kamransaleem"
+ id="20170201-1366-1">
+ <createTable tableName="attestation">
+ <column name="id"
+ autoIncrement="true"
+ type="${id.type}">
+ <constraints nullable="false"
+ primaryKey="true"
+ primaryKeyName="attestation_pkey"/>
+ </column>
+ <column name="entity_kind"
+ type="${enum.type}">
+ <constraints nullable="false"/>
+ </column>
+ <column name="entity_id"
+ type="${id.type}">
+ <constraints nullable="false"/>
+ </column>
+ <column name="attestation_type"
+ type="${enum.type}">
+ <constraints nullable="false"/>
+ </column>
+ <column name="attested_by"
+ type="${name.type}">
+ <constraints nullable="false"/>
+ </column>
+ <column name="attested_at"
+ type="TIMESTAMP"
+ defaultValueComputed="${now.value}"/>
+ <column name="comments"
+ type="${description.type}">
+ <constraints nullable="true"/>
+ </column>
+ </createTable>
+ </changeSet>
+
+ <changeSet author="kamransaleem"
+ id="20170201-1366-2">
+ <createIndex indexName="idx_attestation_entity"
+ tableName="attestation"
+ unique="false">
+ <column name="entity_id" type="${id.type}"/>
+ <column name="entity_kind" type="${enum.type}"/>
+ </createIndex>
+ </changeSet>
+
</databaseChangeLog>
