Class: Convertr::Migration

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/convertr/migration.rb

Class Method Summary collapse

Class Method Details

.downObject



33
34
35
36
# File 'lib/convertr/migration.rb', line 33

def self.down
  drop_table :tasks
  drop_table :files
end

.upObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/convertr/migration.rb', line 3

def self.up
  create_table :files do |t|
    t.string :filename
    t.string :location
    t.datetime :enqueue_at
    t.string :convertor
    t.datetime :broadcast_at
    t.integer :src_size
    t.integer :duration
    t.string :aspect, :limit => 10
    t.integer :width
    t.integer :height
    t.datetime :src_deleted_at
    t.datetime :convertor_deleted_at
  end

  create_table :tasks do |t|
    t.integer :file_id
    t.integer :bitrate
    t.string :convert_status, :limit => 20
    t.datetime :convert_started_at
    t.datetime :convert_stopped_at
    t.string :copy_status, :limit => 20
    t.datetime :copy_started_at
    t.datetime :copy_stopped_at
    t.boolean :crop
    t.boolean :deinterlace
  end
end