Sha256: aa1b38cc37132ebc7a2e91d4cc766865f8d6dffb434477307464273a764e4c66

Contents?: true

Size: 1.14 KB

Versions: 9

Compression:

Stored size: 1.14 KB

Contents

# WontoMedia - a wontology web application
# Copyright (C) 2010 - Glen E. Ivey
#    www.wontology.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License version
# 3 as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program in the file COPYING and/or LICENSE.  If not,
# see <http://www.gnu.org/licenses/>.


class ProvideScalarObjects < ActiveRecord::Migration
  def self.up
    add_column :connections, :kind_of_obj, :string    # really an enum
    add_column :connections, :scalar_obj, :string

    # all existing Connections have Items as their objects
    execute 'UPDATE connections SET kind_of_obj="item"'
  end

  def self.down
    remove_column :connections, :kind_of_object
    remove_column :connections, :scalar_obj
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
wontomedia-1.0.7 db/migrate/20100315135952_provide_scalar_objects.rb
wontomedia-1.0.6 db/migrate/20100315135952_provide_scalar_objects.rb
wontomedia-1.0.5 db/migrate/20100315135952_provide_scalar_objects.rb
wontomedia-1.0.4 db/migrate/20100315135952_provide_scalar_objects.rb
wontomedia-1.0.2 db/migrate/20100315135952_provide_scalar_objects.rb
wontomedia-1.0.1 db/migrate/20100315135952_provide_scalar_objects.rb
wontomedia-1.0.0 db/migrate/20100315135952_provide_scalar_objects.rb
wontomedia-0.2.1 db/migrate/20100315135952_provide_scalar_objects.rb
wontomedia-0.2.0 db/migrate/20100315135952_provide_scalar_objects.rb