Class: CreateServers

Inherits:
ActiveRecord::Migration
  • Object
show all
Includes:
Six::Dbmanager::Migrate
Defined in:
lib/six-updater-web/db/migrate/20090826185847_create_servers.rb

Class Method Summary collapse

Methods included from Six::Dbmanager::Migrate

included

Class Method Details

.downObject



18
19
20
21
# File 'lib/six-updater-web/db/migrate/20090826185847_create_servers.rb', line 18

def self.down
  drop_table :servers
  six_join(["server", "sixconfig"], :down)
end

.upObject



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/six-updater-web/db/migrate/20090826185847_create_servers.rb', line 4

def self.up
  create_table :servers do |t|
    t.string :name
    t.string :address
    t.integer :port
    t.string :password

    t.timestamps :lock_version => false
  end

  # generate the join tables
  six_join(["server", "sixconfig"])
end