I have the following rails migration:
create_table :articles do |t|
t.integer :user_id, :allow_null => false
t.integer :genre_id, :allow_null => false
t.string :url, :limit => 255, :allow_null => false
t.string :title, :limit => 60, :allow_null => false
t.text :summary, :limit => 350, :allow_null => false
t.integer :votes_count, :default => 0
t.datetime :published_at, :default => nil
t.timestamps
end
All the fields that are "NOT NULL" are validated in the model first, so I'm wondering if I need to bother having allow_null in the migration? I'm not sure what benefits "NOT NULL" gives to the database, if any.