docs/1.31/datamodel-and-migrations/migrations-MYSQL-asdf.mdx
import Warning from 'components/Markdown/Warning'
export const meta = { title: "Migrations (MySQL)", position: 240, articleGroup: "Migrations", technology: "mysql", technologyOrder: 2, }
There are two ways to migrate your database with Prisma:
Learn more about our upcoming migration system here.
When using Prisma with a MySQL database, you can perform your database migrations using the prisma deploy command of the Prisma CLI.
There are two steps to every database migration:
prisma deploy to apply the changes and perform the migration of the underlying databaseWhen migrating your database manually, you need to ensure that the Prisma datamodel matches the database schema after the migration. The easiest way to do so is by using the prisma introspect command to generate a datamodel file based on your migrated database schema and then use this new datamodel file as the new foundation for your Prisma project.