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

[Introspection] Relation guardrail creates duplicate fields #1693

Closed
janpio opened this issue Feb 24, 2020 · 3 comments
Closed

[Introspection] Relation guardrail creates duplicate fields #1693

janpio opened this issue Feb 24, 2020 · 3 comments
Assignees
Labels
bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. topic: introspection
Milestone

Comments

@janpio
Copy link
Member

janpio commented Feb 24, 2020

Error: Schema parsing
error: Field "business_id" is already defined on model "Checkins".
  -->  schema.prisma:86
   | 
85 |   /// This used to be part of a relation to Business
86 |   business_id   Int     @default(0)
   | 
error: Field "day_id" is already defined on model "Checkins".
  -->  schema.prisma:90
   | 
89 |   /// This used to be part of a relation to Days
90 |   day_id        Int     @default(0)
   | 

Validation Error Count: 2

via model:

model Checkins {
  label_time_0  String?
  label_time_1  String?
  label_time_10 String?
  label_time_11 String?
  label_time_12 String?
  label_time_13 String?
  label_time_14 String?
  label_time_15 String?
  label_time_16 String?
  label_time_17 String?
  label_time_18 String?
  label_time_19 String?
  label_time_2  String?
  label_time_20 String?
  label_time_21 String?
  label_time_22 String?
  label_time_23 String?
  label_time_3  String?
  label_time_4  String?
  label_time_5  String?
  label_time_6  String?
  label_time_7  String?
  label_time_8  String?
  label_time_9  String?
  /// This used to be part of a relation to Business
  business_id   Int     @default(0)
  /// This used to be part of a relation to Business
  business_id   Int     @default(0)
  /// This used to be part of a relation to Days
  day_id        Int     @default(0)
  /// This used to be part of a relation to Days
  day_id        Int     @default(0)

  @@id([business_id, day_id])
  @@index([day_id], name: "day_id")
}

Something about /// This used to be part of a relation to ... seems to go wrong.

@janpio janpio added bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. topic: introspection labels Feb 24, 2020
@janpio janpio added this to the Preview 23 milestone Feb 24, 2020
@divyenduz

This comment has been minimized.

@janpio
Copy link
Member Author

janpio commented Mar 18, 2020

This guardrail has been removed in prisma/prisma-engines#578 - the error is gone 🚀

@janpio janpio closed this as completed Mar 18, 2020
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. topic: introspection
Projects
None yet
Development

No branches or pull requests

3 participants