Merge branch '8784-dir-listings'
[arvados.git] / services / api / db / migrate / 20130326182917_create_commit_ancestors.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 class CreateCommitAncestors < ActiveRecord::Migration
6   def change
7     create_table :commit_ancestors do |t|
8       t.string :repository_name
9       t.string :descendant, :null => false
10       t.string :ancestor, :null => false
11       t.boolean :is, :default => false, :null => false
12
13       t.timestamps
14     end
15     add_index :commit_ancestors, [:descendant, :ancestor], :unique => true
16   end
17 end