{"action":"created","comment":{"url":"https://api.github.com/repos/idevelopment/Hcrm/pulls/comments/68823571","id":68823571,"diff_hunk":"@@ -0,0 +1,86 @@\n+<?php\n+\n+use Silber\\Bouncer\\Database\\Models;\n+\n+use Illuminate\\Database\\Schema\\Blueprint;\n+use Illuminate\\Database\\Migrations\\Migration;\n+\n+class CreateBouncerTables extends Migration\n+{\n+    /**\n+     * Run the migrations.\n+     *\n+     * @return void\n+     */\n+    public function up()\n+    {\n+        Schema::create(Models::table('abilities'), function (Blueprint $table) {\n+            $table->increments('id');\n+            $table->string('name');\n+            $table->integer('entity_id')->unsigned()->nullable();\n+            $table->string('entity_type')->nullable();\n+            $table->timestamps();\n+\n+            $table->unique(['name', 'entity_id', 'entity_type']);\n+        });\n+\n+        Schema::create(Models::table('roles'), function (Blueprint $table) {\n+            $table->increments('id');\n+            $table->string('name')->unique();\n+            $table->timestamps();\n+        });\n+\n+        Schema::create(Models::table('user_roles'), function (Blueprint $table) {\n+            $table->integer('role_id')->unsigned()->index();\n+            $table->integer('user_id')->unsigned()->index();\n+\n+            $table->primary(['role_id', 'user_id']);\n+\n+            $table->foreign('role_id')->references('id')->on(Models::table('roles'))\n+                  ->onUpdate('cascade')->onDelete('cascade');\n+\n+            $table->foreign('user_id')->references('id')->on(Models::table('users'))\n+                  ->onUpdate('cascade')->onDelete('cascade');\n+        });\n+\n+        Schema::create(Models::table('user_abilities'), function (Blueprint $table) {\n+            $table->integer('ability_id')->unsigned()->index();\n+            $table->integer('user_id')->unsigned()->index();\n+\n+            $table->primary(['ability_id', 'user_id']);\n+\n+            $table->foreign('ability_id')->references('id')->on(Models::table('abilities'))\n+                  ->onUpdate('cascade')->onDelete('cascade');\n+\n+            $table->foreign('user_id')->references('id')->on(Models::table('users'))\n+                  ->onUpdate('cascade')->onDelete('cascade');\n+        });\n+\n+        Schema::create(Models::table('role_abilities'), function (Blueprint $table) {\n+            $table->integer('ability_id')->unsigned()->index();\n+            $table->integer('role_id')->unsigned()->index();\n+\n+            $table->primary(['ability_id', 'role_id']);\n+\n+            $table->foreign('ability_id')->references('id')->on(Models::table('abilities'))\n+                  ->onUpdate('cascade')->onDelete('cascade');\n+\n+            $table->foreign('role_id')->references('id')->on(Models::table('roles'))\n+                  ->onUpdate('cascade')->onDelete('cascade');\n+        });\n+    }\n+\n+    /**\n+     * Reverse the migrations.\n+     *\n+     * @return void\n+     */\n+    public function down()\n+    {\n+        Schema::drop(Models::table('role_abilities'));\n+        Schema::drop(Models::table('user_abilities'));\n+        Schema::drop(Models::table('user_roles'));","path":"database/migrations/2016_06_27_180453_create_bouncer_tables.php","position":82,"original_position":82,"commit_id":"fd62d27e7d7655a59322f29eaccd1915cf6d589b","original_commit_id":"fd62d27e7d7655a59322f29eaccd1915cf6d589b","user":{"login":"ghermans","id":1594411,"avatar_url":"https://avatars.githubusercontent.com/u/1594411?v=3","gravatar_id":"","url":"https://api.github.com/users/ghermans","html_url":"https://github.com/ghermans","followers_url":"https://api.github.com/users/ghermans/followers","following_url":"https://api.github.com/users/ghermans/following{/other_user}","gists_url":"https://api.github.com/users/ghermans/gists{/gist_id}","starred_url":"https://api.github.com/users/ghermans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghermans/subscriptions","organizations_url":"https://api.github.com/users/ghermans/orgs","repos_url":"https://api.github.com/users/ghermans/repos","events_url":"https://api.github.com/users/ghermans/events{/privacy}","received_events_url":"https://api.github.com/users/ghermans/received_events","type":"User","site_admin":false},"body":"__[phpmd]__\n* Avoid using static access to class 'Schema' in method 'down'.\n* Avoid using static access to class '\\Silber\\Bouncer\\Database\\Models' in method 'down'.","created_at":"2016-06-28T19:15:44Z","updated_at":"2016-06-28T19:15:44Z","html_url":"https://github.com/idevelopment/Hcrm/pull/33#discussion_r68823571","pull_request_url":"https://api.github.com/repos/idevelopment/Hcrm/pulls/33","_links":{"self":{"href":"https://api.github.com/repos/idevelopment/Hcrm/pulls/comments/68823571"},"html":{"href":"https://github.com/idevelopment/Hcrm/pull/33#discussion_r68823571"},"pull_request":{"href":"https://api.github.com/repos/idevelopment/Hcrm/pulls/33"}}},"pull_request":{"url":"https://api.github.com/repos/idevelopment/Hcrm/pulls/33","id":74376203,"html_url":"https://github.com/idevelopment/Hcrm/pull/33","diff_url":"https://github.com/idevelopment/Hcrm/pull/33.diff","patch_url":"https://github.com/idevelopment/Hcrm/pull/33.patch","issue_url":"https://api.github.com/repos/idevelopment/Hcrm/issues/33","number":33,"state":"open","locked":false,"title":"Development","user":{"login":"ghermans","id":1594411,"avatar_url":"https://avatars.githubusercontent.com/u/1594411?v=3","gravatar_id":"","url":"https://api.github.com/users/ghermans","html_url":"https://github.com/ghermans","followers_url":"https://api.github.com/users/ghermans/followers","following_url":"https://api.github.com/users/ghermans/following{/other_user}","gists_url":"https://api.github.com/users/ghermans/gists{/gist_id}","starred_url":"https://api.github.com/users/ghermans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghermans/subscriptions","organizations_url":"https://api.github.com/users/ghermans/orgs","repos_url":"https://api.github.com/users/ghermans/repos","events_url":"https://api.github.com/users/ghermans/events{/privacy}","received_events_url":"https://api.github.com/users/ghermans/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-19T22:41:35Z","updated_at":"2016-06-28T19:15:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"364d420c73cecb7b71abd2ea9b4dea920897b944","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/idevelopment/Hcrm/pulls/33/commits","review_comments_url":"https://api.github.com/repos/idevelopment/Hcrm/pulls/33/comments","review_comment_url":"https://api.github.com/repos/idevelopment/Hcrm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/idevelopment/Hcrm/issues/33/comments","statuses_url":"https://api.github.com/repos/idevelopment/Hcrm/statuses/fd62d27e7d7655a59322f29eaccd1915cf6d589b","head":{"label":"idevelopment:development","ref":"development","sha":"fd62d27e7d7655a59322f29eaccd1915cf6d589b","user":{"login":"idevelopment","id":14967398,"avatar_url":"https://avatars.githubusercontent.com/u/14967398?v=3","gravatar_id":"","url":"https://api.github.com/users/idevelopment","html_url":"https://github.com/idevelopment","followers_url":"https://api.github.com/users/idevelopment/followers","following_url":"https://api.github.com/users/idevelopment/following{/other_user}","gists_url":"https://api.github.com/users/idevelopment/gists{/gist_id}","starred_url":"https://api.github.com/users/idevelopment/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idevelopment/subscriptions","organizations_url":"https://api.github.com/users/idevelopment/orgs","repos_url":"https://api.github.com/users/idevelopment/repos","events_url":"https://api.github.com/users/idevelopment/events{/privacy}","received_events_url":"https://api.github.com/users/idevelopment/received_events","type":"Organization","site_admin":false},"repo":{"id":61381083,"name":"Hcrm","full_name":"idevelopment/Hcrm","owner":{"login":"idevelopment","id":14967398,"avatar_url":"https://avatars.githubusercontent.com/u/14967398?v=3","gravatar_id":"","url":"https://api.github.com/users/idevelopment","html_url":"https://github.com/idevelopment","followers_url":"https://api.github.com/users/idevelopment/followers","following_url":"https://api.github.com/users/idevelopment/following{/other_user}","gists_url":"https://api.github.com/users/idevelopment/gists{/gist_id}","starred_url":"https://api.github.com/users/idevelopment/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idevelopment/subscriptions","organizations_url":"https://api.github.com/users/idevelopment/orgs","repos_url":"https://api.github.com/users/idevelopment/repos","events_url":"https://api.github.com/users/idevelopment/events{/privacy}","received_events_url":"https://api.github.com/users/idevelopment/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/idevelopment/Hcrm","description":"Open-source CRM for hosting companies ","fork":false,"url":"https://api.github.com/repos/idevelopment/Hcrm","forks_url":"https://api.github.com/repos/idevelopment/Hcrm/forks","keys_url":"https://api.github.com/repos/idevelopment/Hcrm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/idevelopment/Hcrm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/idevelopment/Hcrm/teams","hooks_url":"https://api.github.com/repos/idevelopment/Hcrm/hooks","issue_events_url":"https://api.github.com/repos/idevelopment/Hcrm/issues/events{/number}","events_url":"https://api.github.com/repos/idevelopment/Hcrm/events","assignees_url":"https://api.github.com/repos/idevelopment/Hcrm/assignees{/user}","branches_url":"https://api.github.com/repos/idevelopment/Hcrm/branches{/branch}","tags_url":"https://api.github.com/repos/idevelopment/Hcrm/tags","blobs_url":"https://api.github.com/repos/idevelopment/Hcrm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/idevelopment/Hcrm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/idevelopment/Hcrm/git/refs{/sha}","trees_url":"https://api.github.com/repos/idevelopment/Hcrm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/idevelopment/Hcrm/statuses/{sha}","languages_url":"https://api.github.com/repos/idevelopment/Hcrm/languages","stargazers_url":"https://api.github.com/repos/idevelopment/Hcrm/stargazers","contributors_url":"https://api.github.com/repos/idevelopment/Hcrm/contributors","subscribers_url":"https://api.github.com/repos/idevelopment/Hcrm/subscribers","subscription_url":"https://api.github.com/repos/idevelopment/Hcrm/subscription","commits_url":"https://api.github.com/repos/idevelopment/Hcrm/commits{/sha}","git_commits_url":"https://api.github.com/repos/idevelopment/Hcrm/git/commits{/sha}","comments_url":"https://api.github.com/repos/idevelopment/Hcrm/comments{/number}","issue_comment_url":"https://api.github.com/repos/idevelopment/Hcrm/issues/comments{/number}","contents_url":"https://api.github.com/repos/idevelopment/Hcrm/contents/{+path}","compare_url":"https://api.github.com/repos/idevelopment/Hcrm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/idevelopment/Hcrm/merges","archive_url":"https://api.github.com/repos/idevelopment/Hcrm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/idevelopment/Hcrm/downloads","issues_url":"https://api.github.com/repos/idevelopment/Hcrm/issues{/number}","pulls_url":"https://api.github.com/repos/idevelopment/Hcrm/pulls{/number}","milestones_url":"https://api.github.com/repos/idevelopment/Hcrm/milestones{/number}","notifications_url":"https://api.github.com/repos/idevelopment/Hcrm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/idevelopment/Hcrm/labels{/name}","releases_url":"https://api.github.com/repos/idevelopment/Hcrm/releases{/id}","deployments_url":"https://api.github.com/repos/idevelopment/Hcrm/deployments","created_at":"2016-06-17T14:49:28Z","updated_at":"2016-06-17T20:38:58Z","pushed_at":"2016-06-28T19:13:27Z","git_url":"git://github.com/idevelopment/Hcrm.git","ssh_url":"git@github.com:idevelopment/Hcrm.git","clone_url":"https://github.com/idevelopment/Hcrm.git","svn_url":"https://github.com/idevelopment/Hcrm","homepage":null,"size":476,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":19,"forks":0,"open_issues":19,"watchers":0,"default_branch":"master"}},"base":{"label":"idevelopment:master","ref":"master","sha":"c6a7e6acefb625714805bde80a41d873237149e6","user":{"login":"idevelopment","id":14967398,"avatar_url":"https://avatars.githubusercontent.com/u/14967398?v=3","gravatar_id":"","url":"https://api.github.com/users/idevelopment","html_url":"https://github.com/idevelopment","followers_url":"https://api.github.com/users/idevelopment/followers","following_url":"https://api.github.com/users/idevelopment/following{/other_user}","gists_url":"https://api.github.com/users/idevelopment/gists{/gist_id}","starred_url":"https://api.github.com/users/idevelopment/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idevelopment/subscriptions","organizations_url":"https://api.github.com/users/idevelopment/orgs","repos_url":"https://api.github.com/users/idevelopment/repos","events_url":"https://api.github.com/users/idevelopment/events{/privacy}","received_events_url":"https://api.github.com/users/idevelopment/received_events","type":"Organization","site_admin":false},"repo":{"id":61381083,"name":"Hcrm","full_name":"idevelopment/Hcrm","owner":{"login":"idevelopment","id":14967398,"avatar_url":"https://avatars.githubusercontent.com/u/14967398?v=3","gravatar_id":"","url":"https://api.github.com/users/idevelopment","html_url":"https://github.com/idevelopment","followers_url":"https://api.github.com/users/idevelopment/followers","following_url":"https://api.github.com/users/idevelopment/following{/other_user}","gists_url":"https://api.github.com/users/idevelopment/gists{/gist_id}","starred_url":"https://api.github.com/users/idevelopment/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idevelopment/subscriptions","organizations_url":"https://api.github.com/users/idevelopment/orgs","repos_url":"https://api.github.com/users/idevelopment/repos","events_url":"https://api.github.com/users/idevelopment/events{/privacy}","received_events_url":"https://api.github.com/users/idevelopment/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/idevelopment/Hcrm","description":"Open-source CRM for hosting companies ","fork":false,"url":"https://api.github.com/repos/idevelopment/Hcrm","forks_url":"https://api.github.com/repos/idevelopment/Hcrm/forks","keys_url":"https://api.github.com/repos/idevelopment/Hcrm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/idevelopment/Hcrm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/idevelopment/Hcrm/teams","hooks_url":"https://api.github.com/repos/idevelopment/Hcrm/hooks","issue_events_url":"https://api.github.com/repos/idevelopment/Hcrm/issues/events{/number}","events_url":"https://api.github.com/repos/idevelopment/Hcrm/events","assignees_url":"https://api.github.com/repos/idevelopment/Hcrm/assignees{/user}","branches_url":"https://api.github.com/repos/idevelopment/Hcrm/branches{/branch}","tags_url":"https://api.github.com/repos/idevelopment/Hcrm/tags","blobs_url":"https://api.github.com/repos/idevelopment/Hcrm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/idevelopment/Hcrm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/idevelopment/Hcrm/git/refs{/sha}","trees_url":"https://api.github.com/repos/idevelopment/Hcrm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/idevelopment/Hcrm/statuses/{sha}","languages_url":"https://api.github.com/repos/idevelopment/Hcrm/languages","stargazers_url":"https://api.github.com/repos/idevelopment/Hcrm/stargazers","contributors_url":"https://api.github.com/repos/idevelopment/Hcrm/contributors","subscribers_url":"https://api.github.com/repos/idevelopment/Hcrm/subscribers","subscription_url":"https://api.github.com/repos/idevelopment/Hcrm/subscription","commits_url":"https://api.github.com/repos/idevelopment/Hcrm/commits{/sha}","git_commits_url":"https://api.github.com/repos/idevelopment/Hcrm/git/commits{/sha}","comments_url":"https://api.github.com/repos/idevelopment/Hcrm/comments{/number}","issue_comment_url":"https://api.github.com/repos/idevelopment/Hcrm/issues/comments{/number}","contents_url":"https://api.github.com/repos/idevelopment/Hcrm/contents/{+path}","compare_url":"https://api.github.com/repos/idevelopment/Hcrm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/idevelopment/Hcrm/merges","archive_url":"https://api.github.com/repos/idevelopment/Hcrm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/idevelopment/Hcrm/downloads","issues_url":"https://api.github.com/repos/idevelopment/Hcrm/issues{/number}","pulls_url":"https://api.github.com/repos/idevelopment/Hcrm/pulls{/number}","milestones_url":"https://api.github.com/repos/idevelopment/Hcrm/milestones{/number}","notifications_url":"https://api.github.com/repos/idevelopment/Hcrm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/idevelopment/Hcrm/labels{/name}","releases_url":"https://api.github.com/repos/idevelopment/Hcrm/releases{/id}","deployments_url":"https://api.github.com/repos/idevelopment/Hcrm/deployments","created_at":"2016-06-17T14:49:28Z","updated_at":"2016-06-17T20:38:58Z","pushed_at":"2016-06-28T19:13:27Z","git_url":"git://github.com/idevelopment/Hcrm.git","ssh_url":"git@github.com:idevelopment/Hcrm.git","clone_url":"https://github.com/idevelopment/Hcrm.git","svn_url":"https://github.com/idevelopment/Hcrm","homepage":null,"size":476,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":19,"forks":0,"open_issues":19,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/idevelopment/Hcrm/pulls/33"},"html":{"href":"https://github.com/idevelopment/Hcrm/pull/33"},"issue":{"href":"https://api.github.com/repos/idevelopment/Hcrm/issues/33"},"comments":{"href":"https://api.github.com/repos/idevelopment/Hcrm/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/idevelopment/Hcrm/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/idevelopment/Hcrm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/idevelopment/Hcrm/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/idevelopment/Hcrm/statuses/fd62d27e7d7655a59322f29eaccd1915cf6d589b"}}}}
{"actor":{"display_login":"ghermans"}}