{"action":"created","issue":{"url":"https://api.github.com/repos/GeorgeHahn/CS431_Project/issues/2","labels_url":"https://api.github.com/repos/GeorgeHahn/CS431_Project/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/GeorgeHahn/CS431_Project/issues/2/comments","events_url":"https://api.github.com/repos/GeorgeHahn/CS431_Project/issues/2/events","html_url":"https://github.com/GeorgeHahn/CS431_Project/issues/2","id":109559917,"number":2,"title":"Project Topic","user":{"login":"GeorgeHahn","id":502747,"avatar_url":"https://avatars.githubusercontent.com/u/502747?v=3","gravatar_id":"","url":"https://api.github.com/users/GeorgeHahn","html_url":"https://github.com/GeorgeHahn","followers_url":"https://api.github.com/users/GeorgeHahn/followers","following_url":"https://api.github.com/users/GeorgeHahn/following{/other_user}","gists_url":"https://api.github.com/users/GeorgeHahn/gists{/gist_id}","starred_url":"https://api.github.com/users/GeorgeHahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeorgeHahn/subscriptions","organizations_url":"https://api.github.com/users/GeorgeHahn/orgs","repos_url":"https://api.github.com/users/GeorgeHahn/repos","events_url":"https://api.github.com/users/GeorgeHahn/events{/privacy}","received_events_url":"https://api.github.com/users/GeorgeHahn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/GeorgeHahn/CS431_Project/milestones/1","html_url":"https://github.com/GeorgeHahn/CS431_Project/milestones/Planning","labels_url":"https://api.github.com/repos/GeorgeHahn/CS431_Project/milestones/1/labels","id":1328233,"number":1,"title":"Planning","description":null,"creator":{"login":"GeorgeHahn","id":502747,"avatar_url":"https://avatars.githubusercontent.com/u/502747?v=3","gravatar_id":"","url":"https://api.github.com/users/GeorgeHahn","html_url":"https://github.com/GeorgeHahn","followers_url":"https://api.github.com/users/GeorgeHahn/followers","following_url":"https://api.github.com/users/GeorgeHahn/following{/other_user}","gists_url":"https://api.github.com/users/GeorgeHahn/gists{/gist_id}","starred_url":"https://api.github.com/users/GeorgeHahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeorgeHahn/subscriptions","organizations_url":"https://api.github.com/users/GeorgeHahn/orgs","repos_url":"https://api.github.com/users/GeorgeHahn/repos","events_url":"https://api.github.com/users/GeorgeHahn/events{/privacy}","received_events_url":"https://api.github.com/users/GeorgeHahn/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":1,"state":"open","created_at":"2015-09-29T02:51:59Z","updated_at":"2015-10-14T04:54:00Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2015-10-02T19:45:24Z","updated_at":"2015-10-24T02:45:43Z","closed_at":null,"body":"You guys have any thoughts?"},"comment":{"url":"https://api.github.com/repos/GeorgeHahn/CS431_Project/issues/comments/150743868","html_url":"https://github.com/GeorgeHahn/CS431_Project/issues/2#issuecomment-150743868","issue_url":"https://api.github.com/repos/GeorgeHahn/CS431_Project/issues/2","id":150743868,"user":{"login":"GeorgeHahn","id":502747,"avatar_url":"https://avatars.githubusercontent.com/u/502747?v=3","gravatar_id":"","url":"https://api.github.com/users/GeorgeHahn","html_url":"https://github.com/GeorgeHahn","followers_url":"https://api.github.com/users/GeorgeHahn/followers","following_url":"https://api.github.com/users/GeorgeHahn/following{/other_user}","gists_url":"https://api.github.com/users/GeorgeHahn/gists{/gist_id}","starred_url":"https://api.github.com/users/GeorgeHahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeorgeHahn/subscriptions","organizations_url":"https://api.github.com/users/GeorgeHahn/orgs","repos_url":"https://api.github.com/users/GeorgeHahn/repos","events_url":"https://api.github.com/users/GeorgeHahn/events{/privacy}","received_events_url":"https://api.github.com/users/GeorgeHahn/received_events","type":"User","site_admin":false},"created_at":"2015-10-24T02:45:43Z","updated_at":"2015-10-24T02:45:43Z","body":"I just checked the tables that are created for the current models in Postgres, they're as follows:\r\n\r\n```SQL\r\nCREATE TABLE customer\r\n(\r\n  customer_id serial NOT NULL,\r\n  name text,\r\n  CONSTRAINT customer_pkey PRIMARY KEY (customer_id)\r\n)\r\n\r\nCREATE TABLE movie\r\n(\r\n  movie_id serial NOT NULL,\r\n  duration integer NOT NULL,\r\n  release_date timestamp without time zone NOT NULL,\r\n  genre text NOT NULL,\r\n  title text,\r\n  CONSTRAINT movie_pkey PRIMARY KEY (movie_id)\r\n)\r\n\r\nCREATE TABLE promotion\r\n(\r\n  promotion_id serial NOT NULL,\r\n  promotion_code text,\r\n  expiration timestamp without time zone NOT NULL,\r\n  promo_type text NOT NULL,\r\n  promo_value numeric(38,6) NOT NULL,\r\n  CONSTRAINT promotion_pkey PRIMARY KEY (promotion_id)\r\n)\r\n\r\nCREATE TABLE purchase\r\n(\r\n  purchase_id serial NOT NULL,\r\n  movie_id integer NOT NULL,\r\n  showing_id integer NOT NULL,\r\n  customer_id integer NOT NULL,\r\n  promotion_id integer,\r\n  purchase_time timestamp without time zone NOT NULL,\r\n  CONSTRAINT purchase_pkey PRIMARY KEY (purchase_id)\r\n)\r\n\r\nCREATE TABLE showing\r\n(\r\n  showing_id serial NOT NULL,\r\n  price numeric(38,6) NOT NULL,\r\n  \"time\" timestamp without time zone NOT NULL,\r\n  screen_number integer NOT NULL,\r\n  total_seats integer NOT NULL,\r\n  available_seats integer NOT NULL,\r\n  movie_id integer NOT NULL,\r\n  CONSTRAINT showing_pkey PRIMARY KEY (showing_id)\r\n)\r\n```\r\n\r\nWe can definitely relax those not nulls - that's just a matter of adding some `?`s to fields in [ModelBag.cs](https://github.com/GeorgeHahn/CS431_Project/blob/master/Models/ModelBag.cs)\r\n\r\nOne observation is that OrmLite has chosen to serialize the enumerations (movie genre and promotion type) as strings rather than integers. This isn't a pressing issue for us, but it means that changing the names of any values in those enumerations would put the database into an inconsistent state. So even though this would probably matter _a lot_ were we a production team, we don't need to care much as we can wipe the db whenever we want. Still, it wouldn't be a bad thing if this behavior were modified such that the enums were serialized as integer values."}}