8784: Fix test for latest firefox.
[arvados.git] / services / api / db / migrate / 20161115171221_add_output_and_log_uuid_to_container_request.rb
1 require 'has_uuid'
2
3 class AddOutputAndLogUuidToContainerRequest < ActiveRecord::Migration
4   extend HasUuid::ClassMethods
5
6   def up
7     add_column :container_requests, :output_uuid, :string
8     add_column :container_requests, :log_uuid, :string
9
10     no_such_out_coll = Server::Application.config.uuid_prefix + '-' + '4zz18' + '-xxxxxxxxxxxxxxx'
11     no_such_log_coll = Server::Application.config.uuid_prefix + '-' + '4zz18' + '-yyyyyyyyyyyyyyy'
12
13     update_sql <<-EOS
14 update container_requests set output_uuid = ('#{no_such_out_coll}'), log_uuid = ('#{no_such_log_coll}');
15 EOS
16   end
17
18   def down
19     remove_column :container_requests, :log_uuid
20     remove_column :container_requests, :output_uuid
21   end
22 end