Sha256: 9d3331e6bc44fe2d134c517e5756744484a1523bbf7cb29e2da0eec6c696eb43

Contents?: true

Size: 1.23 KB

Versions: 5

Compression:

Stored size: 1.23 KB

Contents

class CreateSections < ActiveRecord::Migration[5.0]
  def self.up
    create_table :sections do |t|

      t.string :name, null: false, limit: 64
      t.string :code, null: false, limit: 64
      
      t.string :title, :null => false, :limit=>256
      t.string :sub_title, :null => false, :limit=>256
      
      t.string :short_description, :limit=>1048
      t.text :long_description

      t.string :button_one_text, :limit=>64
      t.string :button_two_text, :limit=>64
      t.string :button_one_link, :limit=>512
      t.string :button_two_link, :limit=>512
      
      t.string :status, :null => false, :default=>"unpublished", :limit=>16
      t.integer :priority, default: 1, null: false

      t.references :page, index: true

      t.boolean :enable_title, default: false
      t.boolean :enable_sub_title, default: false
      t.boolean :enable_short_description, default: false
      t.boolean :enable_long_description, default: false
      t.boolean :enable_button_one, default: false
      t.boolean :enable_button_two, default: false
      t.boolean :enable_cover_image, default: false
      t.boolean :enable_gallery_images, default: false

      t.timestamps null: false
    end
  end

  def self.down
    drop_table :sections
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
dhatu-0.3.0.pre.materialize db/migrate/20171010055102_create_sections.rb
dhatu-0.2.3 db/migrate/20171010055102_create_sections.rb
dhatu-0.2.2 db/migrate/20171010055102_create_sections.rb
dhatu-0.2.1 db/migrate/20171010055102_create_sections.rb
dhatu-0.2.0 db/migrate/20171010055102_create_sections.rb