10 lines
239 B
Ruby
10 lines
239 B
Ruby
class AddObjectIdToPost < ActiveRecord::Migration
|
|
def self.up
|
|
add_column(:posts, :objectId, :integer)
|
|
execute("UPDATE posts SET objectId = object_url")
|
|
end
|
|
|
|
def self.down
|
|
add_column(:posts, :objectId, :integer)
|
|
end
|
|
end
|