-require 'migrate'
+require "migrate"
-class CreateUserBlocks < ActiveRecord::Migration
+class CreateUserBlocks < ActiveRecord::Migration[5.0]
def change
create_table :user_blocks do |t|
t.column :user_id, :bigint, :null => false
t.column :needs_view, :boolean, :null => false, :default => false
t.column :revoker_id, :bigint
- t.timestamps
+ t.timestamps :null => true
end
add_foreign_key :user_blocks, :users, :name => "user_blocks_user_id_fkey"