refactor: migrate to a new template-based database generation system - #12
refactor: migrate to a new template-based database generation system#12teetangh wants to merge 2 commits into
Conversation
teetangh
commented
Oct 10, 2025
- Removed legacy database generation scripts and replaced them with a new template-based approach for generating RLS policies and database triggers.
- Introduced separate generators for policies and triggers, enhancing maintainability and organization.
- Updated README and documentation to reflect the new structure and usage instructions.
- Ensured all SQL content is now organized in reusable templates for better clarity and collaboration.
- Removed legacy database generation scripts and replaced them with a new template-based approach for generating RLS policies and database triggers. - Introduced separate generators for policies and triggers, enhancing maintainability and organization. - Updated README and documentation to reflect the new structure and usage instructions. - Ensured all SQL content is now organized in reusable templates for better clarity and collaboration.
Summary of ChangesHello @teetangh, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly refactors the database generation process by introducing a new template-based system. This change aims to improve the maintainability, organization, and clarity of RLS policies and database triggers. By separating generation logic from SQL content and utilizing reusable templates, the system becomes more robust and easier to manage, while also removing outdated legacy scripts. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This is a great refactoring that significantly improves the database generation process by migrating to a template-based system. The separation of concerns between Dart logic and SQL templates enhances maintainability and clarity. The removal of legacy scripts and the addition of comprehensive schema grants are excellent improvements. I've found one area with some code duplication that could be addressed to fully align with the new template-based approach.
- Introduced a new SQL policy to allow anonymous users to access consultant names and images for discovery purposes. - Updated the policy generation logic to include the new public profile read policy specifically for the User model. - Ensured existing policies are dropped before new ones are created for better management.