Adds the sqlc query layer for email campaigns#350
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds the sqlc query layer for email_campaigns so the API's database package can create, fetch, list, and update campaign records before repository/service wiring is added. It also regenerates the sqlc output to align generated headers with the repository's pinned sqlc version.
Changes:
- Added new
email_campaigns.sqlqueries for create/get/list/update/status-update operations. - Added generated sqlc bindings and model support for the new
email_campaignstable. - Regenerated existing sqlc files so their version headers match
sqlc v1.30.0.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/api/internal/database/sqlc/workshops.sql.go | Regenerated header version only. |
| apps/api/internal/database/sqlc/users.sql.go | Regenerated header version only. |
| apps/api/internal/database/sqlc/teams.sql.go | Regenerated header version only. |
| apps/api/internal/database/sqlc/team_members.sql.go | Regenerated header version only. |
| apps/api/internal/database/sqlc/team_join_requests.sql.go | Regenerated header version only. |
| apps/api/internal/database/sqlc/team_invitations.sql.go | Regenerated header version only. |
| apps/api/internal/database/sqlc/stats.sql.go | Regenerated header version only. |
| apps/api/internal/database/sqlc/sessions.sql.go | Regenerated header version only. |
| apps/api/internal/database/sqlc/redeemables.sql.go | Regenerated header version only. |
| apps/api/internal/database/sqlc/models.go | Regenerated header version; includes existing email campaign model/types. |
| apps/api/internal/database/sqlc/interest_submissions.sql.go | Regenerated header version only. |
| apps/api/internal/database/sqlc/hackathons.sql.go | Regenerated header version only. |
| apps/api/internal/database/sqlc/email_campaigns.sql.go | New generated Go bindings for email campaign queries. |
| apps/api/internal/database/sqlc/db.go | Regenerated header version only. |
| apps/api/internal/database/sqlc/bat_runs.sql.go | Regenerated header version only. |
| apps/api/internal/database/sqlc/applications.sql.go | Regenerated header version only. |
| apps/api/internal/database/sqlc/accounts.sql.go | Regenerated header version only. |
| apps/api/internal/database/queries/email_campaigns.sql | New source sqlc query definitions for email campaign CRUD/status operations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| scheduled_at = | ||
| CASE WHEN @scheduled_at_do_update::boolean | ||
| THEN @scheduled_at::timestamptz |
| scheduled_at = | ||
| CASE WHEN @scheduled_at_do_update::boolean | ||
| THEN @scheduled_at::timestamptz |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
@copilot apply changes based on the comments in this thread |
…eries Agent-Logs-Url: https://github.com/swamphacks/core/sessions/1e2e08e9-0737-47dd-8a01-bddead1ad570 Co-authored-by: williamchiii <188648862+williamchiii@users.noreply.github.com>
Applied in commit |
|
I had no idea this was possible lol |
Description
Adds the sqlc query layer for email campaigns.
This includes queries to create, fetch, list, update, and update the status of email campaigns. The generated sqlc code has also been updated so future repository/service work can call the new campaign database methods.
This also updates the generated sqlc files from
sqlc v1.31.1tosqlc v1.30.0, matching the version used by the GitHub Actions sqlc workflow.This builds on the email campaign schema and does not add API routes or sending logic yet.
Type of Change
Checklist
Additional Notes
No API behavior changes in this PR. This is database/query layer only.
Added the following SQL queries: