Skip to content

Instantly share code, notes, and snippets.

@matejskubic
Created June 27, 2018 09:23
Show Gist options
  • Save matejskubic/4565fd7f2722e3e49671bce85e798543 to your computer and use it in GitHub Desktop.
Save matejskubic/4565fd7f2722e3e49671bce85e798543 to your computer and use it in GitHub Desktop.
Update pootle translation unit to translated for units already translated by user
-- UPDATE pootle_store_unit su SET state=200
SELECT * FROM pootle_store_unit su
WHERE EXISTS
(
SELECT *
FROM pootle_app_submission asub
WHERE new_value=200 AND submitter_id=7 AND field=3
AND asub.unit_id=su.id
)
AND su.state=50
-- ORDER BY `id` DESC
LIMIT 10000;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment