Class: CreateBlocks

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/templates/create_blocks.rb

Class Method Summary collapse

Class Method Details

.downObject



24
25
26
# File 'lib/generators/templates/create_blocks.rb', line 24

def self.down
  drop_table :blocks
end

.upObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/generators/templates/create_blocks.rb', line 2

def self.up
  create_table :blocks do |t|
    t.string :title
    t.text :body
    t.integer :position
    t.string :region
    t.integer :resource_id
    t.string :resource_type
    t.string :url
    t.string :link_title
    t.string :block_image_file_name
    t.string :block_image_content_type
    t.integer :block_image_file_size
    t.datetime :block_image_updated_at
    t.string :sub_head

    t.timestamps
    
  end
  
end