Created
September 8, 2012 12:55
-
-
Save lloydwatkin/3674670 to your computer and use it in GitHub Desktop.
Owner fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[lloyd@desktop buddycloud-server]$ psql -d buddycloud-server -c "update affiliations set \"user\" = 'memememme' where node = '/user/[email protected]/posts' and affiliation = 'owner';"UPDATE 1 | |
[lloyd@desktop buddycloud-server]$ psql -d buddycloud-server -c "select * from affiliations where node IN (select node from node_config where key = 'channelType' and value = 'personal') and affiliation = 'owner';" node | user | affiliation | updated | |
------------------------------------------+------------------------------+-------------+--------- | |
/user/[email protected]/posts | memememme | owner | | |
/user/[email protected]/posts | [email protected] | owner | | |
/user/[email protected]/posts | [email protected] | owner | | |
/user/[email protected]/posts | [email protected] | owner | | |
/user/[email protected]/posts | [email protected] | owner | | |
/user/[email protected]/posts | [email protected] | owner | | |
/user/[email protected]/posts | [email protected] | owner | | |
/user/[email protected]/posts | [email protected] | owner | | |
/user/[email protected]/posts | [email protected] | owner | | |
/user/[email protected]/posts | [email protected] | owner | | |
/user/[email protected]/posts | [email protected] | owner | | |
/user/[email protected]/posts | [email protected] | owner | | |
/user/[email protected]/posts | [email protected] | owner | | |
(13 rows) | |
[lloyd@desktop buddycloud-server]$ psql -d buddycloud-server -c "update affiliations set \"user\" = substring(node from '^/user/(.*)/.*$') where node IN (select node from node_config where key = 'channelType' and value = 'personal') and affiliation = 'owner';" | |
UPDATE 13 | |
[lloyd@desktop buddycloud-server]$ psql -d buddycloud-server -c "select * from affiliations where node IN (select node from node_config where key = 'channelType' and value = 'personal') and affiliation = 'owner';" node | user | affiliation | updated | |
------------------------------------------+------------------------------+-------------+--------- | |
/user/[email protected]/posts | [email protected] | owner | | |
/user/[email protected]/posts | [email protected] | owner | | |
/user/[email protected]/posts | [email protected] | owner | | |
/user/[email protected]/posts | [email protected] | owner | | |
/user/[email protected]/posts | [email protected] | owner | | |
/user/[email protected]/posts | [email protected] | owner | | |
/user/[email protected]/posts | [email protected] | owner | | |
/user/[email protected]/posts | [email protected] | owner | | |
/user/[email protected]/posts | [email protected] | owner | | |
/user/[email protected]/posts | [email protected] | owner | | |
/user/[email protected]/posts | [email protected] | owner | | |
/user/[email protected]/posts | [email protected] | owner | | |
/user/[email protected]/posts | [email protected] | owner | | |
(13 rows) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment