Skip to content

Instantly share code, notes, and snippets.

@mattsnyder
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattsnyder/b5327abb3c2bd15fd46e to your computer and use it in GitHub Desktop.
Save mattsnyder/b5327abb3c2bd15fd46e to your computer and use it in GitHub Desktop.
remove linked studies from dropdown (Trello GsRYp6No)
begin;
SELECT
id,
linked_study_id,
folder_id
FROM studies
WHERE
linked_study_id IS NOT NULL AND
folder_id IS NOT NULL;
UPDATE
studies
SET
folder_id = null
WHERE
linked_study_id IS NOT NULL AND
folder_id IS NOT NULL;
rollback;
@rmontgomery429
Copy link

Typo on line 7, 10, 18.

@peppyheppy
Copy link

Did you test this? ;)

@mattsnyder
Copy link
Author

Nope, who needs tests??????

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