- Added Flyway sql scripts

- Added SQL constraints added to respective tables see list below:
-- video_playlist: video_id playlist_id
-- Foreign keys reference originals, on delete cascade on both
- Added Java JPA Entity column name mapping to snake_case instead of using base Java camelCase
This commit is contained in:
Reeverflow
2026-03-08 18:17:17 +01:00
parent 4b70387ed5
commit 3a97f29170
12 changed files with 66 additions and 9 deletions

23
pom.xml
View File

@@ -44,14 +44,22 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webmvc</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.40</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-database-postgresql</artifactId>
<version>12.0.3</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-flyway</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
@@ -81,6 +89,17 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>12.0.1</version>
<configuration>
<url>jdbc:postgresql://127.0.0.1:5432/videos</url>
<user>postgres</user>
<password>5995</password>
<cleanDisabled>false</cleanDisabled>
</configuration>
</plugin>
</plugins>
</build>