Skip to content

fix: apply migrations at runtime#195

Closed
LeafdTK wants to merge 1 commit into
mainfrom
leafd/docker
Closed

fix: apply migrations at runtime#195
LeafdTK wants to merge 1 commit into
mainfrom
leafd/docker

Conversation

@LeafdTK
Copy link
Copy Markdown
Member

@LeafdTK LeafdTK commented Apr 24, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 24, 2026 19:38
@LeafdTK LeafdTK closed this Apr 24, 2026
@LeafdTK LeafdTK deleted the leafd/docker branch April 24, 2026 19:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates container startup behavior around Prisma schema/application lifecycle, and also introduces a new “Beest” transcript configuration.

Changes:

  • Add a new Beest transcript and register it in the transcript registry.
  • Update Docker image build/run steps to run prisma generate at build time and run prisma db push at container startup.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
nephthys/transcripts/transcripts/beest.py Adds a new transcript definition for the Beest program (channels, FAQ link, canned messages).
nephthys/transcripts/__init__.py Registers the new Beest transcript in the exported transcript list.
Dockerfile Moves Prisma workflow: generate at build; schema push at runtime before starting nephthys.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +15 to +17
first_ticket_create: str = f"""
Heya! I'm an automation that assigns helpers to your question! First off, have you read the <{faq_link}|faq>, it answers a lot of common questions!
if your question has been answered, please hit the button below to mark it as resolved
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

first_ticket_create's triple-quoted string starts with a leading space before “Heya!” (line begins Heya!). That whitespace will be sent to Slack and may render awkwardly; consider removing the leading space (or using textwrap.dedent) so the message starts flush-left like the other transcripts.

Copilot uses AI. Check for mistakes.
Comment thread Dockerfile
RUN prisma generate

CMD ["nephthys"]
CMD ["bash", "-c", "prisma db push && nephthys"]
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR title mentions applying migrations at runtime, but the runtime command uses prisma db push, which is schema sync (not migrations) and can behave differently than prisma migrate deploy. Either switch to migrations (and run prisma migrate deploy here) or adjust the PR title/description to match what’s actually happening.

Copilot uses AI. Check for mistakes.
Comment thread Dockerfile
RUN prisma generate

CMD ["nephthys"]
CMD ["bash", "-c", "prisma db push && nephthys"]
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prisma generate is already run at build time, but prisma db push will (by default) run generators again on every container start. Consider adding --skip-generate to the runtime db push to reduce startup time and avoid redundant work.

Suggested change
CMD ["bash", "-c", "prisma db push && nephthys"]
CMD ["bash", "-c", "prisma db push --skip-generate && nephthys"]

Copilot uses AI. Check for mistakes.
Comment on lines +5 to 6
from nephthys.transcripts.transcripts.beest import Beest
from nephthys.transcripts.transcripts.construct import Construct
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is titled around runtime migrations, but it also adds/introduces the Beest transcript import/registration. If that’s unrelated to the migration/runtime change, consider splitting it into a separate PR to keep the change focused and easier to review/revert.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants