komrad migrate

Apply any pending database migrations

komrad

komrad migrate

Apply any pending database migrations, connecting as the login that owns the schema.

The service never migrates: an engine connects as a login that cannot change the schema, and it refuses to start against a database whose migrations do not match its build. So every upgrade runs this first, with owner_database_url (or KOMRAD_OWNER_DATABASE_URL) naming the owner, which falls back to database_url on a database no engine has joined.

It refuses while another komrad is connected and the build holds migrations the database has not seen, since those engines would stop matching. It is safe to run against a database that is already current; it says so and exits zero.

Inherited flags#

FlagTypeDescription
--configstringArray

path to a config TOML, repeatable, later files win over earlier ones

--enginestring

engine to reach, named after a file in the config's engines directory, layered over the config