0 votes
in Ruby by
After this migration has been executed, which statement would be true?

class CreateGalleries < ActiveRecord::Migration

  def change

    create_table :galleries do |t|

      t.string :name, :bg_color

      t.integer :position

      t.boolean :visible, default: false

      t.timestamps

    end

  end

end

 a. The galleries table will have no primary key.

 b. The galleries table will include a column named "updated_at".

 c. The galleries table will contain exactly seven columns.

 d. The galleries table will have an index on the position column.

1 Answer

0 votes
by
After this migration has been executed, which statement would be true?

class CreateGalleries < ActiveRecord::Migration

  def change

    create_table :galleries do |t|

      t.string :name, :bg_color

      t.integer :position

      t.boolean :visible, default: false

      t.timestamps

    end

  end

end

 

 Correct answer is :-  The galleries table will include a column named "updated_at".

Related questions

0 votes
asked Sep 2, 2022 in Ruby by DavidAnderson
0 votes
asked Sep 3, 2022 in Ruby by DavidAnderson
...