1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <databaseChangeLog
3+ xmlns =" http://www.liquibase.org/xml/ns/dbchangelog"
4+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
5+ xsi : schemaLocation =" http://www.liquibase.org/xml/ns/dbchangelog
6+ http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.24.xsd"
7+ objectQuotingStrategy =" QUOTE_ONLY_RESERVED_WORDS" >
8+ <changeSet id =" 1715756012449-2" author =" georgii (generated)" >
9+ <createTable tableName =" comments" >
10+ <column autoIncrement =" true" name =" id" type =" BIGINT" >
11+ <constraints nullable =" false" primaryKey =" true" primaryKeyName =" pk_comments" />
12+ </column >
13+ <column name =" created_by" type =" VARCHAR(255)" />
14+ <column name =" created_date" type =" DATETIME" />
15+ <column name =" last_modified_by" type =" VARCHAR(255)" />
16+ <column name =" last_modified_date" type =" DATETIME" />
17+ <column name =" text" type =" VARCHAR(255)" />
18+ <column name =" author_id" type =" BIGINT" >
19+ <constraints nullable =" false" />
20+ </column >
21+ </createTable >
22+ </changeSet >
23+ <changeSet id =" 1715756012449-3" author =" georgii (generated)" >
24+ <createTable tableName =" posts_comments" >
25+ <column name =" comments_id" type =" BIGINT" >
26+ <constraints nullable =" false" primaryKey =" true" primaryKeyName =" pk_posts_comments" />
27+ </column >
28+ <column name =" post_id" type =" BIGINT" >
29+ <constraints nullable =" false" primaryKey =" true" primaryKeyName =" pk_posts_comments" />
30+ </column >
31+ </createTable >
32+ </changeSet >
33+ <changeSet id =" 1715756012449-4" author =" georgii (generated)" >
34+ <addForeignKeyConstraint baseColumnNames =" author_id" baseTableName =" comments"
35+ constraintName =" FK_COMMENTS_ON_AUTHOR" referencedColumnNames =" id"
36+ referencedTableName =" users" />
37+ </changeSet >
38+ <changeSet id =" 1715756012449-5" author =" georgii (generated)" >
39+ <addForeignKeyConstraint baseColumnNames =" comments_id" baseTableName =" posts_comments"
40+ constraintName =" fk_poscom_on_comment" referencedColumnNames =" id"
41+ referencedTableName =" comments" />
42+ </changeSet >
43+ <changeSet id =" 1715756012449-6" author =" georgii (generated)" >
44+ <addForeignKeyConstraint baseColumnNames =" post_id" baseTableName =" posts_comments"
45+ constraintName =" fk_poscom_on_post" referencedColumnNames =" id"
46+ referencedTableName =" posts" />
47+ </changeSet >
48+
49+ </databaseChangeLog >