Class: CreateSlickrPages

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/slickr/templates/migrations/create_slickr_pages.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/generators/slickr/templates/migrations/create_slickr_pages.rb', line 2

def change
  create_table :slickr_pages do |t|
    t.string    :title
    t.string    :slug
    t.string    :ancestry
    t.string    :aasm_state
    t.json      :content, default: "[]"
    t.string    :type
    t.integer   :page_id
    t.integer   :active_draft_id
    t.integer   :published_draft_id
    t.text      :page_header
    t.text      :page_intro
    t.string    :layout
    t.string    :meta_title
    t.text      :meta_description
    t.text      :og_title
    t.text      :og_title_2
    t.text      :og_description
    t.text      :og_description_2
    t.text      :og_image
    t.text      :og_image_2
    t.datetime  :published_at
    t.datetime  :publishing_scheduled_for

    t.timestamps
  end
  add_index :slickr_pages, :slug, unique: true
  add_index :slickr_pages, :ancestry
end