{"action":"created","comment":{"url":"https://api.github.com/repos/softwerkskammer/Agora/pulls/comments/78298238","id":78298238,"diff_hunk":"@@ -17,31 +16,24 @@ if (!really || really !== 'really') {\n   process.exit();\n }\n \n-// set \"socratesOnly\" to false for all members.\n-groupsAndMembersService.getAllMembersWithTheirGroups(function (err, members) {\n+// merge event streams.\n+persistence.getByField({url: 'socrates-2016'}, function (err, eventstore) {\n   if (err) {\n     console.log(err);\n     process.exit();\n   }\n-  async.each(members,\n-    function (member, callback) {\n-      // set to true if member is only in socrates list\n-      var groups = _(member.subscribedGroups).map('id').filter(function (groupId) {\n-        return groupId !== 'alle' && groupId !== 'commercial';\n-      }).value();\n \n-      member.state.socratesOnly = groups.length === 1 && groups[0] === 'socrates2014';\n+  const events = eventstore.socratesEvents.concat(eventstore.registrationEvents).concat(eventstore.roomsEvents);\n+  const byTimestamp = (e1, e2) => e1.timestamp - e2.timestamp;\n+  eventstore.events = R.sort(byTimestamp, events);\n+\n+  console.log(eventstore.events);\n+  console.log(eventstore.events.length + ' events.');\n \n-      if (member.state.socratesOnly) {\n-        console.log('Socrates-only: ' + member.displayName());\n-      }\n-      if (doSave) {\n-        return memberstore.saveMember(member, callback);\n-      }\n-      callback(null, null);\n-    },\n-    function (err1) {\n+  if (doSave) {\n+    return persistence.save(eventstore, function (err1) {","path":"softwerkskammer/migrateDB.js","position":54,"original_position":54,"commit_id":"5b5ba851ccdff72f1b7af19e310b7a236880c1bd","original_commit_id":"f165a1ff1c4d8df2d44d5b5990fb0558f0fb95ea","user":{"login":"NicoleRauch","id":436499,"avatar_url":"https://avatars.githubusercontent.com/u/436499?v=3","gravatar_id":"","url":"https://api.github.com/users/NicoleRauch","html_url":"https://github.com/NicoleRauch","followers_url":"https://api.github.com/users/NicoleRauch/followers","following_url":"https://api.github.com/users/NicoleRauch/following{/other_user}","gists_url":"https://api.github.com/users/NicoleRauch/gists{/gist_id}","starred_url":"https://api.github.com/users/NicoleRauch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicoleRauch/subscriptions","organizations_url":"https://api.github.com/users/NicoleRauch/orgs","repos_url":"https://api.github.com/users/NicoleRauch/repos","events_url":"https://api.github.com/users/NicoleRauch/events{/privacy}","received_events_url":"https://api.github.com/users/NicoleRauch/received_events","type":"User","site_admin":false},"body":"Ja, lokal getestet und das Ergebnis benutzt.\r\n\r\nWas meinst Du mit \"log\"?","created_at":"2016-09-11T16:41:23Z","updated_at":"2016-09-11T16:41:23Z","html_url":"https://github.com/softwerkskammer/Agora/pull/1119#discussion_r78298238","pull_request_url":"https://api.github.com/repos/softwerkskammer/Agora/pulls/1119","_links":{"self":{"href":"https://api.github.com/repos/softwerkskammer/Agora/pulls/comments/78298238"},"html":{"href":"https://github.com/softwerkskammer/Agora/pull/1119#discussion_r78298238"},"pull_request":{"href":"https://api.github.com/repos/softwerkskammer/Agora/pulls/1119"}}},"pull_request":{"url":"https://api.github.com/repos/softwerkskammer/Agora/pulls/1119","id":84790260,"html_url":"https://github.com/softwerkskammer/Agora/pull/1119","diff_url":"https://github.com/softwerkskammer/Agora/pull/1119.diff","patch_url":"https://github.com/softwerkskammer/Agora/pull/1119.patch","issue_url":"https://api.github.com/repos/softwerkskammer/Agora/issues/1119","number":1119,"state":"open","locked":false,"title":"Unification of event lists","user":{"login":"NicoleRauch","id":436499,"avatar_url":"https://avatars.githubusercontent.com/u/436499?v=3","gravatar_id":"","url":"https://api.github.com/users/NicoleRauch","html_url":"https://github.com/NicoleRauch","followers_url":"https://api.github.com/users/NicoleRauch/followers","following_url":"https://api.github.com/users/NicoleRauch/following{/other_user}","gists_url":"https://api.github.com/users/NicoleRauch/gists{/gist_id}","starred_url":"https://api.github.com/users/NicoleRauch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicoleRauch/subscriptions","organizations_url":"https://api.github.com/users/NicoleRauch/orgs","repos_url":"https://api.github.com/users/NicoleRauch/repos","events_url":"https://api.github.com/users/NicoleRauch/events{/privacy}","received_events_url":"https://api.github.com/users/NicoleRauch/received_events","type":"User","site_admin":false},"body":"Now all events are stored in the same list. **ATTENTION**: Requires DB migration on deploy. (Shut down SoCraTes for this pls.)","created_at":"2016-09-11T16:03:18Z","updated_at":"2016-09-11T16:41:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ffc4991d9c97f1ea4398ee1a8e2fac2aa778ec0b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/softwerkskammer/Agora/pulls/1119/commits","review_comments_url":"https://api.github.com/repos/softwerkskammer/Agora/pulls/1119/comments","review_comment_url":"https://api.github.com/repos/softwerkskammer/Agora/pulls/comments{/number}","comments_url":"https://api.github.com/repos/softwerkskammer/Agora/issues/1119/comments","statuses_url":"https://api.github.com/repos/softwerkskammer/Agora/statuses/5b5ba851ccdff72f1b7af19e310b7a236880c1bd","head":{"label":"NicoleRauch:master","ref":"master","sha":"5b5ba851ccdff72f1b7af19e310b7a236880c1bd","user":{"login":"NicoleRauch","id":436499,"avatar_url":"https://avatars.githubusercontent.com/u/436499?v=3","gravatar_id":"","url":"https://api.github.com/users/NicoleRauch","html_url":"https://github.com/NicoleRauch","followers_url":"https://api.github.com/users/NicoleRauch/followers","following_url":"https://api.github.com/users/NicoleRauch/following{/other_user}","gists_url":"https://api.github.com/users/NicoleRauch/gists{/gist_id}","starred_url":"https://api.github.com/users/NicoleRauch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicoleRauch/subscriptions","organizations_url":"https://api.github.com/users/NicoleRauch/orgs","repos_url":"https://api.github.com/users/NicoleRauch/repos","events_url":"https://api.github.com/users/NicoleRauch/events{/privacy}","received_events_url":"https://api.github.com/users/NicoleRauch/received_events","type":"User","site_admin":false},"repo":{"id":9099256,"name":"Agora","full_name":"NicoleRauch/Agora","owner":{"login":"NicoleRauch","id":436499,"avatar_url":"https://avatars.githubusercontent.com/u/436499?v=3","gravatar_id":"","url":"https://api.github.com/users/NicoleRauch","html_url":"https://github.com/NicoleRauch","followers_url":"https://api.github.com/users/NicoleRauch/followers","following_url":"https://api.github.com/users/NicoleRauch/following{/other_user}","gists_url":"https://api.github.com/users/NicoleRauch/gists{/gist_id}","starred_url":"https://api.github.com/users/NicoleRauch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicoleRauch/subscriptions","organizations_url":"https://api.github.com/users/NicoleRauch/orgs","repos_url":"https://api.github.com/users/NicoleRauch/repos","events_url":"https://api.github.com/users/NicoleRauch/events{/privacy}","received_events_url":"https://api.github.com/users/NicoleRauch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NicoleRauch/Agora","description":"Hier wird's ernst :-)","fork":true,"url":"https://api.github.com/repos/NicoleRauch/Agora","forks_url":"https://api.github.com/repos/NicoleRauch/Agora/forks","keys_url":"https://api.github.com/repos/NicoleRauch/Agora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NicoleRauch/Agora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NicoleRauch/Agora/teams","hooks_url":"https://api.github.com/repos/NicoleRauch/Agora/hooks","issue_events_url":"https://api.github.com/repos/NicoleRauch/Agora/issues/events{/number}","events_url":"https://api.github.com/repos/NicoleRauch/Agora/events","assignees_url":"https://api.github.com/repos/NicoleRauch/Agora/assignees{/user}","branches_url":"https://api.github.com/repos/NicoleRauch/Agora/branches{/branch}","tags_url":"https://api.github.com/repos/NicoleRauch/Agora/tags","blobs_url":"https://api.github.com/repos/NicoleRauch/Agora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NicoleRauch/Agora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NicoleRauch/Agora/git/refs{/sha}","trees_url":"https://api.github.com/repos/NicoleRauch/Agora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NicoleRauch/Agora/statuses/{sha}","languages_url":"https://api.github.com/repos/NicoleRauch/Agora/languages","stargazers_url":"https://api.github.com/repos/NicoleRauch/Agora/stargazers","contributors_url":"https://api.github.com/repos/NicoleRauch/Agora/contributors","subscribers_url":"https://api.github.com/repos/NicoleRauch/Agora/subscribers","subscription_url":"https://api.github.com/repos/NicoleRauch/Agora/subscription","commits_url":"https://api.github.com/repos/NicoleRauch/Agora/commits{/sha}","git_commits_url":"https://api.github.com/repos/NicoleRauch/Agora/git/commits{/sha}","comments_url":"https://api.github.com/repos/NicoleRauch/Agora/comments{/number}","issue_comment_url":"https://api.github.com/repos/NicoleRauch/Agora/issues/comments{/number}","contents_url":"https://api.github.com/repos/NicoleRauch/Agora/contents/{+path}","compare_url":"https://api.github.com/repos/NicoleRauch/Agora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NicoleRauch/Agora/merges","archive_url":"https://api.github.com/repos/NicoleRauch/Agora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NicoleRauch/Agora/downloads","issues_url":"https://api.github.com/repos/NicoleRauch/Agora/issues{/number}","pulls_url":"https://api.github.com/repos/NicoleRauch/Agora/pulls{/number}","milestones_url":"https://api.github.com/repos/NicoleRauch/Agora/milestones{/number}","notifications_url":"https://api.github.com/repos/NicoleRauch/Agora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NicoleRauch/Agora/labels{/name}","releases_url":"https://api.github.com/repos/NicoleRauch/Agora/releases{/id}","deployments_url":"https://api.github.com/repos/NicoleRauch/Agora/deployments","created_at":"2013-03-29T13:53:38Z","updated_at":"2016-08-28T13:53:02Z","pushed_at":"2016-09-11T16:37:08Z","git_url":"git://github.com/NicoleRauch/Agora.git","ssh_url":"git@github.com:NicoleRauch/Agora.git","clone_url":"https://github.com/NicoleRauch/Agora.git","svn_url":"https://github.com/NicoleRauch/Agora","homepage":null,"size":19865,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"softwerkskammer:master","ref":"master","sha":"53fdd0d649a6131529dc07cc882db4c4108f8423","user":{"login":"softwerkskammer","id":1238207,"avatar_url":"https://avatars.githubusercontent.com/u/1238207?v=3","gravatar_id":"","url":"https://api.github.com/users/softwerkskammer","html_url":"https://github.com/softwerkskammer","followers_url":"https://api.github.com/users/softwerkskammer/followers","following_url":"https://api.github.com/users/softwerkskammer/following{/other_user}","gists_url":"https://api.github.com/users/softwerkskammer/gists{/gist_id}","starred_url":"https://api.github.com/users/softwerkskammer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/softwerkskammer/subscriptions","organizations_url":"https://api.github.com/users/softwerkskammer/orgs","repos_url":"https://api.github.com/users/softwerkskammer/repos","events_url":"https://api.github.com/users/softwerkskammer/events{/privacy}","received_events_url":"https://api.github.com/users/softwerkskammer/received_events","type":"Organization","site_admin":false},"repo":{"id":8785436,"name":"Agora","full_name":"softwerkskammer/Agora","owner":{"login":"softwerkskammer","id":1238207,"avatar_url":"https://avatars.githubusercontent.com/u/1238207?v=3","gravatar_id":"","url":"https://api.github.com/users/softwerkskammer","html_url":"https://github.com/softwerkskammer","followers_url":"https://api.github.com/users/softwerkskammer/followers","following_url":"https://api.github.com/users/softwerkskammer/following{/other_user}","gists_url":"https://api.github.com/users/softwerkskammer/gists{/gist_id}","starred_url":"https://api.github.com/users/softwerkskammer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/softwerkskammer/subscriptions","organizations_url":"https://api.github.com/users/softwerkskammer/orgs","repos_url":"https://api.github.com/users/softwerkskammer/repos","events_url":"https://api.github.com/users/softwerkskammer/events{/privacy}","received_events_url":"https://api.github.com/users/softwerkskammer/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/softwerkskammer/Agora","description":"Die Software für die Plattform der Softwerkskammer","fork":false,"url":"https://api.github.com/repos/softwerkskammer/Agora","forks_url":"https://api.github.com/repos/softwerkskammer/Agora/forks","keys_url":"https://api.github.com/repos/softwerkskammer/Agora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/softwerkskammer/Agora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/softwerkskammer/Agora/teams","hooks_url":"https://api.github.com/repos/softwerkskammer/Agora/hooks","issue_events_url":"https://api.github.com/repos/softwerkskammer/Agora/issues/events{/number}","events_url":"https://api.github.com/repos/softwerkskammer/Agora/events","assignees_url":"https://api.github.com/repos/softwerkskammer/Agora/assignees{/user}","branches_url":"https://api.github.com/repos/softwerkskammer/Agora/branches{/branch}","tags_url":"https://api.github.com/repos/softwerkskammer/Agora/tags","blobs_url":"https://api.github.com/repos/softwerkskammer/Agora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/softwerkskammer/Agora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/softwerkskammer/Agora/git/refs{/sha}","trees_url":"https://api.github.com/repos/softwerkskammer/Agora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/softwerkskammer/Agora/statuses/{sha}","languages_url":"https://api.github.com/repos/softwerkskammer/Agora/languages","stargazers_url":"https://api.github.com/repos/softwerkskammer/Agora/stargazers","contributors_url":"https://api.github.com/repos/softwerkskammer/Agora/contributors","subscribers_url":"https://api.github.com/repos/softwerkskammer/Agora/subscribers","subscription_url":"https://api.github.com/repos/softwerkskammer/Agora/subscription","commits_url":"https://api.github.com/repos/softwerkskammer/Agora/commits{/sha}","git_commits_url":"https://api.github.com/repos/softwerkskammer/Agora/git/commits{/sha}","comments_url":"https://api.github.com/repos/softwerkskammer/Agora/comments{/number}","issue_comment_url":"https://api.github.com/repos/softwerkskammer/Agora/issues/comments{/number}","contents_url":"https://api.github.com/repos/softwerkskammer/Agora/contents/{+path}","compare_url":"https://api.github.com/repos/softwerkskammer/Agora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/softwerkskammer/Agora/merges","archive_url":"https://api.github.com/repos/softwerkskammer/Agora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/softwerkskammer/Agora/downloads","issues_url":"https://api.github.com/repos/softwerkskammer/Agora/issues{/number}","pulls_url":"https://api.github.com/repos/softwerkskammer/Agora/pulls{/number}","milestones_url":"https://api.github.com/repos/softwerkskammer/Agora/milestones{/number}","notifications_url":"https://api.github.com/repos/softwerkskammer/Agora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/softwerkskammer/Agora/labels{/name}","releases_url":"https://api.github.com/repos/softwerkskammer/Agora/releases{/id}","deployments_url":"https://api.github.com/repos/softwerkskammer/Agora/deployments","created_at":"2013-03-14T21:07:21Z","updated_at":"2016-09-08T09:35:05Z","pushed_at":"2016-09-11T16:37:08Z","git_url":"git://github.com/softwerkskammer/Agora.git","ssh_url":"git@github.com:softwerkskammer/Agora.git","clone_url":"https://github.com/softwerkskammer/Agora.git","svn_url":"https://github.com/softwerkskammer/Agora","homepage":"","size":20160,"stargazers_count":36,"watchers_count":36,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":63,"mirror_url":null,"open_issues_count":5,"forks":63,"open_issues":5,"watchers":36,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/softwerkskammer/Agora/pulls/1119"},"html":{"href":"https://github.com/softwerkskammer/Agora/pull/1119"},"issue":{"href":"https://api.github.com/repos/softwerkskammer/Agora/issues/1119"},"comments":{"href":"https://api.github.com/repos/softwerkskammer/Agora/issues/1119/comments"},"review_comments":{"href":"https://api.github.com/repos/softwerkskammer/Agora/pulls/1119/comments"},"review_comment":{"href":"https://api.github.com/repos/softwerkskammer/Agora/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/softwerkskammer/Agora/pulls/1119/commits"},"statuses":{"href":"https://api.github.com/repos/softwerkskammer/Agora/statuses/5b5ba851ccdff72f1b7af19e310b7a236880c1bd"}}}}
{"actor":{"display_login":"NicoleRauch"}}