14873: Adjusts latest API Server changes to be rails5 worthy.
[arvados.git] / services / api / db / migrate / 20140811184643_collection_use_regular_uuids.rb
index 5c21c0bb2d2f090a92fa852cb38db484ed99f4ee..62ef93f8c5019fdc34bfc7b920f5a0f76aa10623 100644 (file)
@@ -1,9 +1,13 @@
-class CollectionUseRegularUuids < ActiveRecord::Migration
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
+class CollectionUseRegularUuids < ActiveRecord::Migration[4.2]
   def up
     add_column :collections, :name, :string
     add_column :collections, :description, :string
     add_column :collections, :properties, :text
-    add_column :collections, :expire_time, :date
+    add_column :collections, :expires_at, :date
     remove_column :collections, :locator
 
     say_with_time "Step 1. Move manifest hashes into portable_data_hash field" do
@@ -175,6 +179,6 @@ where head_uuid like '________________________________+%' or tail_uuid like '___
   end
 
   def down
-    # Not gonna happen.
+    raise ActiveRecord::IrreversibleMigration, "Can't downmigrate changes to collections and links without potentially losing data."
   end
 end