Class: CreateNetworks

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

Class Method Summary collapse

Methods included from Six::Dbmanager::Migrate

included

Class Method Details

.downObject



19
20
21
22
23
# File 'lib/six-updater-web/db/migrate/20100425121901_create_networks.rb', line 19

def self.down
  drop_table :networks
  six_join(["mod", "network"], :down)
  remove_column :repositories, :network_id
end

.upObject



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

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

    t.string :name
    t.string :homepage
    t.boolean :disabled
    t.integer :priority

    t.timestamps :lock_version => false
  end
  six_join(["mod", "network"], :up, true)
  add_column :repositories, :network_id, :string, :limit => 36
end