spring-projects / spring-projects/spring-ai

[JdbcChatMemory] Initialize database schema under different user

Open
#3,018 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage
Dominant language
Java
Stars
9.5k
Forks
2.9k
Avg merge
1d 10h
Merged PRs (30d)
5

Description

Please do a quick search on GitHub issues first, the feature you are about to request might have already been requested.

Expected Behavior

For JdbcChatMemory I would like to initialize database schema under different user than used un DataSource.

Current Behavior

Database schema initialized under user defined in datasource.

Context

In production-ready systems different database users have different permissions - ones on DDL, others on DML, so it would be useful to initialize schema under different user.

As a workaround, we can use spring.sql.init properties, where custom custom username/password can be set. But we need to copy initialization script.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with JdbcChatMemory's database schema initialization and compare it with the spring.sql.init workaround described in the issue. Determine how separate schema-initialization credentials could be supplied without copying the initialization script. Done means the schema can be initialized under a user different from the DataSource user, with the existing initialization behavior preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.