Aurabase Logo
aurabasedocs
docs›Guides›Deployment

Deployment

Zero-downtime migrations, atomic rollback, CI/CD via GitHub Actions / GitLab / CLI. Two basic environments today (dev, prod); the branch previews by PR are in roadmap, not yet delivered.

8 min read·Level intermediate·Revised on Apr 15, 2026
This English text was generated automatically from the French original and has not been reviewed yet.
#
Overview

Three deployment surfaces

An Aurabase project exposes three surfaces to deploy: Postgres schema (versioned SQL migrations), edge functions (WASM + cron + jobs), policies and secrets (RLS, env vars, OAuth apps). Each pushes itself independently via aura CLI.

The CLI is self-contained (downloaded once, no Node dependency) and supports dry-run, confirm prompts, diff preview. Linux / macOS / Windows compatible.

#
Environments

Dev, preview, production

By default, a project has two environments: dev (local, Kubernetes) and prod (cloud). The branch previews (an ephemeral environment by open PR) are in roadmap, not yet delivered.

fluxtext
LOCAL DEV
    $ ./start.sh              → full local stack (k3d)
    $ aura dev                → watch mode + types gen

PREVIEW (par PR)
    git push origin feat/xyz  → GitHub Action crée branch Aurabase
    aurabase preview ready    → URL unique commentée sur la PR
    pr merged                 → cleanup automatique

PRODUCTION
    merge to main             → CI run: aura db push --env prod
                              → aura deploy functions
#
Migration

Versioned SQL, atomic rollback

Migrations live in supabase/migrations (Supabase compat) or aurabase/migrations. One file per change, timestamp in prefix. The CLI applies missing migrations and automatically generates TypeScript types.

terminalbash
# Create a new migration
aura db migration new add_devices_table
# → aurabase/migrations/20260415120000_add_devices_table.sql

# See which migrations are applied or pending, then apply them to the linked project
aura db status
aura db push

# Regenerate TypeScript types
npx @aurabase/gen --out src/aurabase.types.ts

# List applied migrations
aura db migration list
Attention

Zero-downtime migrations. Follow the rules: add nullable column first, separate backfill, constraint NOT NULL last. The CLI refuses non-backwards compatible migrations without --allow-breaking.

#
Branch previews

An ephemeral base by PR (roadmap)

Attention

Roadmap — not available. Branch previews (Postgres copy-on-write clone by PR) are a planned feature, not yet delivered. This section describes the target model; the commands below are not yet functional.

At each PR, a GitHub Action would create a new Aurabase branch — Postgres copy-on-write clone (provisioning ~10s), unique API keys, deployed functions, commented URL on the PR.

clibash
# Manually create a branch
aura branch create feat/new-checkout
# → https://feat-new-checkout.projet.aurabase.cloud

# With cloned seed data from prod (Pro+)
aura branch create feat/new-checkout --from prod --seed 1000

# List active branches
aura branch list

# Clean manually
aura branch delete feat/new-checkout
Info

TTL: 72 hours by default (Free), 14 days (Pro), unlimited (Enterprise). Inactive branches are suspended (0 cost) before permanent deletion.

#
CI/CD

Three integrations ready

The CLI works with any CI. Here are the recipes for the three most common.

.github/workflows/deploy.ymlyaml
name: Deploy to Aurabase
on:
  push: { branches: [main] }
  pull_request: {}

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: aurabase/setup-action@v1
        with: { token: ${{ secrets.AURA_TOKEN }} }
      - run: aura db push --env ${{ github.ref == 'refs/heads/main' && 'prod' || 'preview' }}
      - run: aura deploy functions
#
Rollback

Atomic, via down migration

Each 20260415_xxx.sql migration can have a 20260415_xxx.down.sqlfile. The rollback applies the .down.sql in reverse order, atomically within a transaction.

rollbackbash
# ROADMAP — aura db rollback is not yet available.
# The only real rollback today is transactional (a failed migration
# is canceled in its transaction). Multi-stage versioned revert is planned.

# Rollback of the last migration
aura db rollback --env prod --steps 1

# Rollback to a specific timestamp
aura db rollback --env prod --to 20260410000000

# Point-in-time recovery (Pro+) — returns to a point in time
aura db restore --env prod --to "2026-04-14T10:30:00Z"
Attention

PITR: continuous backups 14 days (Pro), 90 days (Enterprise). The restore creates a new instance — it’s up to you to switch traffic afterwards.

Last updated · Apr 15, 2026