File tree Expand file tree Collapse file tree 5 files changed +28
-4
lines changed Expand file tree Collapse file tree 5 files changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ dependencies {
3030 compileOnly(" org.projectlombok:lombok:1.18.36" )
3131 annotationProcessor(" org.projectlombok:lombok:1.18.36" )
3232
33- implementation(" com.h2database:h2:2.2.220 " )
33+ implementation(" com.h2database:h2:2.3.232 " )
3434 implementation(" com.zaxxer:HikariCP:5.0.1" )
3535 implementation(" org.postgresql:postgresql:42.7.7" )
3636}
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ private static int getPort() {
4040
4141 private static String getDatabaseUrl () {
4242 return System .getenv ().getOrDefault ("JDBC_DATABASE_URL" ,
43- "jdbc:h2:mem:java- project-72 ;DB_CLOSE_DELAY=-1;" );
43+ "jdbc:h2:mem:project;DB_CLOSE_DELAY=-1;" );
4444 }
4545
4646 private static Javalin getApp () throws SQLException , IOException {
Original file line number Diff line number Diff line change 1+ package hexlet .code .model ;
2+
3+ import lombok .AllArgsConstructor ;
4+ import lombok .Getter ;
5+ import lombok .NonNull ;
6+ import lombok .RequiredArgsConstructor ;
7+ import lombok .Setter ;
8+
9+ import java .sql .Timestamp ;
10+
11+ @ Getter
12+ @ Setter
13+ @ AllArgsConstructor
14+ @ RequiredArgsConstructor (staticName = "of" )
15+ public class Url {
16+ private Long id ;
17+ @ NonNull private String name ;
18+ @ NonNull private Timestamp createdAt ;
19+ }
Original file line number Diff line number Diff line change 11package hexlet .code .repository ;
22
33import com .zaxxer .hikari .HikariDataSource ;
4- import lombok .AllArgsConstructor ;
54
6- @ AllArgsConstructor
75public class BaseRepository {
86 public static HikariDataSource dataSource ;
97}
Original file line number Diff line number Diff line change 1+ DROP TABLE IF EXISTS urls;
2+
3+ CREATE TABLE urls (
4+ id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY ,
5+ name VARCHAR (255 ) NOT NULL ,
6+ created_at TIMESTAMP
7+ );
You can’t perform that action at this time.
0 commit comments