Class: CreateTexts

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/templates/20191017062519_create_texts.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
# File 'lib/generators/templates/20191017062519_create_texts.rb', line 2

def change
  create_table :texts do |t|
    t.string :key
    t.text :content

    t.timestamps
  end

  add_index :texts, :key, unique: true
end