Skip to content
arrow-up-circle

GitHub Action

surrealdb-migrations

v0.2.0 Latest version

surrealdb-migrations

arrow-up-circle

surrealdb-migrations

Apply migrations to a SurrealDB instance

Installation

Copy and paste the following snippet into your .yml file.

              

- name: surrealdb-migrations

uses: Odonno/surrealdb-migrations-action@v0.2.0

Learn more about this action in Odonno/surrealdb-migrations-action

Choose a version

surrealdb-migrations Action

MIT licensed

This GitHub Action installs and runs surrealdb-migrations. It is used to apply migrations on a SurrealDB instance.

Example workflow

on: [push]

name: build

jobs:
  check:
    name: Rust project
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2

      - name: Apply migrations
        uses: Odonno/surrealdb-migrations-action@v0.2.0
        with:
          address: "wss://cloud.surrealdb.com"

Inputs

Name Required Description Type Default
version The version of surrealdb-migrations that will be installed. string latest
address Address of the surrealdb instance. string ws://localhost:8000
ns Namespace to use inside the surrealdb instance. string test
db Name of the database to use inside the surrealdb instance. string test
username Username used to authenticate to the surrealdb instance. string root
password Password used to authenticate to the surrealdb instance. string root
skip-untracked-files When a schema changes is made, it should create a definition file when applying migrations.
If we detect untracked definition files, the CI will fail.
Set to true to skip untracked files.
boolean false

Note that you can still make use of the .surrealdb configuration file in your project.

Credits

Inspired by rust-tarpaulin GitHub Action.