Giter Site home page Giter Site logo

next13-udemy-course's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

next13-udemy-course's Issues

Error: Migration engine error: db error: ERROR: prepared statement "s0" already exists

Hello I follow your course on udemy and i don't know if i can ask a question here.

I did the schema.prisma model. but i forgotten to put the key description in my restaurant able and i push it on supabase. So when i launch it in my localhost:3000/api/seed i has an error 

Error: Invalid `prisma.restaurant.createMany()` invocation:
So i add the key description in my model but when i push it whith `npx prisma db push` i have an error ```

Error: Migration engine error:

db error: ERROR: prepared statement "s0" already exists

```

And i don't know what i have to do ....this is my schema.prisma ```

// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

model Restaurant {
  id          Int       @id @default(autoincrement())
  name        String
  main_image  String
  images      String[]
  description String
  open_time   String
  close_time  String
  slug        String    @unique
  price       PRICE
  items       Item[]
  location_id Int
  location    Location  @relation(fields: [location_id], references: [id])
  cuisine_id  Int
  cuisine     Cuisine   @relation(fields: [cuisine_id], references: [id])
}

model Item {
  id            Int        @id @default(autoincrement())
  name          String
  price         String
  description   String
  restaurant_id Int
  restaurant    Restaurant @relation(fields: [restaurant_id], references: [id])
  created_at    DateTime   @default(now())
  updated_at    DateTime   @updatedAt
}

model Location {
  id          Int          @id @default(autoincrement())
  name        String
  restaurants Restaurant[]
  created_at  DateTime     @default(now())
  updated_at  DateTime     @updatedAt
}

model Cuisine {
  id          Int          @id @default(autoincrement())
  name        String
  restaurants Restaurant[]
  created_at  DateTime     @default(now())
  updated_at  DateTime     @updatedAt
}


enum PRICE {
  CHEAP
  REGULAR
  EXPENSIVE
}

```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.