Skip to content
This repository
Browse code

change to corrected type in later migration; since that column type w…

…ill not work with Oracle backend (cannot convert varchar2 to clob)
  • Loading branch information...
commit fb142fecf78b0d0fa07427cd792e3b829ff5ffb3 1 parent bcaf441
Andrew vonderLuft authored July 02, 2012
2  db/migrate/20110902203823_add_allowed_children_cache_to_pages.rb
... ...
@@ -1,6 +1,6 @@
1 1
 class AddAllowedChildrenCacheToPages < ActiveRecord::Migration
2 2
   def self.up
-    add_column :pages, :allowed_children_cache, :string, :limit => 1500, :default => ''
+    add_column :pages, :allowed_children_cache, :text, :default => ''
4 4
5 5
     Page.find_each do |page|
6 6 # update the allowed_children_cache

4 notes on commit fb142fe

Jim Gay

this should be done in a migration, not altering an existing one

Andrew vonderLuft

uh... I know. But the problem is that the subsequent migration which does this will not run in oracle, since oracle cannot convert varchar2 to clob (string --> text). I know this is not ideal, but I didn't see how anyone would be hurt by it. Those who have already run it, but not the later one will end up the same, and those who have not run it will end up the same.

Those who are cursed with using Oracle will now be able to run the migrations, and end up the same.

Make sense?

Johannes Fahrenkrug

Makes sense to me. I've run into a similar case with DB2.

Benny Degezelle

Does anyone know why this migration failed in the last (# 222) Travis build attempt?;

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