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

Migration fails when using UUID #64

Closed
iamalmiir opened this issue Nov 27, 2022 · 4 comments
Closed

Migration fails when using UUID #64

iamalmiir opened this issue Nov 27, 2022 · 4 comments

Comments

@iamalmiir
Copy link

User model with a UUID instead of BIGINT, the migrations fail for PostgreSQL.
tried django-jet-reboot==1.3.1/1.3.3 still fails.

Error message:
return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: cannot cast type integer to uuid
LINE 1: ..." ALTER COLUMN "user_id" TYPE uuid USING "user_id"::uuid, AL...

@playma
Copy link

playma commented Jan 6, 2023

How did you solve it?

@iamalmiir iamalmiir reopened this Jan 23, 2023
@iamalmiir
Copy link
Author

Hey there, I hope you are doing great. I’m late but I still hope you will find my answer useful.

So what I’ve done is I just excluded ‘jet.dashboard’ but kept ‘jet’.
I know that this is not a perfect solution but it’s the only one I have right now.

@iamalmiir iamalmiir reopened this Jan 23, 2023
@playma
Copy link

playma commented Mar 23, 2023

@iamalmiir Thank you, I do the same thing...

@assem-ch
Copy link
Owner

assem-ch commented Dec 9, 2023

It can fixed by re-generating django-jet migrations inside your project like that:

MIGRATION_MODULES = {
    "jet": "your_app.migrations.jet",
}

@assem-ch assem-ch closed this as completed Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants