Skip to content
Browse files

Fix Migration to work under PostgreSQL

From J. Zellman

Postgres text type does not support an upper limit.
  • Loading branch information...
1 parent d67ce28 commit 4dae13c567328ba16e491fa96662e735b139480d @distler distler committed Jan 21, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 db/migrate/20091021024908_modify_text_types.rb
View
4 db/migrate/20091021024908_modify_text_types.rb
@@ -1,6 +1,8 @@
class ModifyTextTypes < ActiveRecord::Migration
def self.up
- change_column :revisions, :content, :text, :limit => 16777215
+ unless adapter_name.eql?('PostgreSQL')
+ change_column :revisions, :content, :text, :limit => 16777215
+ end
change_column :pages, :name, :string, :limit => 255
change_column :webs, :additional_style, :text
end

0 comments on commit 4dae13c

Please sign in to comment.
Something went wrong with that request. Please try again.