Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add migration to absolutely ensure that everyone is up to date with t…

…he new column name for user plugins
  • Loading branch information...
commit 497ac42952775a9ee1b50bfc334af72366a10167 1 parent 103be21
@parndt parndt authored
View
9 db/migrate/20100708014636_ensure_user_plugins_use_name_and_not_title.rb
@@ -0,0 +1,9 @@
+class EnsureUserPluginsUseNameAndNotTitle < ActiveRecord::Migration
+ def self.up
+ rename_column :user_plugins, :title, :name if UserPlugin.table_exists? and UserPlugin.column_names.include?('title') and !UserPlugin.column_names.include?('name')
+ end
+
+ def self.down
+ # We don't need to go backwards, there already is one that should handle that..
+ end
+end
View
1  refinerycms.gemspec
@@ -81,6 +81,7 @@ Gem::Specification.new do |s|
'db/migrate/20100629081543_add_callback_proc_as_string_to_refinery_settings.rb',
'db/migrate/20100701053151_remove_superuser_from_users.rb',
'db/migrate/20100702022630_add_spam_to_inquiries.rb',
+ 'db/migrate/20100708014636_ensure_user_plugins_use_name_and_not_title.rb',
'db/schema.rb',
'db/seeds',
'db/seeds/inquiry_settings.rb',
Please sign in to comment.
Something went wrong with that request. Please try again.