schema-migrator

command module
v0.0.0-...-3dd2578 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

README

Schema Migrator

Overview

The Schema Migrator is responsible for database schema migrations.

Development

If you want to modify database schema used by Compass, add migration files to /resources/kcp/charts/<component>/migrations directory. To do it, follow the instructions in the Migrations document. The new migration files are mounted as ConfigMaps. Make sure to bump the version of the component for which the migration was added. To test if the migration files are correct, run:

make verify

CAUTION : The following method of adding migrations files is deprecated:
If you want to modify database schema used by Compass, add migration files to migrations directory. New image of migrator will be produced that contains all migration files so make sure to bump component version value in Compass chart.

Naming convention

Originally, we accepted timestamps with the yyyyMMddHHmm format at the beginning of the file name as the standard naming convention. However, due to a mistake, some of the Runtime Provisioner's migration files were named using the yyyyddMMHHmm timestamp format. To ensure that new files are in the right order, until the end of 2021, follow the workaround yyyy(MM+31)ddHHmm pattern, which adds 31 to the month number.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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