Voice Prompts for Database Migrations

A spoken runbook for schema migrations that can be verified and undone

Voiskey Voiskey Team
Voice Vibe CodingAI Code PromptsVoice Prompts Database

Write the Migration Goal as a Sentence

Voice Prompts for Database changes should start with one sentence that names the schema change and its purpose. For example: add a nullable region field to the account table so reports can group by region. That sentence contains the object, the change, and the reason, and every later prompt can refer back to it. Without it, a migration becomes a series of steps with no shared target, and each step is judged on its own rather than on whether the goal was met. Write the sentence at the top of the runbook and read it before every request and again before every review.

Decide the scope in terms of tables, columns, and code paths. List the tables that change, the columns added, altered, or removed, and the application paths that read them. Then mark which parts must ship together and which can ship separately. A nullable column can usually ship before the code that uses it; a removed column must ship after every reader is gone. Speaking this dependency order early turns a risky migration into a sequence of separately deployable steps, and it gives the reviewer a map instead of a single large change. Write the map in the runbook rather than in a message thread, so the order survives the week.

Name the smallest safe first step. The first step should be additive and invisible to users, such as adding a nullable column with no default or creating a new table that nothing reads yet. Speak it in full, including the exact type, the null rule, and the reason it is safe. Then stop and confirm that the step does not lock a large table for an unexpected period or rewrite every row. A migration plan is judged by its first step, because the first step is the one most often taken on a busy day with less review than the rest.

Write what the migration must not change. The existing columns keep their meaning, the existing queries keep their results, and the rollback path stays available until the change is confirmed. These sentences are the invariants for the migration, and they belong beside the goal. When a later step seems to require breaking one, stop and treat it as a new decision rather than a detail. The purpose of the sentence is not bureaucracy; it is to make the safe path the default and the risky path an explicit, reviewed choice that someone can defend. Keep the list short enough to read aloud in one breath.

Order Steps So Each One Is Reversible

Use an expand and contract order. First expand the schema so both the old and the new shape can exist at once, then move the code to the new shape, then contract the schema by removing the old part. This order keeps every intermediate state valid and lets you pause between steps without a half-migrated system. Speak each phase as its own migration with its own verification. Expand and contract is slower than a single change and far safer, because the system never has to be correct in a shape that nobody has tested and no rollback has covered.

For each step, write the forward action and the reverse action before you write any code. The reverse action may be a separate migration, a feature flag, or a restore from a recent copy, and each option needs a stated condition. Say which option applies and who is allowed to use it. If a step cannot be reversed, mark it clearly and schedule it last, after every reversible step has been confirmed. A migration plan with one irreversible step in the middle is a plan that risks losing work, and the risk is easy to see when reversibility is written next to each step.

Keep the batch of changes small enough to verify. A migration that adds three columns, changes two types, and creates an index in one file is difficult to review and difficult to reverse. Split it so each file has one purpose and one verification query. Speak the file names and the order, because the applied order is part of the migration, not an implementation detail. When the order is explicit, a reviewer can check the dependencies, and an operator can rerun a failed step without guessing what has already been applied. A small file also makes the rollback note shorter and easier to follow.

Plan the index and constraint work separately from the column work. Adding an index or a unique constraint can take time on a large table, and it can fail because existing rows violate the rule. Speak the pre-check first, such as a query that counts duplicates, then the constraint, then the verification. If the pre-check returns rows, the step stops and the cleanup becomes its own task. Separating these steps keeps a failed constraint from blocking a column change that was already safe, and it makes the failure a known outcome rather than a surprise during a release window. That separation also makes the pre-check reusable for the next constraint.

Speak the Backfill Rules Precisely

A backfill needs rules, not adjectives. Say which rows are selected, which value is written, how the value is computed, and what happens to rows that do not qualify. For example: for every account created before the cutover date, set region from the billing address country, and leave accounts without a billing address unchanged. That sentence can be reviewed, tested, and repeated. A request such as fill in the region field leaves the selection and the fallback undefined, and an undefined fallback is how a migration writes a wrong value to a large number of rows. It is also how a wrong value spreads silently.

Run the backfill in bounded batches and record the boundary. Speak the batch size and the key that defines progress, such as the account identifier range or a created date window. Then say what the job does when it stops partway: it resumes from the last recorded boundary rather than starting over. Make the operation safe to repeat, so a second run does not change a row that was already correct. These three rules, bounded batches, recorded boundaries, and repeatable writes, are what separate a backfill you can run during the day from one that requires a quiet weekend. Write those rules in the runbook, not in the migration file alone.

Write the verification query before the backfill and keep it unchanged. The query should answer a specific question, such as how many qualifying rows still have an empty region. Run it before the backfill to record the starting count, during the run to watch progress, and after the run to confirm zero. Speak the expected result so the operator knows when to stop waiting. When the verification query is written after the fact, it tends to match whatever happened rather than what should have happened, and the check loses its value. Keep the query text stable across the run, record the starting count beside it, and compare like with like every time.

