Does anyone know about this stuff, I'm getting frustrated by it.
DEPRECATION WARNING: Calling set_table_name is deprecated. Please use `self.table_name = 'the_name'` instead.(called from <top (required)> at /**/config/environment.rb:12)
== FillAppIdInCampaignPrices: migrating - ===================================
rake aborted!
An error has occurred, this and all later migrations canceled:
private method `import' called for #<Class:0x007fc9285fdfe0>
I've already changed from this:
set_table_name
to this:
self.table_name = 'the_name'
==================================================================================
This is environment.rb:
require File.expand_path('../application', __FILE__)
require 'octopus'
require Rails.root + 'lib/utils'
PublisServer::Application.initialize!
And this the migration:
class AddApprovedToContents < ActiveRecord::Migration
class Content < ActiveRecord::Base
self.table_name = 'contents'
end
def up
add_column :contents, :approved, :boolean, default: false
add_column :articles, :approved, :boolean, default: false
Content.update_all approved: true
Article.update_all approved: true
end
def down
remove_column :contents, :approved
remove_column :articles, :approved
end
end
I can't find FillAppIdInCampaignPrices: migrating I dont know where is come from.