Skip to content
This repository has been archived by the owner on Oct 9, 2022. It is now read-only.

@@index 's are removed #8

Open
jrmyio opened this issue Aug 25, 2020 · 1 comment
Open

@@index 's are removed #8

jrmyio opened this issue Aug 25, 2020 · 1 comment

Comments

@jrmyio
Copy link

jrmyio commented Aug 25, 2020

It seems like the transformer removes @@indexes.

model ads_clicks {
  id       Int      @default(autoincrement()) @id
  ad_id    Int?
  datetime DateTime
  @@index([ad_id], name: "IDX_BA7A601F4F34D596")
}

Transform to

model AdsClick {
  id       Int      @id @default(autoincrement())
  adId     Int?     @map("ad_id")
  datetime DateTime
  @@map("ads_clicks")
}
@jrmyio jrmyio changed the title Indexes are moved Indexes are removed Aug 25, 2020
@jrmyio jrmyio changed the title Indexes are removed @@index 's are removed Aug 25, 2020
@michaellzc
Copy link
Member

michaellzc commented Sep 3, 2020

@ConneXNL

Properly @@index is not handled by the deserializer. Let me know if you are willing to help adding support to preserve @@index during transformation. I can help you to get started.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants