You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: 20151027085923_add_supervisions.rb
    path of file: ./repos/ekylibre/db/migrate
    
    the code of the file until where you have to start completion: class AddSupervisions < ActiveRecord::Migration[4.2]
  def change
    create_table :supervisions do |t|
      t.string :name, null: false
      t.integer :time_window
      t.json :view_parameters
      t.stamps
      t.index :name
    end

    create_table :supervision_items do |t|
      t.references :supervision, null: false, index: true
      t.references :sensor,      null: fal
    
  def change
    create_table :supervisions do |t|
      t.string :name, null: false
      t.integer :time_window
      t.json :view_parameters
      t.stamps
      t.index :name
    end

    create_table :supervision_items do |t|
      t.references :supervision, null: false, index: true
      t.references :sensor,      null: false, index: true
      t.string :color
      t.stamps
    end

    add_column :sensors, :token, :string

    reversible do |d|
      d.up do
        change_column_null :sensors, :vendor_euid, true
        change_column_null :sensors, :model_euid, true
        execute "UPDATE sensors SET retrieval_mode = 'requesting'"
      end
      d.down do
        execute "UPDATE sensors SET retrieval_mode = CASE WHEN active THEN 'automatic' ELSE 'manual' END"
      end
    end
  end