Tech TutorBangla Web Documentation
Portfolio
HomeHTMLCSSTailwind CSSJavaScriptTypeScriptReactNext.jsNode.jsExpressSocket.IOExpoWordPressPostgreSQLPrismaPostgresNestJSMongoDBDockerTanStackTanStack TableRTK QueryGitGitHub
  • PrismaPostgres Documentation40টি অধ্যায়
প্রযুক্তি নির্বাচন
HomeHTMLCSSTailwind CSSJavaScriptTypeScriptReactNext.jsNode.jsExpressSocket.IOExpoWordPressPostgreSQLPrismaPostgresNestJSMongoDBDockerTanStackTanStack TableRTK QueryGitGitHub
  • Prisma Intro
  • Prisma vs Raw SQL
  • Setup & Install
  • Schema Basics
  • Models
  • Relations
  • Migrations
  • Prisma Client
  • Create & Upsert
  • Read Queries
  • Update & Delete
  • Query Filters
  • Sort & Pagination
  • Select & Include
  • Nested Writes
  • Transactions
  • Aggregation
  • JSON Fields
  • Raw SQL
  • TechShop Schema
  • TechShop Seed
  • Relations Advanced
  • Env Config
  • Global Client
  • Next.js + Prisma
  • Express API
  • Error Handling
  • Performance
  • Connection Pool
  • Prisma Studio
  • Deploy Migrations
  • TechShop Indexes
  • TechShop Cart
  • TechShop Stats API
  • Schema Evolution
  • Debugging
  • Common Mistakes
  • Best Practices
  • Interview Questions
  • Recap & Next
  1. Docs
  2. PrismaPostgres
  3. বড় schema-পরিবর্তন — data migration
PrismaPostgresAdvanced

বড় schema-পরিবর্তন — data migration

rename/transform — পার্শ্বে-থেকে existing data ঠিক রাখা।

4টি অংশবাংলা ভাষায়

২-phase pattern — code-নতুন column-এ যাক, তারপর পুরোনো মুছে দাও।

  • নতুন column add (nullable/default)
  • মিডল-টাইম — app-দুটোই লেখে
  • backfill — copy/transform data
  • পুরোনো column নিষিদ্ধ → drop
backfill (prisma)ts
ts
const products = await prisma.product.findMany({
  where: { slug: null },
  select: { id: true, name: true },
});

for (const p of products) {
  const slug = p.name.toLowerCase().split(" ").join("-");
  await prisma.product.update({
    where: { id: p.id },
    data: { slug },
  });
}
destructive-সতর্ক

Production-এ সরাসরি column rename নয় — ২-phase deploy + test। বড় টেবিলে ALTER lock নেয় — সতর্কভাবে গণ-সময় ঠিক করুন।

শেষ প্যারায় নিজে practice করুন — কোড কপি করে নিজের এডিটরে চালিয়ে দেখুন।
আগেরDashboard stats — aggregate + groupByপরেরvalidate, format, query-log
Tech Tutor

বাংলায় ওয়েব ডেভেলপমেন্ট ডকুমেন্টেশন শিখুন — ধাপে ধাপে।

Homeসব ডকুমেন্টেশনQuick Startআমার নোটস

© 2026 Tech Tutor. বাংলায় শিখুন, বাংলায় গড়ুন।

mdanamolhasan1998@gmail.com