feat: add automatic database schema initialization and readme#27
Conversation
- Add schema.sql for automatic table creation on startup - Configure Spring SQL initialization (mode: always) - Add docker-compose.yml for PostgreSQL setup - Update README with comprehensive setup guide and database documentation - Document automatic table creation feature and configuration Database tables (users, refresh_tokens) now auto-create on application startup. No manual database setup required for local development. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR adds automatic database schema initialization to simplify local development setup, eliminating the need for manual database configuration. It includes Docker Compose for PostgreSQL and comprehensive README documentation.
Key Changes:
- Automatic database table creation via Spring SQL initialization with
schema.sql - Docker Compose configuration for local PostgreSQL instance
- Comprehensive README with setup instructions, API documentation, and configuration examples
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| docker-compose.yml | Adds PostgreSQL 16 Alpine container configuration with volume persistence for local development |
| apigateway/src/main/resources/schema.sql | Defines database schema with users and refresh_tokens tables, including indexes for performance |
| apigateway/src/main/resources/application.yaml | Configures Spring SQL initialization to run schema.sql automatically on startup |
| README.md | Adds comprehensive documentation covering setup, API endpoints, configuration, database schema, and project structure |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ntion
- Update database name from 'mydatabase' to 'auth_gateway_db' across all configuration files
- Rename refresh token endpoint from '/auth/switch-jwt/{token}' to '/auth/refresh/{token}' for RESTful naming
- Update application.yaml with consistent database URL and public URL patterns
- Enhance README documentation with production-ready SQL initialization guidance
- Add recommendation for Flyway/Liquibase for production database migrations
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…yAuthController.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Hey @DenizAltunkapan @DevEpso! 👋 Hope you're doing well! I've updated this PR to address the review feedback and would love to get your thoughts when you have a chance. Question I'd love your input on: For the Option 1:
Option 2:
My suggestion: What do you think about using Would really appreciate your thoughts on this! Thanks for taking the time to review 😊 |
DenizAltunkapan
left a comment
There was a problem hiding this comment.
thanks! @matthewhou19
Summary
Linked issue
Closes #25
How to test
Notes / Risk
I use Docker to run the database, ensuring we can develop and test the repository independently.