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:
9
db/migrate/20141017231608_fix_pixiv_ugoira_frame_data.rb
Normal file
9
db/migrate/20141017231608_fix_pixiv_ugoira_frame_data.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class FixPixivUgoiraFrameData < ActiveRecord::Migration
|
||||
def change
|
||||
change_table :pixiv_ugoira_frame_data do |t|
|
||||
t.change :data, :text, :null => false
|
||||
t.change :content_type, :string, :null => false
|
||||
t.remove_timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user