Class: CreateCategories

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/six-updater-web/db/migrate/20100520101652_create_categories.rb

Class Method Summary collapse

Class Method Details

.downObject



17
18
19
20
# File 'lib/six-updater-web/db/migrate/20100520101652_create_categories.rb', line 17

def self.down
  drop_table :categories
  drop_table :categories_mods
end

.upObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/six-updater-web/db/migrate/20100520101652_create_categories.rb', line 2

def self.up
  create_table :categories, :id => false do |t|
    t.string :id, :limit => 36, :null => false, :primary => true
    t.string :name

    t.timestamps :lock_version => false
  end

  create_table :categories_mods, :id => false do |t|
    t.string :category_id, :limit => 36
    t.string :mod_id, :limit => 36
  end
  # generate the join tables
end