From 31f53a1d522f97e4b59a88fd9f1d5175ce38fef6 Mon Sep 17 00:00:00 2001 From: namdh861 Date: Thu, 13 Aug 2026 21:09:59 +0700 Subject: [PATCH] feat: add dependency --- pom.xml | 7 +++++++ src/main/resources/application.yaml | 12 ++++++------ src/main/resources/db/migration/V1__init.sql | 8 ++++++++ 3 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 src/main/resources/db/migration/V1__init.sql diff --git a/pom.xml b/pom.xml index 28cd3d0..a02711a 100644 --- a/pom.xml +++ b/pom.xml @@ -117,6 +117,13 @@ + + + gitlab-maven + https://gitlab.com/api/v4/projects/85282705/packages/maven + + + diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 932eb80..1a72aa8 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -9,18 +9,18 @@ spring: jpa: hibernate: - ddl-auto: update + ddl-auto: validate properties: hibernate: default_schema: lms format_sql: true show-sql: true -# flyway: -# enabled: true -# default-schema: lms -# schemas: lms -# locations: classpath:db/migration + flyway: + enabled: true + default-schema: lms + schemas: lms + locations: classpath:db/migration springdoc: swagger-ui: diff --git a/src/main/resources/db/migration/V1__init.sql b/src/main/resources/db/migration/V1__init.sql new file mode 100644 index 0000000..fedd605 --- /dev/null +++ b/src/main/resources/db/migration/V1__init.sql @@ -0,0 +1,8 @@ +-- Flyway Migration V1: Initial schema +-- Creates courses table + +CREATE TABLE IF NOT EXISTS courses ( + id BIGSERIAL PRIMARY KEY, + title VARCHAR(200) NOT NULL, + description VARCHAR(1000) +); \ No newline at end of file