{ "databaseChangeLog": [ { "changeSet": { "id": "Add buildings_researches table", "author": "anibus", "changes": [ { "createTable": { "tableName": "buildings_researches", "columns": [ { "column": { "name": "building_id", "type": "int", "constraints": { "nullable": false } } }, { "column": { "name": "research_id", "type": "int", "constraints": { "nullable": false } } } ] } }, { "addUniqueConstraint": { "columnNames": "building_id, research_id", "constraintName": "uc_buildings_researches_research_id_building_id", "tableName": "buildings_researches" } }, { "addForeignKeyConstraint": { "baseColumnNames": "building_id", "baseTableName": "buildings_researches", "constraintName": "fk_buildings_buildings_researches", "referencedColumnNames": "id", "referencedTableName": "buildings", "onDelete": "CASCADE" } }, { "addForeignKeyConstraint": { "baseColumnNames": "research_id", "baseTableName": "buildings_researches", "constraintName": "fk_researches_buildings_researches", "referencedColumnNames": "id", "referencedTableName": "researches", "onDelete": "CASCADE" } } ] } } ] }