Name the stop conditions and the cleanup. Stop if the count of changed rows exceeds the estimate by a wide margin, if the job writes a value outside the allowed set, or if the run takes far longer than the rehearsal. For each condition, say who is called and what the operator does next. Add a cleanup step for any temporary column, index, or flag used by the backfill, and schedule it after the verification passes. The stop conditions and the cleanup are part of the spoken plan, because a backfill without them leaves the system in an undocumented intermediate state.

Rehearse on a Copy Before the Real Run

Rehearse every step on a copy of the schema with a realistic row count before the real run. The rehearsal answers three questions: how long each step takes, whether the verification query returns the expected count, and whether the reverse action actually works. Speak the measured times into the runbook, because a plan without timing is a plan that will be run at the wrong moment. Use a copy that matches the production shape closely enough that an index build or a constraint check behaves the same way, and note any difference you could not reproduce, because an unreproduced detail is where the real run will surprise you.

Run the reverse action at least once. A rollback that has never been executed is a hope, not a plan. Apply the step, run the reverse, and confirm that the schema and the queries return to the previous state. If the reverse requires a restore, rehearse the restore procedure and record how long it takes and who can authorize it. Speak the result in one line: the reverse of step two returns the account table to its previous shape in under a minute. That line is more useful in a runbook than a general promise that the change is reversible.

Check the application paths against the rehearsed schema, not only the schema itself. Run the main read and write flows with the new shape present, including the old code path that will remain during the expand phase. This is where a missing default or an unexpected null appears. Speak each flow and the expected result, then repeat after the reverse action. A migration that is correct in the schema and broken in the application is still a failed migration, and the rehearsal is the cheapest place to find the difference. Repeat the flows after the reverse action, because a rollback that leaves the app on the new path is not a rollback.

Use the spoken loop for the corrections the rehearsal produces. Put the insertion point in the migration file or the runbook, hold the Voiskey shortcut, and say the change as one sentence with one expected result. Voiskey removes filler words and false starts and adapts punctuation to the field, so a corrected boundary or batch size arrives as a sentence you can keep. Then rerun the same rehearsal step. The rehearsal is a loop of one failure, one spoken correction, and one repeat, and the loop is short enough to run twice before the real window. Keep the corrected sentence in the runbook so the next operator starts from it.

Document the Run and the Rollback

Write the runbook as a numbered sequence with a command, an expected result, and a stop condition for each step. Include the verification query, the expected count, and the person to call if the result differs. Keep the runbook in the repository next to the migration files so it is reviewed with them. Then have someone who did not write it read the runbook and describe what they would do at step three. If their description differs from yours, the step is ambiguous. A runbook is finished when another operator can follow it without asking you a question during the run.

Record what actually happened during the run, not only what was planned. Note the start and end time for each step, the row counts before and after, the verification results, and any deviation from the plan. This record is what makes the next migration faster, because the estimates come from measured work rather than optimism. Speak the notes into the runbook as you go, while the values are visible. A completed run with no record teaches the team nothing, and the same uncertainty returns with the next change. Store the record beside the migration files and read it at the start of the next plan.

Decide the rollback trigger in advance and write it in the same document. A rollback trigger is a specific condition, such as a verification count that does not reach zero after two runs, or an application error rate that rises after the code moves to the new shape. State who can call the rollback and how the decision is communicated. Then state what happens after a rollback: which steps remain applied, which are reversed, and when the next attempt is scheduled. A rollback decision made under pressure without a written trigger is usually made too late or not at all.

When you want the same workflow on your own machine, download Voiskey for Mac and Windows and keep the shortcut ready while the migration files and the runbook are open. Voiskey turns a spoken note into text at the insertion point, including file names, paths, and commands when you say them, which suits a runbook full of exact statements. It removes filler and self-corrections and adapts formatting to the field, so a stop condition arrives in a form you can keep. Then close by scheduling a review of the record and the rollback path while the run is still fresh.

FAQ s

Voiskey is a voice typing app for desktop use. You press a shortcut, speak each migration step into the runbook or prompt field, and the text appears at the insertion point. It removes filler words and false starts, so the forward action, the reverse action, and the check can be reviewed as written steps.

Voiskey learns names, jargon, acronyms, and spelling preferences. Repeating table and column names in context helps them stay stable across a long runbook. A short naming list beside your notes gives every spoken step the same spelling. Read the list back before a long session, and correct it when a term changes.

State the selected rows, the value written, how it is computed, and what happens to rows that do not qualify. Voiskey clears self-corrections and adapts punctuation, so the sentence reads as a rule. Keep the insertion point in the runbook so the rule sits beside its verification.

Yes. Voiskey types wherever the insertion point sits, including a runbook, a migration file, or a prompt field, after you press the shortcut and speak. It also adapts formatting and phrasing, which keeps a short rollback note readable during a live run.

Say less. Get more
Say less. Get more
Say less. Get more
Say less. Get more
VoiskeyVoiskey

Your voice, amplified.

Download Voiskey for Mac and Windows and dictate the next migration step.

Use it across macOS, Windows, iOS, and Android

Use it across