Skip to content
PtahDocs
v0.8.1

Migrate from another tool

Convert a migration directory written by another tool, or keep running the commands you have through the Atlas-compatible binary.

Nothing here asks you to rewrite applied history. Each page starts from a directory the other tool wrote, converts it, and shows the state afterwards. Every command on every page runs in this repository’s continuous integration against the version of Ptah the page was published with.

More tools are being added here one at a time. Until a tool has its own page, Import an existing migration directory covers the conversion and carries the format table for every source Ptah reads.

Converting a directory and keeping your commands are separate decisions, and you do not have to make both.

Convert the directory. ptah migrations import reads the other tool’s layout and writes Ptah’s, sealed with ptah.sum. The source directory is left untouched. This is what the pages above walk through.

Keep the commands. If you run Atlas today, ptah-compat reads the atlas.hcl you have and answers the commands you already run, with no conversion at all. Run an Atlas project on ptah-compat is the first mile, command by command; Migrate from Atlas carries on from there for readers who want to go native.

A converted directory is a set of files. It says nothing about the databases that already ran the old tool, and applying it to one of them would replay migrations those databases already have.

Record that history as applied first. Adopt an existing database is the procedure, and it is the step people skip.