CreateParticipants   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 10
rs 10
wmc 1
1
# frozen_string_literal: true
2
3
# Creates table for Survey Participants
4
class CreateParticipants < ActiveRecord::Migration[5.1]
5
  def change
6
    create_table :participants, comment: 'Participants table' do |t|
7
      t.string :email, null: false, index: true, unique: true
8
      t.string :identifier, null: true, index: true, unique: true
9
      t.references :user, null: true, index: true
10
      t.timestamps null: false, default: -> { 'CURRENT_TIMESTAMP' }
11
    end 
12
  end
13
end
14