the migration to update canvas coordinates

This commit is contained in:
scibb 2016-08-09 10:04:10 +02:00
parent 696075bf0f
commit a6d39762db
2 changed files with 13 additions and 1 deletions

View file

@ -0,0 +1,12 @@
class UpdateMyModuleCoordinate < ActiveRecord::Migration
def change
MyModule.all.each do |my_module|
x = my_module.x
y = my_module.y
x = x * 32
y = y * 16
my_module.update(x: x)
my_module.update(y: y)
end
end
end

View file

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20160704110900) do
ActiveRecord::Schema.define(version: 20160809074757) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"