Class: CreateImages

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

Class Method Summary collapse

Class Method Details

.downObject



13
14
15
# File 'lib/dircat/cat_on_sqlite/migration/02_create_images.rb', line 13

def self.down
  drop_table :images
end

.upObject



3
4
5
6
7
8
9
10
11
# File 'lib/dircat/cat_on_sqlite/migration/02_create_images.rb', line 3

def self.up
  create_table :images do |t|
    t.string :path, :null => false
    t.string :path_from_catalog_root, :null => false

    t.integer :tag_id
    t.integer :item_id
  end
end