{"action":"created","comment":{"url":"https://api.github.com/repos/wtcounter/wtcounter/pulls/comments/178326164","pull_request_review_id":108375041,"id":178326164,"diff_hunk":"@@ -0,0 +1,27 @@\n+package wordtextcounter.details.main.store.migration\n+\n+import android.content.Context\n+import io.reactivex.schedulers.Schedulers.io\n+import wordtextcounter.details.main.store.ReportDatabase\n+import wordtextcounter.details.main.store.entities.Report\n+import wordtextcounter.details.main.util.Helper\n+\n+class Migrations(val context: Context) {\n+  \n+  @Migration(1, 2)\n+  fun initialMigration() {\n+    val db = ReportDatabase.getInstance(context)\n+    val dao = db.reportDao()\n+    dao.getAllReports()\n+        .subscribeOn(io())\n+        .flatMapIterable { t -> t }\n+        .map { t ->\n+          t.size = t.dateText?.let { Helper.calculateSize(it) }\n+          return@map t\n+        }\n+        .toList()\n+        .subscribe { t: MutableList<Report>? ->","path":"app/src/main/java/wordtextcounter/details/main/store/migration/Migrations.kt","position":23,"original_position":23,"commit_id":"109d1c663f505558b2cf7ce50b8412a20bf80b37","original_commit_id":"109d1c663f505558b2cf7ce50b8412a20bf80b37","user":{"login":"Apsaliya","id":14962707,"avatar_url":"https://avatars2.githubusercontent.com/u/14962707?v=4","gravatar_id":"","url":"https://api.github.com/users/Apsaliya","html_url":"https://github.com/Apsaliya","followers_url":"https://api.github.com/users/Apsaliya/followers","following_url":"https://api.github.com/users/Apsaliya/following{/other_user}","gists_url":"https://api.github.com/users/Apsaliya/gists{/gist_id}","starred_url":"https://api.github.com/users/Apsaliya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Apsaliya/subscriptions","organizations_url":"https://api.github.com/users/Apsaliya/orgs","repos_url":"https://api.github.com/users/Apsaliya/repos","events_url":"https://api.github.com/users/Apsaliya/events{/privacy}","received_events_url":"https://api.github.com/users/Apsaliya/received_events","type":"User","site_admin":false},"body":"Lamda argument type can be omitted here. Will remove it. ","created_at":"2018-03-30T16:50:14Z","updated_at":"2018-03-30T16:50:14Z","html_url":"https://github.com/wtcounter/wtcounter/pull/29#discussion_r178326164","pull_request_url":"https://api.github.com/repos/wtcounter/wtcounter/pulls/29","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/wtcounter/wtcounter/pulls/comments/178326164"},"html":{"href":"https://github.com/wtcounter/wtcounter/pull/29#discussion_r178326164"},"pull_request":{"href":"https://api.github.com/repos/wtcounter/wtcounter/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/wtcounter/wtcounter/pulls/29","id":178592547,"html_url":"https://github.com/wtcounter/wtcounter/pull/29","diff_url":"https://github.com/wtcounter/wtcounter/pull/29.diff","patch_url":"https://github.com/wtcounter/wtcounter/pull/29.patch","issue_url":"https://api.github.com/repos/wtcounter/wtcounter/issues/29","number":29,"state":"closed","locked":false,"title":"Setup migration","user":{"login":"Apsaliya","id":14962707,"avatar_url":"https://avatars2.githubusercontent.com/u/14962707?v=4","gravatar_id":"","url":"https://api.github.com/users/Apsaliya","html_url":"https://github.com/Apsaliya","followers_url":"https://api.github.com/users/Apsaliya/followers","following_url":"https://api.github.com/users/Apsaliya/following{/other_user}","gists_url":"https://api.github.com/users/Apsaliya/gists{/gist_id}","starred_url":"https://api.github.com/users/Apsaliya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Apsaliya/subscriptions","organizations_url":"https://api.github.com/users/Apsaliya/orgs","repos_url":"https://api.github.com/users/Apsaliya/repos","events_url":"https://api.github.com/users/Apsaliya/events{/privacy}","received_events_url":"https://api.github.com/users/Apsaliya/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-30T16:36:00Z","updated_at":"2018-03-30T16:50:14Z","closed_at":"2018-03-30T16:48:50Z","merged_at":"2018-03-30T16:48:50Z","merge_commit_sha":"e418a23eeeef7b3be7b7afd132865ae970ef8415","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/wtcounter/wtcounter/pulls/29/commits","review_comments_url":"https://api.github.com/repos/wtcounter/wtcounter/pulls/29/comments","review_comment_url":"https://api.github.com/repos/wtcounter/wtcounter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wtcounter/wtcounter/issues/29/comments","statuses_url":"https://api.github.com/repos/wtcounter/wtcounter/statuses/109d1c663f505558b2cf7ce50b8412a20bf80b37","head":{"label":"wtcounter:as/migration-gen","ref":"as/migration-gen","sha":"109d1c663f505558b2cf7ce50b8412a20bf80b37","user":{"login":"wtcounter","id":37046506,"avatar_url":"https://avatars3.githubusercontent.com/u/37046506?v=4","gravatar_id":"","url":"https://api.github.com/users/wtcounter","html_url":"https://github.com/wtcounter","followers_url":"https://api.github.com/users/wtcounter/followers","following_url":"https://api.github.com/users/wtcounter/following{/other_user}","gists_url":"https://api.github.com/users/wtcounter/gists{/gist_id}","starred_url":"https://api.github.com/users/wtcounter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wtcounter/subscriptions","organizations_url":"https://api.github.com/users/wtcounter/orgs","repos_url":"https://api.github.com/users/wtcounter/repos","events_url":"https://api.github.com/users/wtcounter/events{/privacy}","received_events_url":"https://api.github.com/users/wtcounter/received_events","type":"User","site_admin":false},"repo":{"id":123810620,"name":"wtcounter","full_name":"wtcounter/wtcounter","owner":{"login":"wtcounter","id":37046506,"avatar_url":"https://avatars3.githubusercontent.com/u/37046506?v=4","gravatar_id":"","url":"https://api.github.com/users/wtcounter","html_url":"https://github.com/wtcounter","followers_url":"https://api.github.com/users/wtcounter/followers","following_url":"https://api.github.com/users/wtcounter/following{/other_user}","gists_url":"https://api.github.com/users/wtcounter/gists{/gist_id}","starred_url":"https://api.github.com/users/wtcounter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wtcounter/subscriptions","organizations_url":"https://api.github.com/users/wtcounter/orgs","repos_url":"https://api.github.com/users/wtcounter/repos","events_url":"https://api.github.com/users/wtcounter/events{/privacy}","received_events_url":"https://api.github.com/users/wtcounter/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wtcounter/wtcounter","description":null,"fork":false,"url":"https://api.github.com/repos/wtcounter/wtcounter","forks_url":"https://api.github.com/repos/wtcounter/wtcounter/forks","keys_url":"https://api.github.com/repos/wtcounter/wtcounter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wtcounter/wtcounter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wtcounter/wtcounter/teams","hooks_url":"https://api.github.com/repos/wtcounter/wtcounter/hooks","issue_events_url":"https://api.github.com/repos/wtcounter/wtcounter/issues/events{/number}","events_url":"https://api.github.com/repos/wtcounter/wtcounter/events","assignees_url":"https://api.github.com/repos/wtcounter/wtcounter/assignees{/user}","branches_url":"https://api.github.com/repos/wtcounter/wtcounter/branches{/branch}","tags_url":"https://api.github.com/repos/wtcounter/wtcounter/tags","blobs_url":"https://api.github.com/repos/wtcounter/wtcounter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wtcounter/wtcounter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wtcounter/wtcounter/git/refs{/sha}","trees_url":"https://api.github.com/repos/wtcounter/wtcounter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wtcounter/wtcounter/statuses/{sha}","languages_url":"https://api.github.com/repos/wtcounter/wtcounter/languages","stargazers_url":"https://api.github.com/repos/wtcounter/wtcounter/stargazers","contributors_url":"https://api.github.com/repos/wtcounter/wtcounter/contributors","subscribers_url":"https://api.github.com/repos/wtcounter/wtcounter/subscribers","subscription_url":"https://api.github.com/repos/wtcounter/wtcounter/subscription","commits_url":"https://api.github.com/repos/wtcounter/wtcounter/commits{/sha}","git_commits_url":"https://api.github.com/repos/wtcounter/wtcounter/git/commits{/sha}","comments_url":"https://api.github.com/repos/wtcounter/wtcounter/comments{/number}","issue_comment_url":"https://api.github.com/repos/wtcounter/wtcounter/issues/comments{/number}","contents_url":"https://api.github.com/repos/wtcounter/wtcounter/contents/{+path}","compare_url":"https://api.github.com/repos/wtcounter/wtcounter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wtcounter/wtcounter/merges","archive_url":"https://api.github.com/repos/wtcounter/wtcounter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wtcounter/wtcounter/downloads","issues_url":"https://api.github.com/repos/wtcounter/wtcounter/issues{/number}","pulls_url":"https://api.github.com/repos/wtcounter/wtcounter/pulls{/number}","milestones_url":"https://api.github.com/repos/wtcounter/wtcounter/milestones{/number}","notifications_url":"https://api.github.com/repos/wtcounter/wtcounter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wtcounter/wtcounter/labels{/name}","releases_url":"https://api.github.com/repos/wtcounter/wtcounter/releases{/id}","deployments_url":"https://api.github.com/repos/wtcounter/wtcounter/deployments","created_at":"2018-03-04T17:12:59Z","updated_at":"2018-03-30T16:48:51Z","pushed_at":"2018-03-30T16:48:50Z","git_url":"git://github.com/wtcounter/wtcounter.git","ssh_url":"git@github.com:wtcounter/wtcounter.git","clone_url":"https://github.com/wtcounter/wtcounter.git","svn_url":"https://github.com/wtcounter/wtcounter","homepage":null,"size":254,"stargazers_count":3,"watchers_count":3,"language":"Kotlin","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":11,"license":null,"forks":0,"open_issues":11,"watchers":3,"default_branch":"master"}},"base":{"label":"wtcounter:master","ref":"master","sha":"d0f2f8319296d6ec40e2200b22a7811387d59b2b","user":{"login":"wtcounter","id":37046506,"avatar_url":"https://avatars3.githubusercontent.com/u/37046506?v=4","gravatar_id":"","url":"https://api.github.com/users/wtcounter","html_url":"https://github.com/wtcounter","followers_url":"https://api.github.com/users/wtcounter/followers","following_url":"https://api.github.com/users/wtcounter/following{/other_user}","gists_url":"https://api.github.com/users/wtcounter/gists{/gist_id}","starred_url":"https://api.github.com/users/wtcounter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wtcounter/subscriptions","organizations_url":"https://api.github.com/users/wtcounter/orgs","repos_url":"https://api.github.com/users/wtcounter/repos","events_url":"https://api.github.com/users/wtcounter/events{/privacy}","received_events_url":"https://api.github.com/users/wtcounter/received_events","type":"User","site_admin":false},"repo":{"id":123810620,"name":"wtcounter","full_name":"wtcounter/wtcounter","owner":{"login":"wtcounter","id":37046506,"avatar_url":"https://avatars3.githubusercontent.com/u/37046506?v=4","gravatar_id":"","url":"https://api.github.com/users/wtcounter","html_url":"https://github.com/wtcounter","followers_url":"https://api.github.com/users/wtcounter/followers","following_url":"https://api.github.com/users/wtcounter/following{/other_user}","gists_url":"https://api.github.com/users/wtcounter/gists{/gist_id}","starred_url":"https://api.github.com/users/wtcounter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wtcounter/subscriptions","organizations_url":"https://api.github.com/users/wtcounter/orgs","repos_url":"https://api.github.com/users/wtcounter/repos","events_url":"https://api.github.com/users/wtcounter/events{/privacy}","received_events_url":"https://api.github.com/users/wtcounter/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wtcounter/wtcounter","description":null,"fork":false,"url":"https://api.github.com/repos/wtcounter/wtcounter","forks_url":"https://api.github.com/repos/wtcounter/wtcounter/forks","keys_url":"https://api.github.com/repos/wtcounter/wtcounter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wtcounter/wtcounter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wtcounter/wtcounter/teams","hooks_url":"https://api.github.com/repos/wtcounter/wtcounter/hooks","issue_events_url":"https://api.github.com/repos/wtcounter/wtcounter/issues/events{/number}","events_url":"https://api.github.com/repos/wtcounter/wtcounter/events","assignees_url":"https://api.github.com/repos/wtcounter/wtcounter/assignees{/user}","branches_url":"https://api.github.com/repos/wtcounter/wtcounter/branches{/branch}","tags_url":"https://api.github.com/repos/wtcounter/wtcounter/tags","blobs_url":"https://api.github.com/repos/wtcounter/wtcounter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wtcounter/wtcounter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wtcounter/wtcounter/git/refs{/sha}","trees_url":"https://api.github.com/repos/wtcounter/wtcounter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wtcounter/wtcounter/statuses/{sha}","languages_url":"https://api.github.com/repos/wtcounter/wtcounter/languages","stargazers_url":"https://api.github.com/repos/wtcounter/wtcounter/stargazers","contributors_url":"https://api.github.com/repos/wtcounter/wtcounter/contributors","subscribers_url":"https://api.github.com/repos/wtcounter/wtcounter/subscribers","subscription_url":"https://api.github.com/repos/wtcounter/wtcounter/subscription","commits_url":"https://api.github.com/repos/wtcounter/wtcounter/commits{/sha}","git_commits_url":"https://api.github.com/repos/wtcounter/wtcounter/git/commits{/sha}","comments_url":"https://api.github.com/repos/wtcounter/wtcounter/comments{/number}","issue_comment_url":"https://api.github.com/repos/wtcounter/wtcounter/issues/comments{/number}","contents_url":"https://api.github.com/repos/wtcounter/wtcounter/contents/{+path}","compare_url":"https://api.github.com/repos/wtcounter/wtcounter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wtcounter/wtcounter/merges","archive_url":"https://api.github.com/repos/wtcounter/wtcounter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wtcounter/wtcounter/downloads","issues_url":"https://api.github.com/repos/wtcounter/wtcounter/issues{/number}","pulls_url":"https://api.github.com/repos/wtcounter/wtcounter/pulls{/number}","milestones_url":"https://api.github.com/repos/wtcounter/wtcounter/milestones{/number}","notifications_url":"https://api.github.com/repos/wtcounter/wtcounter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wtcounter/wtcounter/labels{/name}","releases_url":"https://api.github.com/repos/wtcounter/wtcounter/releases{/id}","deployments_url":"https://api.github.com/repos/wtcounter/wtcounter/deployments","created_at":"2018-03-04T17:12:59Z","updated_at":"2018-03-30T16:48:51Z","pushed_at":"2018-03-30T16:48:50Z","git_url":"git://github.com/wtcounter/wtcounter.git","ssh_url":"git@github.com:wtcounter/wtcounter.git","clone_url":"https://github.com/wtcounter/wtcounter.git","svn_url":"https://github.com/wtcounter/wtcounter","homepage":null,"size":254,"stargazers_count":3,"watchers_count":3,"language":"Kotlin","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":11,"license":null,"forks":0,"open_issues":11,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wtcounter/wtcounter/pulls/29"},"html":{"href":"https://github.com/wtcounter/wtcounter/pull/29"},"issue":{"href":"https://api.github.com/repos/wtcounter/wtcounter/issues/29"},"comments":{"href":"https://api.github.com/repos/wtcounter/wtcounter/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/wtcounter/wtcounter/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/wtcounter/wtcounter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wtcounter/wtcounter/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/wtcounter/wtcounter/statuses/109d1c663f505558b2cf7ce50b8412a20bf80b37"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"Apsaliya"}}