debian-mirror-gitlab/db/migrate/20200731090553_create_experiment_user.rb

22 lines
508 B
Ruby
Raw Normal View History

2020-10-24 23:57:45 +05:30
# frozen_string_literal: true
class CreateExperimentUser < ActiveRecord::Migration[6.0]
DOWNTIME = false
def up
create_table :experiment_users do |t|
t.bigint :experiment_id, null: false
t.bigint :user_id, null: false
t.integer :group_type, limit: 2, null: false, default: 0
t.timestamps_with_timezone null: false
end
add_index :experiment_users, :experiment_id
add_index :experiment_users, :user_id
end
def down
drop_table :experiment_users
end
end