Skip to content

Conversation

Copy link

Copilot AI commented Jan 31, 2026

Adds PostgreSQL as a third datamodel backend alongside the existing Firestore and Memory implementations.

Changes

  • New module datamodel-postgres with Spring Data JPA

    • Entity classes mapping to 8 PostgreSQL tables
    • JPA repositories with query methods for pagination and lookups
    • Repository implementations for all 5 datamodel interfaces
    • Spring config activated via datamodel-postgres profile
  • Documentation

    • docs/modules/datamodel/postgres.md with config reference and DDL schema
    • Updated index to list Postgres alongside other implementations

Usage

# application.properties
spring.profiles.active=datamodel-postgres
spring.datasource.url=jdbc:postgresql://localhost:5432/sac
spring.datasource.username=user
spring.datasource.password=pass
spring.jpa.hibernate.ddl-auto=update

Structure

datamodel-postgres/
├── entity/          # JPA entities (AuthorizationEntity, ClientEntity, etc.)
├── repository/      # JpaRepository interfaces + Postgres*Repository impls
├── mapper/          # MapStruct mapper for pagination DTOs
└── config/          # DatamodelPostgresConfig (@Profile("datamodel-postgres"))
Original prompt

Implement a new datamodel for this appliation. Currently it only supports Firestore and Memory. I want a Postgres backend to be implemented. Take care to analyze the Firestore implementation so you understand where and how the other modules need to be updated, the file structures used to implement a data model, and the documentation required.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…itory implementations

Co-authored-by: JaredHatfield <208119+JaredHatfield@users.noreply.github.com>
Copilot AI changed the title [WIP] Add PostgreSQL backend to data model implementation Add PostgreSQL datamodel implementation Jan 31, 2026
Copilot AI requested a review from JaredHatfield January 31, 2026 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants