mirror of
https://github.com/Example-uPagge/liquibase.git
synced 2024-06-14 12:22:25 +03:00
first way link tables
This commit is contained in:
parent
5897d109e6
commit
e1d2a0a210
@ -21,4 +21,16 @@
|
||||
</addColumn>
|
||||
</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>
|
Loading…
Reference in New Issue
Block a user