thingspeak/db/migrate/20110405211741_create_pipes.rb
2014-02-17 12:05:39 -05:00

20 lines
360 B
Ruby

class CreatePipes < ActiveRecord::Migration
def self.up
create_table :pipes do |t|
t.string :name, :null => false
t.string :url, :null => false
t.string :slug, :null => false, :unique => true
t.timestamps
end
add_index :pipes, :slug
end
def self.down
remove_index :pipes, :slug
drop_table :pipes
end
end