first way link tables

This commit is contained in:
uPagge 2021-03-08 16:52:36 +03:00
parent 5897d109e6
commit e1d2a0a210
No known key found for this signature in database
GPG Key ID: 964B40928E4C9088

View File

@ -21,4 +21,16 @@
</addColumn> </addColumn>
</changeSet> </changeSet>
<changeSet id="create-table-book" author="uPagge">
<createTable tableName="book">
<column name="id" type="int" autoIncrement="true">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="varchar(64)"/>
<column name="author_id" type="int">
<constraints foreignKeyName="book_author_id_person_id" references="person(id)" deleteCascade="true"/>
</column>
</createTable>
</changeSet>
</databaseChangeLog> </databaseChangeLog>