migrations

package
v0.43.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package migrations contains migration functions for migrating the RethinkDB.

Migrating RethinkDB is a bit different than compared to regular SQL databases because clients define the schema and not the server.

Currently, migrations are only intended to be run *after* the rollout of the new clients. This prevents older clients to write their old schema into the database after the migration was applied. This approach allows us to apply zero-downtime migrations for most of the use-cases we have seen in the past.

There are probably scenarios where it makes sense to migrate *before* instance rollout and stop the instances before the migration (downtime migration) but for now this use-case has not been implemented and it possibly requires more difficult deployment orchestration to apply a migration.

We also do not support down migrations for the time being because it also makes things more complicated than they need to be.

Please ensure that your migrations are idempotent (they need to work for existing and for fresh deployments). Check the state before modifying it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OldReservation_Mig07

type OldReservation_Mig07 struct {
	Amount       int               `rethinkdb:"amount" json:"amount"`
	Description  string            `rethinkdb:"description" json:"description"`
	ProjectID    string            `rethinkdb:"projectid" json:"projectid"`
	PartitionIDs []string          `rethinkdb:"partitionids" json:"partitionids"`
	Labels       map[string]string `rethinkdb:"labels" json:"labels"`
}

type OldReservations_Mig07

type OldReservations_Mig07 []OldReservation_Mig07

type OldSize_Mig07

type OldSize_Mig07 struct {
	metal.Base
	Reservations OldReservations_Mig07 `rethinkdb:"reservations" json:"reservations"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL