Permalink
Browse files

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...
1 parent bcaf441 commit fb142fecf78b0d0fa07427cd792e3b829ff5ffb3 @avonderluft avonderluft committed Jul 2, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 db/migrate/20110902203823_add_allowed_children_cache_to_pages.rb
@@ -1,6 +1,6 @@
class AddAllowedChildrenCacheToPages < ActiveRecord::Migration
def self.up
- add_column :pages, :allowed_children_cache, :string, :limit => 1500, :default => ''
+ add_column :pages, :allowed_children_cache, :text, :default => ''
Page.reset_column_information
Page.find_each do |page|
page.save # update the allowed_children_cache

4 comments on commit fb142fe

@saturnflyer
Member

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

@avonderluft
Member

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?

@jfahrenkrug
Member

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

@jomz
Member
jomz commented on fb142fe Dec 22, 2012

Does anyone know why this migration failed in the last (# 222) Travis build attempt?;
https://travis-ci.org/radiant/radiant/jobs/3291755/#L296

Please sign in to comment.