spring-projects / spring-projects/spring-session

Use %TABLE_NAME% placeholders in JdbcIndexedSessionRepository schema scripts

Open
#2,225 2 comments 0 reactions 1 assignee View on GitHub

@marcusdacoregio is already working on this.

Since Jan 19, 2023.

in: jdbc type: breaks-passivity type: enhancement
Dominant language
Java
Stars
1.9k
Forks
1.2k
Avg merge
4h 27m
Merged PRs (30d)
55

Description

Expected Behavior
Currently schema SQL files shipped in org.springframework.session.jdbc have hard-coded table names despite JdbcIndexedSessionRepository offering a setTableName method.

It would be helpful if the scripts could use %TABLE_NAME% placeholders much like the SQL defined in JdbcIndexedSessionRepository constants. That way the schema could be modified before it's run to generate expected table names.

Current Behavior
Scripts always generate tables with the name or prefix SPRING_SESSION.

Context
See https://github.com/spring-projects/spring-boot/issues/33748 for background.

I'm not sure if changing the SQL will break existing users since they'll need to remember to perform the search and replace. Perhaps a utility method could be provided to take care of this.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.