class CreateViews < ActiveRecord::Migration
def self.up
create_view(:v_photo, "select description, content_type from photo")
do |t|
t.column :description
t.column :content_type
end
end
def self.down
drop_view(:v_photo)
end
end
I got the view created successfully, and also got this error
E:\Work\JRuby\MyApp>jruby --command rake environment
RAILS_ENV=development_postg
res db:migrate
(in E:/Work/JRuby/MyApp)
== CreateViews: migrating
class CreateViews < ActiveRecord::Migration
def self.up
create_view(:v_photo, "select description, content_type from photo")
do |t|
t.column :description
t.column :content_type
end
end
def self.down
drop_view(:v_photo)
end
end
I got the view created successfully, and also got this error
E:\Work\JRuby\MyApp>jruby --command rake environment
RAILS_ENV=development_postg
res db:migrate
(in E:/Work/JRuby/MyApp)
== CreateViews: migrating