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: 2_create_books_table.rb
    path of file: ./repos/rein/spec/migrations
    
    the code of the file until where you have to start completion: class CreateBooksTable < Migration
  def change
    create_table :books do |t|
      if Active
    
  def change
    create_table :books do |t|
      if ActiveRecord::VERSION::STRING >= '5.0.0'
        # Rails 5 automatically adds an index for belongs_to associations. Turn
        # this behaviour off, so we can manually add the index in a later
        # migration and test adding an index via Rein.
        t.belongs_to :author, null: false, index: false
      else
        t.belongs_to :author, null: false
      end
      t.string :isbn, null: false
      t.string :title, null: false
      t.string :state, null: false
      t.integer :published_month, null: false
      t.date :due_date
      t.string :holder
      t.text :call_number
    end