Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate Dev CMD Issue when using multiSchema preview feature with MySQL #16274

Closed
Gohary95 opened this issue Nov 15, 2022 · 4 comments · Fixed by prisma/prisma-engines#3493
Closed
Labels
bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. team/schema Issue for team Schema. topic: migrate topic: multiSchema multiple schemas topic: mysql topic: rust panic
Milestone

Comments

@Gohary95
Copy link

Hi Prisma Team! The following command just crashed.

Command

migrate dev

Versions

Name Version
Platform darwin
Node v14.18.1
Prisma CLI 4.5.0
Engine 0362da9eebca54d94c8ef5edd3b2e90af99ba452

Error

Error: Error in migration engine.
Reason: [migration-engine/connectors/sql-migration-connector/src/sql_renderer.rs:112:9] internal error: entered unreachable code

Please create an issue with your `schema.prisma` at
https://github.com/prisma/prisma/issues/new

@SevInf SevInf added kind/bug A reported bug. team/schema Issue for team Schema. topic: migrate topic: rust panic labels Nov 15, 2022
@SevInf
Copy link
Contributor

SevInf commented Nov 15, 2022

Hi @Gohary95!
Could you share the schema that causes it?

@Gohary95
Copy link
Author

Gohary95 commented Nov 15, 2022

generator client {
  provider        = "prisma-client-js"
  previewFeatures = ["interactiveTransactions", "multiSchema"]
}

datasource db {
  provider = "mysql"
  url      = env("DATABASE_URL")
  schemas  = ["new_products", "rider_management"]
}

model Driver {
  id                  Int                  @id @default(autoincrement())
  driverId            String               @map("driver_id")
  storeName           String               @map("store_id")
  name                String?              @db.VarChar(255)
  phone               String?              @db.VarChar(255)
  code                String?              @db.VarChar(255)
  isActive            Boolean?             @map("is_active")
  isEnabled           Boolean?             @map("is_enabled")
  vehicleType         String?              @map("vehicle_type")
  createdAt           DateTime?            @map("created_at")
  updatedAt           DateTime?            @map("updated_at")

  @@map(name: "driver")
  @@schema("new_products")
}

model Rider {
  id                  Int                   @id @default(autoincrement())
  name                String
  phone               String
  status              RiderStatus
  vehicleType         VehicleType           @map("vehicle_type")
  lastUpdatedBy       String                @map("last_updated_by")
  createdAt           DateTime              @map("created_at")
  updatedAt           DateTime              @map("updated_at")

  @@map(name: "rider")
  @@schema("rider_management")
}

enum RiderStatus {
  ONLINE              @map("online")
  OFFLINE             @map("offline")
}

enum VehicleType {
  BIKE                @map("bike")
  CYCLE               @map("cycle")
  CAR                 @map("car")
}

@Gohary95
Copy link
Author

Gohary95 commented Nov 25, 2022

@SevInf Any updates regarding this issue?

@janpio janpio added the bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. label Nov 25, 2022
@Druue Druue added the topic: multiSchema multiple schemas label Dec 1, 2022
@tomhoule
Copy link
Contributor

@Gohary95 this is because multiSchema is not implemented on MySQL. We'll improve the error message.

tomhoule added a commit to prisma/prisma-engines that referenced this issue Dec 13, 2022
tomhoule added a commit to prisma/prisma-engines that referenced this issue Dec 13, 2022
tomhoule added a commit to prisma/prisma-engines that referenced this issue Dec 13, 2022
tomhoule added a commit to prisma/prisma-engines that referenced this issue Dec 15, 2022
tomhoule added a commit to prisma/prisma-engines that referenced this issue Dec 15, 2022
tomhoule added a commit to prisma/prisma-engines that referenced this issue Dec 15, 2022
tomhoule added a commit to prisma/prisma-engines that referenced this issue Dec 15, 2022
tomhoule added a commit to prisma/prisma-engines that referenced this issue Dec 15, 2022
tomhoule added a commit to prisma/prisma-engines that referenced this issue Dec 15, 2022
tomhoule added a commit to prisma/prisma-engines that referenced this issue Dec 15, 2022
tomhoule added a commit to prisma/prisma-engines that referenced this issue Dec 15, 2022
@Jolg42 Jolg42 added this to the 4.8.0 milestone Dec 15, 2022
@Jolg42 Jolg42 changed the title Migrate Dev CMD Issue Migrate Dev CMD Issue when using multiSchema preview feature with MySQL Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. team/schema Issue for team Schema. topic: migrate topic: multiSchema multiple schemas topic: mysql topic: rust panic
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants