Skip to main content

Prisma

  1. Selecting Database when installing create-frourio-app

  2. Start the Database

  3. Create a schema file

    server/prisma/schema.prisma
    datasource db {
    provider = "mysql"
    url = env("DATABASE_URL")
    }
    generator client {
    provider = "prisma-client-js"
    }
    model Task {
    id Int @id @default(autoincrement())
    label String
    done Boolean @default(false)
    }

    Prisma schema


  1. Call the migration command
npm run migrate:dev

  1. Migration is done to the DB