{"action":"created","comment":{"url":"https://api.github.com/repos/DAlexIV/yandexTestTask/pulls/comments/74396972","id":74396972,"diff_hunk":"@@ -0,0 +1,56 @@\n+package com.yandex.perfstorage.db;\n+\n+import android.content.Context;\n+import android.database.sqlite.SQLiteDatabase;\n+import android.database.sqlite.SQLiteOpenHelper;\n+\n+import static com.yandex.perfstorage.db.DBContract.DB_NAME;\n+import static com.yandex.perfstorage.db.DBContract.GENRES;\n+import static com.yandex.perfstorage.db.DBContract.PERFORMERS;\n+import static com.yandex.perfstorage.db.DBContract.PERFORMERS_GENRE;\n+\n+/**\n+ * Created by dalexiv on 8/10/16.\n+ */\n+\n+public class DBOpenHelper extends SQLiteOpenHelper {\n+    private static final int DB_VERSION = 1;\n+\n+    public DBOpenHelper(Context context) {\n+        super(context, DB_NAME, null, DB_VERSION);\n+    }\n+\n+    @Override\n+    public void onCreate(SQLiteDatabase db) {\n+        db.execSQL(\"CREATE TABLE IF NOT EXISTS \" + PERFORMERS + \"(\" +\n+                DBContract.Performers.ID + \" INTEGER PRIMARY KEY, \" +\n+                DBContract.Performers.PERFORMER_NAME + \" TEXT UNIQUE NOT NULL, \" +\n+                DBContract.Performers.ALBUMS + \" INTEGER, \" +\n+                DBContract.Performers.TRACKS + \" INTEGER, \" +\n+                DBContract.Performers.LINK + \" TEXT, \" +\n+                DBContract.Performers.DESCRIPTION + \" TEXT, \" +\n+                DBContract.Performers.COVER_SMALL + \" TEXT NOT NULL, \" +\n+                DBContract.Performers.COVER_BIG + \" TEXT NOT NULL \" +\n+                \")\");\n+\n+        db.execSQL(\"CREATE TABLE IF NOT EXISTS \" + GENRES + \"(\" +\n+            DBContract.Genres.ID + \" INTEGER PRIMARY KEY, \" +\n+                DBContract.Genres.GENRE_NAME + \" TEXT UNIQUE NOT NULL \" +\n+                \")\");\n+\n+        db.execSQL(\"CREATE TABLE IF NOT EXISTS \" + PERFORMERS_GENRE + \"(\" +","path":"perfstorage/src/main/java/com/yandex/perfstorage/db/DBOpenHelper.java","position":41,"original_position":41,"commit_id":"7e61dc118519672b9f071bc8abea136cc6b92687","original_commit_id":"7e61dc118519672b9f071bc8abea136cc6b92687","user":{"login":"matreshkin","id":5363053,"avatar_url":"https://avatars.githubusercontent.com/u/5363053?v=3","gravatar_id":"","url":"https://api.github.com/users/matreshkin","html_url":"https://github.com/matreshkin","followers_url":"https://api.github.com/users/matreshkin/followers","following_url":"https://api.github.com/users/matreshkin/following{/other_user}","gists_url":"https://api.github.com/users/matreshkin/gists{/gist_id}","starred_url":"https://api.github.com/users/matreshkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matreshkin/subscriptions","organizations_url":"https://api.github.com/users/matreshkin/orgs","repos_url":"https://api.github.com/users/matreshkin/repos","events_url":"https://api.github.com/users/matreshkin/events{/privacy}","received_events_url":"https://api.github.com/users/matreshkin/received_events","type":"User","site_admin":false},"body":"Стоит ли писать IF NOT EXISTS ?","created_at":"2016-08-11T10:07:50Z","updated_at":"2016-08-11T10:07:50Z","html_url":"https://github.com/DAlexIV/yandexTestTask/pull/3#discussion_r74396972","pull_request_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/DAlexIV/yandexTestTask/pulls/comments/74396972"},"html":{"href":"https://github.com/DAlexIV/yandexTestTask/pull/3#discussion_r74396972"},"pull_request":{"href":"https://api.github.com/repos/DAlexIV/yandexTestTask/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/DAlexIV/yandexTestTask/pulls/3","id":80912830,"html_url":"https://github.com/DAlexIV/yandexTestTask/pull/3","diff_url":"https://github.com/DAlexIV/yandexTestTask/pull/3.diff","patch_url":"https://github.com/DAlexIV/yandexTestTask/pull/3.patch","issue_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/issues/3","number":3,"state":"open","locked":false,"title":"Provider & SQLite","user":{"login":"DAlexIV","id":9713132,"avatar_url":"https://avatars.githubusercontent.com/u/9713132?v=3","gravatar_id":"","url":"https://api.github.com/users/DAlexIV","html_url":"https://github.com/DAlexIV","followers_url":"https://api.github.com/users/DAlexIV/followers","following_url":"https://api.github.com/users/DAlexIV/following{/other_user}","gists_url":"https://api.github.com/users/DAlexIV/gists{/gist_id}","starred_url":"https://api.github.com/users/DAlexIV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DAlexIV/subscriptions","organizations_url":"https://api.github.com/users/DAlexIV/orgs","repos_url":"https://api.github.com/users/DAlexIV/repos","events_url":"https://api.github.com/users/DAlexIV/events{/privacy}","received_events_url":"https://api.github.com/users/DAlexIV/received_events","type":"User","site_admin":false},"body":"Сделал, но осталось пофиксить один баг с запросом из бд (берет не всех исполнителей), а также немного порефакторить query и сделать закачку из интернета ленивой","created_at":"2016-08-11T07:16:04Z","updated_at":"2016-08-11T10:07:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1469a3cea6a521c30dfe55c03b6ab6f5caf9f06b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/pulls/3/commits","review_comments_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/pulls/3/comments","review_comment_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/issues/3/comments","statuses_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/statuses/7e61dc118519672b9f071bc8abea136cc6b92687","head":{"label":"DAlexIV:db_branch","ref":"db_branch","sha":"7e61dc118519672b9f071bc8abea136cc6b92687","user":{"login":"DAlexIV","id":9713132,"avatar_url":"https://avatars.githubusercontent.com/u/9713132?v=3","gravatar_id":"","url":"https://api.github.com/users/DAlexIV","html_url":"https://github.com/DAlexIV","followers_url":"https://api.github.com/users/DAlexIV/followers","following_url":"https://api.github.com/users/DAlexIV/following{/other_user}","gists_url":"https://api.github.com/users/DAlexIV/gists{/gist_id}","starred_url":"https://api.github.com/users/DAlexIV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DAlexIV/subscriptions","organizations_url":"https://api.github.com/users/DAlexIV/orgs","repos_url":"https://api.github.com/users/DAlexIV/repos","events_url":"https://api.github.com/users/DAlexIV/events{/privacy}","received_events_url":"https://api.github.com/users/DAlexIV/received_events","type":"User","site_admin":false},"repo":{"id":56803609,"name":"yandexTestTask","full_name":"DAlexIV/yandexTestTask","owner":{"login":"DAlexIV","id":9713132,"avatar_url":"https://avatars.githubusercontent.com/u/9713132?v=3","gravatar_id":"","url":"https://api.github.com/users/DAlexIV","html_url":"https://github.com/DAlexIV","followers_url":"https://api.github.com/users/DAlexIV/followers","following_url":"https://api.github.com/users/DAlexIV/following{/other_user}","gists_url":"https://api.github.com/users/DAlexIV/gists{/gist_id}","starred_url":"https://api.github.com/users/DAlexIV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DAlexIV/subscriptions","organizations_url":"https://api.github.com/users/DAlexIV/orgs","repos_url":"https://api.github.com/users/DAlexIV/repos","events_url":"https://api.github.com/users/DAlexIV/events{/privacy}","received_events_url":"https://api.github.com/users/DAlexIV/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DAlexIV/yandexTestTask","description":"Test task for Yandex mobilization ","fork":false,"url":"https://api.github.com/repos/DAlexIV/yandexTestTask","forks_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/forks","keys_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/teams","hooks_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/hooks","issue_events_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/issues/events{/number}","events_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/events","assignees_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/assignees{/user}","branches_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/branches{/branch}","tags_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/tags","blobs_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/git/refs{/sha}","trees_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/statuses/{sha}","languages_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/languages","stargazers_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/stargazers","contributors_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/contributors","subscribers_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/subscribers","subscription_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/subscription","commits_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/commits{/sha}","git_commits_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/git/commits{/sha}","comments_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/comments{/number}","issue_comment_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/issues/comments{/number}","contents_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/contents/{+path}","compare_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/merges","archive_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/downloads","issues_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/issues{/number}","pulls_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/pulls{/number}","milestones_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/milestones{/number}","notifications_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/labels{/name}","releases_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/releases{/id}","deployments_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/deployments","created_at":"2016-04-21T20:28:13Z","updated_at":"2016-04-25T17:45:30Z","pushed_at":"2016-08-11T07:16:04Z","git_url":"git://github.com/DAlexIV/yandexTestTask.git","ssh_url":"git@github.com:DAlexIV/yandexTestTask.git","clone_url":"https://github.com/DAlexIV/yandexTestTask.git","svn_url":"https://github.com/DAlexIV/yandexTestTask","homepage":"https://academy.yandex.ru/events/mobdev/msk-2016/","size":614,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"DAlexIV:refactoring","ref":"refactoring","sha":"c8844d87a43848ede3a61000004339d2f39ef4aa","user":{"login":"DAlexIV","id":9713132,"avatar_url":"https://avatars.githubusercontent.com/u/9713132?v=3","gravatar_id":"","url":"https://api.github.com/users/DAlexIV","html_url":"https://github.com/DAlexIV","followers_url":"https://api.github.com/users/DAlexIV/followers","following_url":"https://api.github.com/users/DAlexIV/following{/other_user}","gists_url":"https://api.github.com/users/DAlexIV/gists{/gist_id}","starred_url":"https://api.github.com/users/DAlexIV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DAlexIV/subscriptions","organizations_url":"https://api.github.com/users/DAlexIV/orgs","repos_url":"https://api.github.com/users/DAlexIV/repos","events_url":"https://api.github.com/users/DAlexIV/events{/privacy}","received_events_url":"https://api.github.com/users/DAlexIV/received_events","type":"User","site_admin":false},"repo":{"id":56803609,"name":"yandexTestTask","full_name":"DAlexIV/yandexTestTask","owner":{"login":"DAlexIV","id":9713132,"avatar_url":"https://avatars.githubusercontent.com/u/9713132?v=3","gravatar_id":"","url":"https://api.github.com/users/DAlexIV","html_url":"https://github.com/DAlexIV","followers_url":"https://api.github.com/users/DAlexIV/followers","following_url":"https://api.github.com/users/DAlexIV/following{/other_user}","gists_url":"https://api.github.com/users/DAlexIV/gists{/gist_id}","starred_url":"https://api.github.com/users/DAlexIV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DAlexIV/subscriptions","organizations_url":"https://api.github.com/users/DAlexIV/orgs","repos_url":"https://api.github.com/users/DAlexIV/repos","events_url":"https://api.github.com/users/DAlexIV/events{/privacy}","received_events_url":"https://api.github.com/users/DAlexIV/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DAlexIV/yandexTestTask","description":"Test task for Yandex mobilization ","fork":false,"url":"https://api.github.com/repos/DAlexIV/yandexTestTask","forks_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/forks","keys_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/teams","hooks_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/hooks","issue_events_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/issues/events{/number}","events_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/events","assignees_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/assignees{/user}","branches_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/branches{/branch}","tags_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/tags","blobs_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/git/refs{/sha}","trees_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/statuses/{sha}","languages_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/languages","stargazers_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/stargazers","contributors_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/contributors","subscribers_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/subscribers","subscription_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/subscription","commits_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/commits{/sha}","git_commits_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/git/commits{/sha}","comments_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/comments{/number}","issue_comment_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/issues/comments{/number}","contents_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/contents/{+path}","compare_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/merges","archive_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/downloads","issues_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/issues{/number}","pulls_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/pulls{/number}","milestones_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/milestones{/number}","notifications_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/labels{/name}","releases_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/releases{/id}","deployments_url":"https://api.github.com/repos/DAlexIV/yandexTestTask/deployments","created_at":"2016-04-21T20:28:13Z","updated_at":"2016-04-25T17:45:30Z","pushed_at":"2016-08-11T07:16:04Z","git_url":"git://github.com/DAlexIV/yandexTestTask.git","ssh_url":"git@github.com:DAlexIV/yandexTestTask.git","clone_url":"https://github.com/DAlexIV/yandexTestTask.git","svn_url":"https://github.com/DAlexIV/yandexTestTask","homepage":"https://academy.yandex.ru/events/mobdev/msk-2016/","size":614,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DAlexIV/yandexTestTask/pulls/3"},"html":{"href":"https://github.com/DAlexIV/yandexTestTask/pull/3"},"issue":{"href":"https://api.github.com/repos/DAlexIV/yandexTestTask/issues/3"},"comments":{"href":"https://api.github.com/repos/DAlexIV/yandexTestTask/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/DAlexIV/yandexTestTask/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/DAlexIV/yandexTestTask/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DAlexIV/yandexTestTask/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/DAlexIV/yandexTestTask/statuses/7e61dc118519672b9f071bc8abea136cc6b92687"}}}}
{"actor":{"display_login":"matreshkin"}}