title: Multiple relation to the same field prisma postgresql
body: <p>I want to create this database deisng <a href="https://i.stack.imgur.com/2QYip.png" rel="nofollow noreferrer">https://i.stack.imgur.com/2QYip.png</a></p>
  <p>I need to make model of Station and TrackSegment (A track segment ties two stations together.)</p>
  <p>This is my prisma schema but it give me this error &quot;Error validating model 'station': the unique index definitions refers to the field code multiple times.</p>
  <pre><code>model Station {
    id        Int      @id @default(autoincrement())
    createdAt DateTime @default(now())
    updatedAt DateTime @updatedAt
  
    name String
    code String @unique
  }
  
  model TrackSegment {
    id        Int      @id @default(autoincrement())
    createdAt DateTime @default(now())
    updatedAt DateTime @updatedAt
  
    sourceId      String 
    destinationId String
    stationCode Station @relation(fields: [destinationId, sourceId], references: [code, code])
  }
  </code></pre>
  <p>I imagine this is how the data will look.</p>
  <pre><code>Station: [
  {
    name: 'kalisetail'
    code: 'KLS
  },
  {
    name: 'rogojampi'
    code: 'RGJ
  }]
  </code></pre>
  <p>then the TrackSegment is</p>
  <pre><code>id: 1
  sourceId: KLS
  destinationId: RGJ
  </code></pre>
  <p>both sourceId and destinationId refer to the same field(code) of model Station</p>