Class: CortexReaver::ConfigSchema

Inherits:
Sequel::Migration
  • Object
show all
Defined in:
lib/cortex_reaver/migrations/008_config.rb

Instance Method Summary collapse

Instance Method Details

#downObject



3
4
5
# File 'lib/cortex_reaver/migrations/008_config.rb', line 3

def down
  drop_table :config if table_exists? :config
end

#upObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/cortex_reaver/migrations/008_config.rb', line 7

def up
  unless table_exists? :config
    create_table :config do
      primary_key :id
      varchar :name
      varchar :author
      varchar :description
      boolean :debug, :default => false
      varchar :url
      text :keywords
      datetime :created_on, :null => false
      datetime :updated_on, :null => false
    end
  end
end