From 1529494aca44527f6789d9b3cb7672ada8052186 Mon Sep 17 00:00:00 2001 From: Copple <10214025+kiwicopple@users.noreply.github.com> Date: Thu, 20 Jul 2023 12:53:30 -0700 Subject: [PATCH] Adds a migrations file --- docs/migrations.md | 27 +++++++++++++++++++++++++++ mkdocs.yaml | 1 + 2 files changed, 28 insertions(+) create mode 100644 docs/migrations.md diff --git a/docs/migrations.md b/docs/migrations.md new file mode 100644 index 0000000..82bd9a6 --- /dev/null +++ b/docs/migrations.md @@ -0,0 +1,27 @@ +# Managing database migrations + +Migrations are programmatic changes to your database. They are usually checked into Git. + + +## Testing your migrations + +Inside your repository, create a new file inside the `.github/workflows` folder called `test-migrations.yml`. + +Copy this snippet inside the file, and the action will run whenever a new PR is created: + +```yaml +name: 'test-migrations' +on: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: supabase/setup-cli@v1 + with: + version: latest + - run: supabase init + - run: supabase db start +``` + diff --git a/mkdocs.yaml b/mkdocs.yaml index c8bf429..5e02fa5 100644 --- a/mkdocs.yaml +++ b/mkdocs.yaml @@ -7,6 +7,7 @@ repo_url: https://github.com/supabase/supabase-github-action nav: - Welcome: 'index.md' + - Quickstart: 'migrations.md' theme: name: 'material'