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: 20150908084329_create_sensors.rb
    path of file: ./repos/ekylibre/db/migrate
    
    the code of the file until where you have to start completion: class CreateSensors < ActiveRecord::Migration[
    
  def change
    create_table :sensors do |t|
      t.string :vendor_euid, null: false
      t.string :model_euid, null: false
      t.string :name, null: false
      t.string :retrieval_mode, null: false
      t.json :access_parameters
      t.references :product, index: true
      t.boolean :embedded, default: false, null: false
      t.references :host, index: true
      t.boolean :active, default: true, null: false
      t.stamps
      t.index :vendor_euid
      t.index :model_euid
      t.index :name
    end

    add_reference :analyses, :host, index: true
    add_reference :analyses, :sensor, index: true
    add_column :analyses, :sampling_temporal_mode, :string, default: 'instant', null: false
    add_column :analyses, :stopped_at, :datetime
    add_column :analyses, :state, :string, default: 'ok', null: false
    add_column :analyses, :error_explanation, :string, null: true
  end