{"action":"created","issue":{"url":"https://api.github.com/repos/18F/openFEC/issues/2139","repository_url":"https://api.github.com/repos/18F/openFEC","labels_url":"https://api.github.com/repos/18F/openFEC/issues/2139/labels{/name}","comments_url":"https://api.github.com/repos/18F/openFEC/issues/2139/comments","events_url":"https://api.github.com/repos/18F/openFEC/issues/2139/events","html_url":"https://github.com/18F/openFEC/pull/2139","id":198881184,"number":2139,"title":"[MERGE WITH GIT FLOW] Adds support for generating new itemized child tables","user":{"login":"ccostino","id":121565,"avatar_url":"https://avatars.githubusercontent.com/u/121565?v=3","gravatar_id":"","url":"https://api.github.com/users/ccostino","html_url":"https://github.com/ccostino","followers_url":"https://api.github.com/users/ccostino/followers","following_url":"https://api.github.com/users/ccostino/following{/other_user}","gists_url":"https://api.github.com/users/ccostino/gists{/gist_id}","starred_url":"https://api.github.com/users/ccostino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccostino/subscriptions","organizations_url":"https://api.github.com/users/ccostino/orgs","repos_url":"https://api.github.com/users/ccostino/repos","events_url":"https://api.github.com/users/ccostino/events{/privacy}","received_events_url":"https://api.github.com/users/ccostino/received_events","type":"User","site_admin":false},"labels":[{"id":122997438,"url":"https://api.github.com/repos/18F/openFEC/labels/Bug","name":"Bug","color":"d93f0b","default":false},{"id":205686417,"url":"https://api.github.com/repos/18F/openFEC/labels/plz-review","name":"plz-review","color":"5319e7","default":false},{"id":254792899,"url":"https://api.github.com/repos/18F/openFEC/labels/Theme:%20Infrastructure%20&%20tooling","name":"Theme: Infrastructure & tooling","color":"f5f5f5","default":false},{"id":406630722,"url":"https://api.github.com/repos/18F/openFEC/labels/Work:%20Back-end","name":"Work: Back-end","color":"F1F8FF","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/18F/openFEC/milestones/45","html_url":"https://github.com/18F/openFEC/milestone/45","labels_url":"https://api.github.com/repos/18F/openFEC/milestones/45/labels","id":2217939,"number":45,"title":"Sprint 4","description":"","creator":{"login":"noahmanger","id":1696495,"avatar_url":"https://avatars.githubusercontent.com/u/1696495?v=3","gravatar_id":"","url":"https://api.github.com/users/noahmanger","html_url":"https://github.com/noahmanger","followers_url":"https://api.github.com/users/noahmanger/followers","following_url":"https://api.github.com/users/noahmanger/following{/other_user}","gists_url":"https://api.github.com/users/noahmanger/gists{/gist_id}","starred_url":"https://api.github.com/users/noahmanger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noahmanger/subscriptions","organizations_url":"https://api.github.com/users/noahmanger/orgs","repos_url":"https://api.github.com/users/noahmanger/repos","events_url":"https://api.github.com/users/noahmanger/events{/privacy}","received_events_url":"https://api.github.com/users/noahmanger/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":2,"state":"open","created_at":"2016-12-27T19:23:23Z","updated_at":"2017-01-10T17:03:48Z","due_on":"2017-01-17T08:00:00Z","closed_at":null},"comments":1,"created_at":"2017-01-05T05:50:11Z","updated_at":"2017-01-11T04:22:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/18F/openFEC/pulls/2139","html_url":"https://github.com/18F/openFEC/pull/2139","diff_url":"https://github.com/18F/openFEC/pull/2139.diff","patch_url":"https://github.com/18F/openFEC/pull/2139.patch"},"body":"**MERGE WITH GIT FLOW**\r\n\r\nCloses #2136\r\n\r\nThis changeset adds a management command to support creating new child tables to an existing partition of Schedule A and Schedule B data. It will check first before just creating the new table(s) so existing data is not wiped out.\r\n\r\nThis also includes the beginning of a test suite for the partitioning code.\r\n\r\nI modified the existing partitioning code a bit to break out some of the underlying child table processing code and ended up having to add a new flag to a couple of those methods to account for when we're doing a full partition vs. operating against already partitioned tables.\r\n\r\nThe new command is this:\r\n\r\n```sh\r\n./manage.py add_itemized_partition_cycle\r\n```\r\n\r\nGiven the current year at the time of this PR (2017), this will attempt to create the 2017 - 2018 cycle tables.  If you haven't already repartitioned they'll be added, but if you have then it will skip over them.  You can also specify a cycle and/or a range:\r\n\r\n```sh\r\n./manage.py add_itemized_partition_cycle -c 2014 -a 5\r\n```\r\n\r\nThis will start attempting to create child tables for the 2013 - 2014 cycle and work its way up to the 2021 - 2022 cycle (and again, skipping tables that already exist so they're not undone and wiped out).\r\n\r\nThe testing was proving to be fairly difficult to get going but I wanted to have something given the changes I had to make.  I'm definitely open to suggestions for improvement and/or pairing with someone to take them further!\r\n\r\n/cc @LindsayYoung, @jontours "},"comment":{"url":"https://api.github.com/repos/18F/openFEC/issues/comments/271774382","html_url":"https://github.com/18F/openFEC/pull/2139#issuecomment-271774382","issue_url":"https://api.github.com/repos/18F/openFEC/issues/2139","id":271774382,"user":{"login":"ccostino","id":121565,"avatar_url":"https://avatars.githubusercontent.com/u/121565?v=3","gravatar_id":"","url":"https://api.github.com/users/ccostino","html_url":"https://github.com/ccostino","followers_url":"https://api.github.com/users/ccostino/followers","following_url":"https://api.github.com/users/ccostino/following{/other_user}","gists_url":"https://api.github.com/users/ccostino/gists{/gist_id}","starred_url":"https://api.github.com/users/ccostino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccostino/subscriptions","organizations_url":"https://api.github.com/users/ccostino/orgs","repos_url":"https://api.github.com/users/ccostino/repos","events_url":"https://api.github.com/users/ccostino/events{/privacy}","received_events_url":"https://api.github.com/users/ccostino/received_events","type":"User","site_admin":false},"created_at":"2017-01-11T04:22:00Z","updated_at":"2017-01-11T04:22:00Z","body":"Thank you, @jontours!  Yes, once merged this would need to be run against all 3 environments.  I just took a look in `dev` and noticed that a repartitioning had already been started but stopped at some point.  I don't think it's currently going on, I don't see a partitioner app or any other thing that looks like a one-off app doing that.  So for `dev`, perhaps it makes sense to just repartition again?\r\n\r\n`stage` and `prod` appear to be in good shape and should be okay to just run this command instead.  Also, no need to worry about the read replicas, those'll be taken care of automatically. :-)"}}
{"actor":{"display_login":"ccostino"}}