Class: CreateAuthors

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/dummy/templates/migrations/create_authors.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
13
# File 'lib/generators/dummy/templates/migrations/create_authors.rb', line 2

def change
  create_table :authors do |t|
    t.string  :name,        :null => false
    t.string  :surname
    t.text    :bio
    t.date    :birth_date
    t.string    :wiki_link
    t.integer    :publisher_id

    t.timestamps(null: false)
  end
end