diff --git a/.gitignore b/.gitignore index a021d0f..4df36d0 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ out/ /gradle/ /src/main/resources/public/ /logs/application.log +/logs/ diff --git a/src/main/java/com/jambotronGroup/jambotron/model/DataBaseSettings.java b/src/main/java/com/jambotronGroup/jambotron/model/DataBaseSettings.java new file mode 100644 index 0000000..7c8d2dd --- /dev/null +++ b/src/main/java/com/jambotronGroup/jambotron/model/DataBaseSettings.java @@ -0,0 +1,49 @@ +package com.jambotronGroup.jambotron.model; + +import jakarta.persistence.*; + +@Entity +@Table(name = "DataBaseSettings") +public class DataBaseSettings { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + + + @Column(length = 20) + private String name; + + @Column(length = 20) + private String url; + + @Column(length = 20) + private String userName; + + @Column(length = 20) + private String password; + + + + + public DataBaseSettings(String name) { + this.name = name; + } + + + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/src/main/resources/db/migration/V5__Fixes.sql b/src/main/resources/db/migration/V5__Fixes.sql new file mode 100644 index 0000000..8c1492e --- /dev/null +++ b/src/main/resources/db/migration/V5__Fixes.sql @@ -0,0 +1,2 @@ +ALTER TABLE IF EXISTS public.tutorials + ALTER COLUMN id ADD GENERATED ALWAYS AS IDENTITY; \ No newline at end of file