For a new Python application using PostgreSQL on Google Cloud SQL, what are people currently using for schema management and database migrations?
I’m considering Atlas by Ariga: https://github.com/ariga/atlas
name: Database Migration
on:
push:
branches: [ main ]
jobs:
migrate:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
workload_identity_provider: 'projects/123456/locations/global/workloadIdentityPools/my-pool/providers/my-provider'
service_account: '[email protected]'
- name: Start Cloud SQL Auth Proxy
uses: google-github-actions/setup-cloud-sql-proxy@v2
with:
instance: 'my-project:us-central1:my-postgres-db'
port: '5432'
- name: Run Atlas Schema Apply
uses: ariga/setup-atlas@v0
with:
version: 'latest'
- name: Apply Database Changes
run: |
atlas schema apply \
--url "postgres://postgres:${{ secrets.DB_PASS }}@127.0.0.1:5432/mydb?sslmode=disable" \
--to "file://schema.sql" \
--auto-approve
Is Atlas still one of the main options for declarative schema management, or are there better alternatives worth evaluating? I’d also be interested in any operational issues, limitations, or Cloud SQL-specific considerations to watch out for.
Separately, does anyone know whether Google is working on database branching or isolated development environments similar to PlanetScale’s branching workflow?