Sha256: 753f640f17fc5d37266b9c44c96febd63d3f6b9288c70cbf923370b40dfd325f

Contents?: true

Size: 232 Bytes

Versions: 33

Compression:

Stored size: 232 Bytes

Contents

class AddSortField < ActiveRecord::Migration
  def self.up
    add_column :nodes, :position, :float, :default => 1.0
    execute "UPDATE nodes SET position = 1.0;"
  end

  def self.down
    remove_column :nodes, :position
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
zena-1.2.8 db/fix/old_migrations/014_add_sort_field.rb
zena-1.2.7 db/fix/old_migrations/014_add_sort_field.rb
zena-1.2.6 db/fix/old_migrations/014_add_sort_field.rb
zena-1.2.5 db/fix/old_migrations/014_add_sort_field.rb
zena-1.2.4 db/fix/old_migrations/014_add_sort_field.rb
zena-1.2.3 db/fix/old_migrations/014_add_sort_field.rb
zena-1.2.2 db/fix/old_migrations/014_add_sort_field.rb
zena-1.2.1 db/fix/old_migrations/014_add_sort_field.rb
zena-1.2.0 db/fix/old_migrations/014_add_sort_field.rb
zena-1.1.3 db/fix/old_migrations/014_add_sort_field.rb
zena-1.1.2 db/fix/old_migrations/014_add_sort_field.rb
zena-1.1.1 db/fix/old_migrations/014_add_sort_field.rb
zena-1.1.0 db/fix/old_migrations/014_add_sort_field.rb
zena-1.0.0 db/fix/old_migrations/014_add_sort_field.rb
zena-1.0.0.rc3 db/fix/old_migrations/014_add_sort_field.rb
zena-1.0.0.rc2 db/fix/old_migrations/014_add_sort_field.rb
zena-1.0.0.rc1 db/fix/old_migrations/014_add_sort_field.rb
zena-0.16.9 db/migrate/014_add_sort_field.rb
zena-1.0.0.beta3 db/migrate/014_add_sort_field.rb
zena-0.16.8 db/migrate/014_add_sort_field.rb