Fix frame data records being created for non-ugoira posts.

* Prevent non-ugoira posts from getting dummy frame data records with
  all the columns set to null.
* Make `data` and `content_type` columns NOT NULL, since they should
  always be present.
* Remove the timestamps while we're at it, since they don't seem
  necessary for anything.
This commit is contained in:
evazion
2014-10-17 18:08:00 -05:00
parent 260de869b1
commit 6ca01334af
3 changed files with 14 additions and 5 deletions

View File

@@ -2367,10 +2367,8 @@ ALTER SEQUENCE notes_id_seq OWNED BY notes.id;
CREATE TABLE pixiv_ugoira_frame_data (
id integer NOT NULL,
post_id integer,
data text,
content_type character varying(255),
created_at timestamp without time zone,
updated_at timestamp without time zone
data text NOT NULL,
content_type character varying(255) NOT NULL
);
@@ -7119,3 +7117,5 @@ INSERT INTO schema_migrations (version) VALUES ('20140725003232');
INSERT INTO schema_migrations (version) VALUES ('20141009231234');
INSERT INTO schema_migrations (version) VALUES ('20141017231608');