таблица lms_content, связь с task

This commit is contained in:
Anton Dzyk
2025-12-14 11:00:20 +03:00
parent ea4bfe281f
commit 3997e2d2ab
23 changed files with 298 additions and 17 deletions
+11 -1
View File
@@ -1,5 +1,12 @@
spring:
jpa:
# Показывать SQL запросы
show-sql: true
properties:
hibernate:
format_sql: true
application:
name: lti-provider
@@ -12,4 +19,7 @@ spring:
server:
port: 9999
logging:
level:
org.hibernate.SQL: DEBUG
org.hibernate.type.descriptor.sql.BasicBinder: TRACE
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8" ?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.10.xsd"
objectQuotingStrategy="QUOTE_ONLY_RESERVED_WORDS">
<changeSet id="2025-12-01" author="dzyk">
<createTable tableName="lms_content">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true" primaryKeyName="PK_LMS_CONTENT"/>
</column>
<column name="deployment_id" type="uuid"/>
<column name="content_key" type="bigint"/>
<column name="content_uuid" type="uuid"/>
<column name="task_id" type="bigint"/>
</createTable>
<addForeignKeyConstraint
baseTableName="lms_content"
baseColumnNames="task_id"
constraintName="fk_lms_content_task"
referencedTableName="task"
referencedColumnNames="id"
onDelete="NO ACTION"/>
</changeSet>
</databaseChangeLog>
@@ -10,7 +10,7 @@
<createTable tableName="task">
<column autoIncrement="true" name="task_id" type="BIGINT">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true" primaryKeyName="PK_TASK"/>
</column>
@@ -9,5 +9,6 @@
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd">
<include file="/db/changelog/1.0.0/2025-12-add_task.xml"/>
<include file="/db/changelog/1.0.0/2025-12-add_lms_content.xml"/>
</databaseChangeLog>