Class: CreateCommandTable

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/orientea/command/templates/create_command.rb

Instance Method Summary collapse

Instance Method Details

#downObject



11
12
13
# File 'lib/generators/orientea/command/templates/create_command.rb', line 11

def down
  drop_table :orientea_commands
end

#upObject



2
3
4
5
6
7
8
9
# File 'lib/generators/orientea/command/templates/create_command.rb', line 2

def up
  execute "CREATE EXTENSION IF NOT EXISTS hstore"
  create_table :orientea_commands do |t|
    t.hstore :data
    t.boolean :done
    t.string :type
  end
end