スキル一覧に戻る
arslanibrahim95

database-operations

by arslanibrahim95

Premium web design landing page with fullstack deployment

0🍴 0📅 2026年1月25日
GitHubで見るManusで実行

SKILL.md


name: Database Operations description: Prisma veritabanı işlemleri için komutlar ve rehber

Database Operations Skill

Ne Zaman Kullanılır

  • Veritabanı şemasını güncellemek istediğinde
  • Seed data eklemek istediğinde
  • Kullanıcı oluşturmak/silmek istediğinde
  • Veritabanı sorgularında

Prisma Komutları

Schema Değişikliği Sonrası

npx prisma generate      # Client'ı güncelle
npx prisma db push       # Schema'yı DB'ye uygula (dev)
npx prisma migrate dev   # Migration oluştur (prod)

Prisma Studio (GUI)

npx prisma studio        # Tarayıcıda veritabanı yönetimi

Kullanıcı Oluşturma

Admin Kullanıcı

const { PrismaClient } = require('@prisma/client');
const bcrypt = require('bcryptjs');

(async () => {
  const prisma = new PrismaClient();
  const hash = await bcrypt.hash('sifre123', 10);
  
  await prisma.user.create({
    data: { 
      name: 'Admin', 
      email: 'admin@email.com', 
      password: hash, 
      role: 'ADMIN' 
    }
  });
  
  console.log('Admin oluşturuldu');
  process.exit(0);
})();

Client Kullanıcı

// Role: 'CLIENT' olarak değiştir, companyId ekle

Kullanıcıları Listele

const { PrismaClient } = require('@prisma/client');
const prisma = new PrismaClient();

prisma.user.findMany({ select: { email: true, role: true } })
  .then(users => console.log(JSON.stringify(users, null, 2)))
  .then(() => process.exit(0));

Rol Tipleri

  • ADMIN → /admin paneline erişim
  • CLIENT → /portal paneline erişim

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です