> ## Documentation Index
> Fetch the complete documentation index at: https://docs.snackbase.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# List Migrations

> List all Alembic revisions.

Returns all migration revisions from both core and dynamic directories
with their application status.

Only superadmins can access this endpoint.



## OpenAPI

````yaml get /api/v1/migrations
openapi: 3.1.0
info:
  title: SnackBase
  description: Open-source Backend-as-a-Service (BaaS)
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/migrations:
    get:
      tags:
        - migrations
      summary: List Migrations
      description: |-
        List all Alembic revisions.

        Returns all migration revisions from both core and dynamic directories
        with their application status.

        Only superadmins can access this endpoint.
      operationId: list_migrations_api_v1_migrations_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MigrationListResponse'
        '403':
          description: Superadmin access required
components:
  schemas:
    MigrationListResponse:
      properties:
        revisions:
          items:
            $ref: '#/components/schemas/MigrationRevisionResponse'
          type: array
          title: Revisions
          description: List of all revisions
        total:
          type: integer
          title: Total
          description: Total number of revisions
        current_revision:
          anyOf:
            - type: string
            - type: 'null'
          title: Current Revision
          description: Current database revision
      type: object
      required:
        - revisions
        - total
      title: MigrationListResponse
      description: Response schema for listing all migrations.
    MigrationRevisionResponse:
      properties:
        revision:
          type: string
          title: Revision
          description: Unique revision identifier
        description:
          type: string
          title: Description
          description: Migration description
        down_revision:
          anyOf:
            - type: string
            - type: 'null'
          title: Down Revision
          description: Previous revision in the chain
        branch_labels:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Branch Labels
          description: Branch labels for this revision
        is_applied:
          type: boolean
          title: Is Applied
          description: Whether this revision is applied
        is_head:
          type: boolean
          title: Is Head
          description: Whether this is the head revision
        is_dynamic:
          type: boolean
          title: Is Dynamic
          description: Whether this is a dynamic (auto-generated) migration
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
          description: Creation timestamp (ISO format)
      type: object
      required:
        - revision
        - description
        - is_applied
        - is_head
        - is_dynamic
      title: MigrationRevisionResponse
      description: Response schema for a single migration revision.

````