Skip to content

feat: new flake app runs migrations before starting #1056

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 20, 2024

Conversation

samrose
Copy link
Collaborator

@samrose samrose commented Jul 18, 2024

What kind of change does this PR introduce?

To support work that @soedirgo is doing now, and anyone in the future, this PR is expanding the tools provided by "nix flake apps" to create an alternate nix run .#start-client-and-migrate 15 command that will start the client based on the postgres that is built by nix in the same repo, but also will run migrations that live in the same repo/revision

To use this you will open 2 terminals, and run

  1. nix run .#start-server 15 (starts the pg 15.6 server built into this project)
  2. nix run .#start-client-and-migrate 15 (starts psql 15.6 client, but first runs migrations following the same instructions found in the migrations.sh script and using the same files)

@samrose samrose requested a review from a team as a code owner July 18, 2024 18:51
@samrose samrose self-assigned this Jul 18, 2024
@samrose samrose requested a review from soedirgo July 18, 2024 18:51
@samrose samrose merged commit 74e3390 into develop Jul 20, 2024
10 checks passed
@samrose samrose deleted the sam/nix-pgrunserver branch July 20, 2024 11:56
damonrand pushed a commit to cepro/postgres that referenced this pull request Jun 15, 2025
* feat: new flake app runs migrations before starting

* feat: also include pgbouncer/pg_stat_statements migrations

---------

Co-authored-by: Sam Rose <samuel@supabase.io>
Co-authored-by: Bobbie Soedirgo <bobbie@soedirgo.dev>
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