Skip to content

Commit

Permalink
FIX: set default on theme.key, if it has not yet been dropped (#6095)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaylorhq authored and SamSaffron committed Jul 16, 2018
1 parent 331296e commit f4c902b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions db/migrate/20180716200103_add_theme_key_default.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class AddThemeKeyDefault < ActiveRecord::Migration[5.2]
def up
if column_exists?(:themes, :key)
execute("ALTER TABLE themes ALTER COLUMN key SET DEFAULT 'deprecated'")
end
end

def down
raise ActiveRecord::IrreversibleMigration
end
end

1 comment on commit f4c902b

@discoursebot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/importing-or-creating-a-theme-causes-a-500-error/92486/4

Please sign in to comment.