Class: CreateItems

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/dircat/cat_on_sqlite/migration/03_create_items.rb

Class Method Summary collapse

Class Method Details

.downObject



20
21
22
# File 'lib/dircat/cat_on_sqlite/migration/03_create_items.rb', line 20

def self.down
  drop_table :items
end

.upObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/dircat/cat_on_sqlite/migration/03_create_items.rb', line 3

def self.up
  create_table :items do |t|

    t.string :md5

    t.string :name, :null => false
    t.string :path, :null => false
    t.string :path_from_catalog_root, :null => false
    t.integer :size

    t.date :added_at, :null => false

    t.integer :rating
    t.date :flagged_at
  end
end