spring-projects / spring-projects/spring-ai
[JdbcChatMemory] Initialize database schema under different user
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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