Class: CreateFacebookVideos
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateFacebookVideos
- Defined in:
- lib/generators/fb_video_url_converter/templates/create_facebook_videos_migration.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
15 16 17 |
# File 'lib/generators/fb_video_url_converter/templates/create_facebook_videos_migration.rb', line 15 def self.down drop_table :facebook_videos end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/generators/fb_video_url_converter/templates/create_facebook_videos_migration.rb', line 2 def self.up create_table :facebook_videos do |t| t.column :video_id, :string t.column :name, :string t.column :url, :string, :default => nil t.column :views, :integer, :default => 1 t.column :cached_at, :datetime end add_index :facebook_videos, :video_id add_index :facebook_videos, :url end |