Class: CreateCategories

Inherits:
Sequel::Migration show all
Defined in:
lib/migrations/001_create_categories.rb

Instance Method Summary collapse

Methods inherited from Sequel::Migration

apply, descendants, inherited, #initialize, #method_missing

Constructor Details

This class inherits a constructor from Sequel::Migration

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Sequel::Migration

Instance Method Details

#downObject


10
11
12
# File 'lib/migrations/001_create_categories.rb', line 10

def down
  drop_table(:categories)
end

#upObject


2
3
4
5
6
7
8
# File 'lib/migrations/001_create_categories.rb', line 2

def up
  create_table :categories do
    primary_key :id
    String :name
    DateTime :created_at
  end
end