Skip to content

Commit 638adde

Browse files
committed
fix: address PR #49 feedback for sample data and documentation
- Remove @FutureOrPresent validation from Event entity to allow historical events and ensure sample data loads regardless of date - Add security warning to compose.yaml clarifying credentials are for local development only - Add MariaDB-specific syntax note to data-local.sql
1 parent a489a74 commit 638adde

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

compose.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Local Development Database Configuration
2+
# WARNING: These credentials are for LOCAL DEVELOPMENT ONLY.
3+
# Production deployments MUST use secure credentials managed through
4+
# environment variables or secrets management systems.
5+
16
services:
27
mariadb:
38
image: mariadb:11.6

src/main/java/com/digitalsanctuary/spring/demo/event/Event.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import jakarta.persistence.Table;
1111
import jakarta.validation.constraints.NotBlank;
1212
import jakarta.validation.constraints.NotNull;
13-
import jakarta.validation.constraints.FutureOrPresent;
1413
import lombok.Data;
1514

1615
@Data
@@ -31,7 +30,6 @@ public class Event {
3130
private String location;
3231

3332
@NotNull(message = "Event date is required")
34-
@FutureOrPresent(message = "Event date must be today or in the future")
3533
private LocalDate date;
3634

3735
@NotNull(message = "Event time is required")

src/main/resources/data-local.sql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
-- Test data for local development
2-
-- Uses INSERT IGNORE to skip if data already exists
1+
-- Test data for local development (MariaDB)
2+
-- Note: Uses INSERT IGNORE syntax specific to MySQL/MariaDB
3+
-- For PostgreSQL, use INSERT ... ON CONFLICT DO NOTHING instead
34

45
INSERT IGNORE INTO events (id, name, description, location, date, time)
56
VALUES

0 commit comments

Comments
 (0)