{"action":"created","comment":{"url":"https://api.github.com/repos/artsy/constellation/pulls/comments/116588972","pull_request_review_id":38221235,"id":116588972,"diff_hunk":"@@ -0,0 +1,36 @@\n+# This migration creates the `versions` table, the only schema PT requires.\n+# All other migrations PT provides are optional.\n+class CreateVersions < ActiveRecord::Migration[5.1]\n+\n+  # The largest text column available in all supported RDBMS is\n+  # 1024^3 - 1 bytes, roughly one gibibyte.  We specify a size\n+  # so that MySQL will use `longtext` instead of `text`.  Otherwise,\n+  # when serializing very large objects, `text` might not be big enough.\n+  TEXT_BYTES = 1_073_741_823\n+\n+  def change\n+    create_table :versions do |t|\n+      t.string   :item_type, {:null=>false}\n+      t.integer  :item_id,   null: false\n+      t.string   :event,     null: false\n+      t.string   :whodunnit","path":"db/migrate/20170515161113_create_versions.rb","position":16,"original_position":16,"commit_id":"973e87915bc8cc35a7e9c80710b96ca60269dd14","original_commit_id":"973e87915bc8cc35a7e9c80710b96ca60269dd14","user":{"login":"mzikherman","id":1457859,"avatar_url":"https://avatars1.githubusercontent.com/u/1457859?v=3","gravatar_id":"","url":"https://api.github.com/users/mzikherman","html_url":"https://github.com/mzikherman","followers_url":"https://api.github.com/users/mzikherman/followers","following_url":"https://api.github.com/users/mzikherman/following{/other_user}","gists_url":"https://api.github.com/users/mzikherman/gists{/gist_id}","starred_url":"https://api.github.com/users/mzikherman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mzikherman/subscriptions","organizations_url":"https://api.github.com/users/mzikherman/orgs","repos_url":"https://api.github.com/users/mzikherman/repos","events_url":"https://api.github.com/users/mzikherman/events{/privacy}","received_events_url":"https://api.github.com/users/mzikherman/received_events","type":"User","site_admin":false},"body":"Yea, this comes from the gem.....I'll have to look into it! In our case, it is storing the id of the interaction, that's correct.","created_at":"2017-05-15T20:11:25Z","updated_at":"2017-05-15T20:11:25Z","html_url":"https://github.com/artsy/constellation/pull/1#discussion_r116588972","pull_request_url":"https://api.github.com/repos/artsy/constellation/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/artsy/constellation/pulls/comments/116588972"},"html":{"href":"https://github.com/artsy/constellation/pull/1#discussion_r116588972"},"pull_request":{"href":"https://api.github.com/repos/artsy/constellation/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/artsy/constellation/pulls/1","id":120650536,"html_url":"https://github.com/artsy/constellation/pull/1","diff_url":"https://github.com/artsy/constellation/pull/1.diff","patch_url":"https://github.com/artsy/constellation/pull/1.patch","issue_url":"https://api.github.com/repos/artsy/constellation/issues/1","number":1,"state":"open","locked":false,"title":"@joeyAghion => Initial Collector, Interaction (+ join and paper trail) schema","user":{"login":"mzikherman","id":1457859,"avatar_url":"https://avatars1.githubusercontent.com/u/1457859?v=3","gravatar_id":"","url":"https://api.github.com/users/mzikherman","html_url":"https://github.com/mzikherman","followers_url":"https://api.github.com/users/mzikherman/followers","following_url":"https://api.github.com/users/mzikherman/following{/other_user}","gists_url":"https://api.github.com/users/mzikherman/gists{/gist_id}","starred_url":"https://api.github.com/users/mzikherman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mzikherman/subscriptions","organizations_url":"https://api.github.com/users/mzikherman/orgs","repos_url":"https://api.github.com/users/mzikherman/repos","events_url":"https://api.github.com/users/mzikherman/events{/privacy}","received_events_url":"https://api.github.com/users/mzikherman/received_events","type":"User","site_admin":false},"body":"This adds a basic `Collector` schema (which has only name/email/artsy id) for now. (I'll be adding more fields, validations, email as primary key, etc. later).\r\n\r\nAlso adds a basic `Interaction` schema (with support for an `external_id`). My conception of this model is that represents events and ways that we...interact with a collector. So this table can include events that have RSVPs (and be linked to that system), happy hours, or more generic ones like 'Phone call', 'Clearbit lookup'. These can be shared amongst all collectors.\r\n\r\nThen, we have a join table for `CollectorInteraction`. This will yield a list of interactions for every collector. It is these interactions which can/should be the source of the data, so when we update salary, we can/should tie that to the interaction that led to that piece of data.\r\n\r\nSome next steps:\r\n\r\n- add a few more fields to make this more 'interesting', and some saner validations/defaults\r\n- migrate data from RSVP app, and aim to switch that app's backend (with regards to collectors) to this\r\n- more?\r\n\r\nHere's a doc where we've outlined some initial thoughts and requirements: https://docs.google.com/document/d/1gf-Yw4vrQu8DRZmLOx80bRKGUSt1_I5GoNV1OyW4zg8/edit?ts=59147635\r\n\r\nHere's a tiny gist with some initial blueprints https://gist.github.com/mzikherman/8aacc28d87352ff49254daff2d3c8a52","created_at":"2017-05-15T17:13:03Z","updated_at":"2017-05-15T20:11:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"796e578945883cc33e0dd8d7bd20299d2a61e7d0","assignee":{"login":"alloy","id":2320,"avatar_url":"https://avatars1.githubusercontent.com/u/2320?v=3","gravatar_id":"","url":"https://api.github.com/users/alloy","html_url":"https://github.com/alloy","followers_url":"https://api.github.com/users/alloy/followers","following_url":"https://api.github.com/users/alloy/following{/other_user}","gists_url":"https://api.github.com/users/alloy/gists{/gist_id}","starred_url":"https://api.github.com/users/alloy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alloy/subscriptions","organizations_url":"https://api.github.com/users/alloy/orgs","repos_url":"https://api.github.com/users/alloy/repos","events_url":"https://api.github.com/users/alloy/events{/privacy}","received_events_url":"https://api.github.com/users/alloy/received_events","type":"User","site_admin":false},"assignees":[{"login":"alloy","id":2320,"avatar_url":"https://avatars1.githubusercontent.com/u/2320?v=3","gravatar_id":"","url":"https://api.github.com/users/alloy","html_url":"https://github.com/alloy","followers_url":"https://api.github.com/users/alloy/followers","following_url":"https://api.github.com/users/alloy/following{/other_user}","gists_url":"https://api.github.com/users/alloy/gists{/gist_id}","starred_url":"https://api.github.com/users/alloy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alloy/subscriptions","organizations_url":"https://api.github.com/users/alloy/orgs","repos_url":"https://api.github.com/users/alloy/repos","events_url":"https://api.github.com/users/alloy/events{/privacy}","received_events_url":"https://api.github.com/users/alloy/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/artsy/constellation/pulls/1/commits","review_comments_url":"https://api.github.com/repos/artsy/constellation/pulls/1/comments","review_comment_url":"https://api.github.com/repos/artsy/constellation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/artsy/constellation/issues/1/comments","statuses_url":"https://api.github.com/repos/artsy/constellation/statuses/973e87915bc8cc35a7e9c80710b96ca60269dd14","head":{"label":"mzikherman:initial_schemaz","ref":"initial_schemaz","sha":"973e87915bc8cc35a7e9c80710b96ca60269dd14","user":{"login":"mzikherman","id":1457859,"avatar_url":"https://avatars1.githubusercontent.com/u/1457859?v=3","gravatar_id":"","url":"https://api.github.com/users/mzikherman","html_url":"https://github.com/mzikherman","followers_url":"https://api.github.com/users/mzikherman/followers","following_url":"https://api.github.com/users/mzikherman/following{/other_user}","gists_url":"https://api.github.com/users/mzikherman/gists{/gist_id}","starred_url":"https://api.github.com/users/mzikherman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mzikherman/subscriptions","organizations_url":"https://api.github.com/users/mzikherman/orgs","repos_url":"https://api.github.com/users/mzikherman/repos","events_url":"https://api.github.com/users/mzikherman/events{/privacy}","received_events_url":"https://api.github.com/users/mzikherman/received_events","type":"User","site_admin":false},"repo":{"id":91001860,"name":"constellation","full_name":"mzikherman/constellation","owner":{"login":"mzikherman","id":1457859,"avatar_url":"https://avatars1.githubusercontent.com/u/1457859?v=3","gravatar_id":"","url":"https://api.github.com/users/mzikherman","html_url":"https://github.com/mzikherman","followers_url":"https://api.github.com/users/mzikherman/followers","following_url":"https://api.github.com/users/mzikherman/following{/other_user}","gists_url":"https://api.github.com/users/mzikherman/gists{/gist_id}","starred_url":"https://api.github.com/users/mzikherman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mzikherman/subscriptions","organizations_url":"https://api.github.com/users/mzikherman/orgs","repos_url":"https://api.github.com/users/mzikherman/repos","events_url":"https://api.github.com/users/mzikherman/events{/privacy}","received_events_url":"https://api.github.com/users/mzikherman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mzikherman/constellation","description":"Constellations are groups of stars that are shaped and form patterns.","fork":true,"url":"https://api.github.com/repos/mzikherman/constellation","forks_url":"https://api.github.com/repos/mzikherman/constellation/forks","keys_url":"https://api.github.com/repos/mzikherman/constellation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mzikherman/constellation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mzikherman/constellation/teams","hooks_url":"https://api.github.com/repos/mzikherman/constellation/hooks","issue_events_url":"https://api.github.com/repos/mzikherman/constellation/issues/events{/number}","events_url":"https://api.github.com/repos/mzikherman/constellation/events","assignees_url":"https://api.github.com/repos/mzikherman/constellation/assignees{/user}","branches_url":"https://api.github.com/repos/mzikherman/constellation/branches{/branch}","tags_url":"https://api.github.com/repos/mzikherman/constellation/tags","blobs_url":"https://api.github.com/repos/mzikherman/constellation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mzikherman/constellation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mzikherman/constellation/git/refs{/sha}","trees_url":"https://api.github.com/repos/mzikherman/constellation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mzikherman/constellation/statuses/{sha}","languages_url":"https://api.github.com/repos/mzikherman/constellation/languages","stargazers_url":"https://api.github.com/repos/mzikherman/constellation/stargazers","contributors_url":"https://api.github.com/repos/mzikherman/constellation/contributors","subscribers_url":"https://api.github.com/repos/mzikherman/constellation/subscribers","subscription_url":"https://api.github.com/repos/mzikherman/constellation/subscription","commits_url":"https://api.github.com/repos/mzikherman/constellation/commits{/sha}","git_commits_url":"https://api.github.com/repos/mzikherman/constellation/git/commits{/sha}","comments_url":"https://api.github.com/repos/mzikherman/constellation/comments{/number}","issue_comment_url":"https://api.github.com/repos/mzikherman/constellation/issues/comments{/number}","contents_url":"https://api.github.com/repos/mzikherman/constellation/contents/{+path}","compare_url":"https://api.github.com/repos/mzikherman/constellation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mzikherman/constellation/merges","archive_url":"https://api.github.com/repos/mzikherman/constellation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mzikherman/constellation/downloads","issues_url":"https://api.github.com/repos/mzikherman/constellation/issues{/number}","pulls_url":"https://api.github.com/repos/mzikherman/constellation/pulls{/number}","milestones_url":"https://api.github.com/repos/mzikherman/constellation/milestones{/number}","notifications_url":"https://api.github.com/repos/mzikherman/constellation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mzikherman/constellation/labels{/name}","releases_url":"https://api.github.com/repos/mzikherman/constellation/releases{/id}","deployments_url":"https://api.github.com/repos/mzikherman/constellation/deployments","created_at":"2017-05-11T16:40:54Z","updated_at":"2017-05-11T17:14:50Z","pushed_at":"2017-05-15T17:06:58Z","git_url":"git://github.com/mzikherman/constellation.git","ssh_url":"git@github.com:mzikherman/constellation.git","clone_url":"https://github.com/mzikherman/constellation.git","svn_url":"https://github.com/mzikherman/constellation","homepage":null,"size":43,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"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":0,"default_branch":"master"}},"base":{"label":"artsy:master","ref":"master","sha":"0fd6079bdc33cd140ed7633c49d3ccbf5cdf38bf","user":{"login":"artsy","id":546231,"avatar_url":"https://avatars0.githubusercontent.com/u/546231?v=3","gravatar_id":"","url":"https://api.github.com/users/artsy","html_url":"https://github.com/artsy","followers_url":"https://api.github.com/users/artsy/followers","following_url":"https://api.github.com/users/artsy/following{/other_user}","gists_url":"https://api.github.com/users/artsy/gists{/gist_id}","starred_url":"https://api.github.com/users/artsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artsy/subscriptions","organizations_url":"https://api.github.com/users/artsy/orgs","repos_url":"https://api.github.com/users/artsy/repos","events_url":"https://api.github.com/users/artsy/events{/privacy}","received_events_url":"https://api.github.com/users/artsy/received_events","type":"Organization","site_admin":false},"repo":{"id":90899603,"name":"constellation","full_name":"artsy/constellation","owner":{"login":"artsy","id":546231,"avatar_url":"https://avatars0.githubusercontent.com/u/546231?v=3","gravatar_id":"","url":"https://api.github.com/users/artsy","html_url":"https://github.com/artsy","followers_url":"https://api.github.com/users/artsy/followers","following_url":"https://api.github.com/users/artsy/following{/other_user}","gists_url":"https://api.github.com/users/artsy/gists{/gist_id}","starred_url":"https://api.github.com/users/artsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artsy/subscriptions","organizations_url":"https://api.github.com/users/artsy/orgs","repos_url":"https://api.github.com/users/artsy/repos","events_url":"https://api.github.com/users/artsy/events{/privacy}","received_events_url":"https://api.github.com/users/artsy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/artsy/constellation","description":"Constellations are groups of stars that are shaped and form patterns.","fork":false,"url":"https://api.github.com/repos/artsy/constellation","forks_url":"https://api.github.com/repos/artsy/constellation/forks","keys_url":"https://api.github.com/repos/artsy/constellation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/artsy/constellation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/artsy/constellation/teams","hooks_url":"https://api.github.com/repos/artsy/constellation/hooks","issue_events_url":"https://api.github.com/repos/artsy/constellation/issues/events{/number}","events_url":"https://api.github.com/repos/artsy/constellation/events","assignees_url":"https://api.github.com/repos/artsy/constellation/assignees{/user}","branches_url":"https://api.github.com/repos/artsy/constellation/branches{/branch}","tags_url":"https://api.github.com/repos/artsy/constellation/tags","blobs_url":"https://api.github.com/repos/artsy/constellation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/artsy/constellation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/artsy/constellation/git/refs{/sha}","trees_url":"https://api.github.com/repos/artsy/constellation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/artsy/constellation/statuses/{sha}","languages_url":"https://api.github.com/repos/artsy/constellation/languages","stargazers_url":"https://api.github.com/repos/artsy/constellation/stargazers","contributors_url":"https://api.github.com/repos/artsy/constellation/contributors","subscribers_url":"https://api.github.com/repos/artsy/constellation/subscribers","subscription_url":"https://api.github.com/repos/artsy/constellation/subscription","commits_url":"https://api.github.com/repos/artsy/constellation/commits{/sha}","git_commits_url":"https://api.github.com/repos/artsy/constellation/git/commits{/sha}","comments_url":"https://api.github.com/repos/artsy/constellation/comments{/number}","issue_comment_url":"https://api.github.com/repos/artsy/constellation/issues/comments{/number}","contents_url":"https://api.github.com/repos/artsy/constellation/contents/{+path}","compare_url":"https://api.github.com/repos/artsy/constellation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/artsy/constellation/merges","archive_url":"https://api.github.com/repos/artsy/constellation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/artsy/constellation/downloads","issues_url":"https://api.github.com/repos/artsy/constellation/issues{/number}","pulls_url":"https://api.github.com/repos/artsy/constellation/pulls{/number}","milestones_url":"https://api.github.com/repos/artsy/constellation/milestones{/number}","notifications_url":"https://api.github.com/repos/artsy/constellation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/artsy/constellation/labels{/name}","releases_url":"https://api.github.com/repos/artsy/constellation/releases{/id}","deployments_url":"https://api.github.com/repos/artsy/constellation/deployments","created_at":"2017-05-10T19:12:33Z","updated_at":"2017-05-11T17:14:47Z","pushed_at":"2017-05-15T17:13:04Z","git_url":"git://github.com/artsy/constellation.git","ssh_url":"git@github.com:artsy/constellation.git","clone_url":"https://github.com/artsy/constellation.git","svn_url":"https://github.com/artsy/constellation","homepage":null,"size":24,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/artsy/constellation/pulls/1"},"html":{"href":"https://github.com/artsy/constellation/pull/1"},"issue":{"href":"https://api.github.com/repos/artsy/constellation/issues/1"},"comments":{"href":"https://api.github.com/repos/artsy/constellation/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/artsy/constellation/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/artsy/constellation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/artsy/constellation/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/artsy/constellation/statuses/973e87915bc8cc35a7e9c80710b96ca60269dd14"}}}}
{"actor":{"display_login":"mzikherman"}}