diff options
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20121209123234_add_queries_type.rb | 9 | ||||
-rw-r--r-- | db/migrate/20121209123358_update_queries_to_sti.rb | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/db/migrate/20121209123234_add_queries_type.rb b/db/migrate/20121209123234_add_queries_type.rb new file mode 100644 index 000000000..202d524e1 --- /dev/null +++ b/db/migrate/20121209123234_add_queries_type.rb @@ -0,0 +1,9 @@ +class AddQueriesType < ActiveRecord::Migration + def up + add_column :queries, :type, :string + end + + def down + remove_column :queries, :type + end +end diff --git a/db/migrate/20121209123358_update_queries_to_sti.rb b/db/migrate/20121209123358_update_queries_to_sti.rb new file mode 100644 index 000000000..d8dea4070 --- /dev/null +++ b/db/migrate/20121209123358_update_queries_to_sti.rb @@ -0,0 +1,9 @@ +class UpdateQueriesToSti < ActiveRecord::Migration + def up + ::Query.update_all :type => 'IssueQuery' + end + + def down + ::Query.update_all :type => nil + end +end |