stacker.news/prisma/migrations/20221213220945_referral/migration.sql

6 lines
199 B
SQL

-- AlterTable
ALTER TABLE "users" ADD COLUMN "referrerId" INTEGER;
-- AddForeignKey
ALTER TABLE "users" ADD FOREIGN KEY ("referrerId") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE;