Permalink
Browse files

Expanded blobs' mime field to 256 chars, because 64 wasn't enough.

  • Loading branch information...
1 parent 047957f commit a8f173aed95dd659b4fef539fd87e0a5a5a2c920 @pwnall pwnall committed Apr 16, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 app/models/blob.rb
  2. +2 −2 db/migrate/20100715070906_create_blobs.rb
View
@@ -11,7 +11,7 @@ class Blob < ActiveRecord::Base
:uniqueness => { :scope => :repository_id }
# The MIME type for the blob (helpful for generating a preview).
- validates :mime_type, :length => 1..64, :presence => true
+ validates :mime_type, :length => 1..256, :presence => true
# The size of the data in the blob.
validates :size, :presence => true,
@@ -2,9 +2,9 @@ class CreateBlobs < ActiveRecord::Migration
def change
create_table :blobs do |t|
t.integer :repository_id, :null => false
- t.string :gitid, :limit => 64, :null => false
- t.string :mime_type, :limit => 64, :null => false
t.integer :size, :null => false
+ t.string :gitid, :limit => 64, :null => false
+ t.string :mime_type, :limit => 256, :null => false
end
add_index :blobs, [:repository_id, :gitid], :unique => true, :null => false
end

0 comments on commit a8f173a

Please sign in to comment.