Migration
الترحيل (Migration)
GLS-000099
Definition
A versioned change to a database schema — adding a column, creating a table, or modifying a field safely.
تغيير مُصنَّف بإصدار على مخطط قاعدة البيانات — إضافة عمود أو إنشاء جدول أو تعديل حقل بأمان.
Why It Matters
Without migrations, updating a production database schema is risky and error-prone. Migrations create a safe, auditable record of all schema changes.
بدون الترحيلات، تحديث مخطط قاعدة بيانات الإنتاج محفوف بالمخاطر وعرضة للأخطاء. الترحيلات تُنشئ سجلًا آمنًا وقابلًا للتدقيق لجميع تغييرات المخطط.
Full Definition
Example Usage
“npx prisma migrate dev --name add-bio-to-users creates a SQL migration file that adds a bio column to the users table.”
“npx prisma migrate dev --name add-bio-to-users يُنشئ ملف ترحيل SQL يضيف عمود bio إلى جدول users.”
AI Builder Tips
Avoid these mistakes when using Migration:
Running migrations manually on production instead of using a controlled process
Writing irreversible migrations without a rollback plan
Sign in to unlock guided AI explanations from AI Teacher.
Generate a Prompt
Copy this prompt and use it directly with any AI model — no setup needed.
Help me build a project using Migration. Explain: 1. What is Migration and why it matters 2. The core architecture and required tools 3. Step-by-step implementation plan 4. Common mistakes to avoid: Running migrations manually on production instead of using a controlled process, Writing irreversible migrations without a rollback plan 5. Best practices and production tips