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

Why Why why Index ... does not exist for model OrgChatRoomMessage #2583

Closed
2 tasks done
juri-diener opened this issue May 29, 2024 · 8 comments
Closed
2 tasks done

Why Why why Index ... does not exist for model OrgChatRoomMessage #2583

juri-diener opened this issue May 29, 2024 · 8 comments
Assignees
Labels
pending-community-response Issue is pending a response from the author or community. pending-triage question Further information is requested transferred

Comments

@juri-diener
Copy link

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

21.7.3

Amplify CLI Version

11.0.5

What operating system are you using?

Mac

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

No Changes

Describe the bug

Hello, I had an Index called orgChatRoomMessageByOrgChatRoom. In the developer process I realized I don't need that index on that field but on a different one. I changed it in the schema.graphql and now I get this Error:
🛑 Index orgChatRoomMessageByOrgChatRoom does not exist for model OrgChatRoomMessage

I tried with amplify push --force
But it's not working I can't push anymore.
Why this is the normal developer process that things changing...

Expected behavior

Should work to rename an index name as well delete an Index on a field in schema.graphql without any errors.

Reproduction steps

Create an index on a field
push the changes to the cloud
then rename or remove that index on the field in schema.graphql

Project Identifier

No response

Log output

# Put your logs below this line


Additional information

No response

Before submitting, please confirm:

  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.
@ykethan
Copy link
Member

ykethan commented May 29, 2024

Hey👋 thanks for raising this! I'm going to transfer this over to our API repository for better assistance 🙂

@ykethan ykethan transferred this issue from aws-amplify/amplify-cli May 29, 2024
@AnilMaktala
Copy link
Member

Hey @juri-diener, Thanks for raising this issue. Please try the following steps and let me know if it resolves the problem:

  1. Re-add orgChatRoomMessageByOrgChatRoom to OrgChatRoomMessage.
  2. Run amplify push.
  3. If successful, remove the index and run amplify push again.
  4. Finally, add the index with the new name and run amplify push.

@AnilMaktala AnilMaktala added question Further information is requested pending-response labels May 29, 2024
@juri-diener
Copy link
Author

Hey @juri-diener, Thanks for raising this issue. Please try the following steps and let me know if it resolves the problem:

  1. Re-add orgChatRoomMessageByOrgChatRoom to OrgChatRoomMessage.
  2. Run amplify push.
  3. If successful, remove the index and run amplify push again.
  4. Finally, add the index with the new name and run amplify push.

So I Re-add the index. Did the push, this worked. But when I removed the index and run amplify api gql-compile I get again this error:
Index orgChatRoomMessageByOrgChatRoom does not exist for model OrgChatRoomMessage

@AnilMaktala AnilMaktala self-assigned this May 29, 2024
@AnilMaktala
Copy link
Member

Hey @juri-diener, Did you run amplify push after removing the index?

@juri-diener
Copy link
Author

Hey @juri-diener, Did you run amplify push after removing the index?

Yes I did. And I get the same Error.
Index orgChatRoomMessageByOrgChatRoom does not exist for model OrgChatRoomMessage

@AnilMaktala
Copy link
Member

Hey @juri-diener, Apologies for delay in response. Are you still experiencing this error?

@AnilMaktala AnilMaktala added the pending-community-response Issue is pending a response from the author or community. label Oct 3, 2024
@AnilMaktala
Copy link
Member

Hey 👋 , This issue is being closed due to inactivity. If you are still experiencing the same problem and need further assistance, please feel free to leave a comment. This will enable us to reopen the issue and provide you with the necessary support.

Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-community-response Issue is pending a response from the author or community. pending-triage question Further information is requested transferred
Projects
None yet
Development

No branches or pull requests

3 participants