Change log for presets
#CTCTOWALTZ-2515
remarks="the kind of entity this diagram is aggregating"/>
</changeSet>
+
+ <changeSet id="20220606-6085-1"
+ author="woodjes">
+ <comment>6001: create aggregate_overlay_diagram_preset table</comment>
+ <createTable tableName="aggregate_overlay_diagram_preset">
+ <column name="id"
+ type="${id.type}"
+ autoIncrement="true">
+ <constraints nullable="false"
+ primaryKey="true"
+ primaryKeyName="aggregate_overlay_diagram_preset_pkey"/>
+ </column>
+ <column name="diagram_id"
+ type="${id.type}">
+ <constraints nullable="false"/>
+ </column>
+ <column name="name"
+ type="${name.type}">
+ <constraints nullable="false"/>
+ </column>
+ <column name="description"
+ type="${description.type}">
+ <constraints nullable="true"/>
+ </column>
+ <column name="external_id"
+ type="${external-id.type}">
+ <constraints nullable="false"/>
+ </column>
+ <column name="overlay_config"
+ type="${longvarchar.type}">
+ <constraints nullable="false"/>
+ </column>
+ <column name="filter_config"
+ type="${longvarchar.type}">
+ <constraints nullable="false"/>
+ </column>
+ <column name="last_updated_at"
+ type="TIMESTAMP"
+ defaultValueComputed="${now.value}">
+ <constraints nullable="false"/>
+ </column>
+ <column name="last_updated_by"
+ type="${name.type}">
+ <constraints nullable="false"/>
+ </column>
+ <column name="provenance"
+ type="${provenance.type}"
+ defaultValue="waltz">
+ <constraints nullable="false"/>
+ </column>
+ </createTable>
+ </changeSet>
+
+ <changeSet id="20220606-6085-2"
+ author="woodjes">
+ <comment>6085: Add fk to aggregate_overlay_diagram_preset</comment>
+ <addForeignKeyConstraint baseTableName="aggregate_overlay_diagram_preset"
+ baseColumnNames="diagram_id"
+ constraintName="agg_overlay_diag_preset_diag_id_fkey"
+ referencedTableName="aggregate_overlay_diagram"
+ referencedColumnNames="id"
+ onDelete="CASCADE"/>
+ </changeSet>
+
+
</databaseChangeLog>
