Skip to content

Instantly share code, notes, and snippets.

@jtr109
Created November 1, 2017 05:11
Show Gist options
  • Save jtr109/053d792f8ac217534f669e55bf6b411f to your computer and use it in GitHub Desktop.
Save jtr109/053d792f8ac217534f669e55bf6b411f to your computer and use it in GitHub Desktop.
Update sort of GenericImage queryset
UPDATE "area_genericimage"
SET "sort" =
CASE WHEN "id" = 40964 THEN 1
WHEN "id" = 40965 THEN 2
END
WHERE "area_genericimage"."id" in (40964, 40965)
@jtr109
Copy link
Author

jtr109 commented Nov 1, 2017

refererance here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment