# Migration for secondary database
# In this particular case, the database is shared by several apps,
# because it's used for lighty's mod_mysql_vhost (hence why the
# table should never be dropped).
class CreateDomains < ActiveRecord::Migration
def self.up
Domain.connection.create_table :lighttpd do |t|
t.column :url, :string, :null => false
t.column :path, :string, :null => false
t.column :instance_id, :integer, :null => false
end unless Domain.connection.tables.include?("lighttpd")
end
def self.down
# NEVER drop - as used by multiple instances
# Domain.connection.drop_table :lighttpd
end
end