Sha256: 1e310c1c4f7dbcdd1e6d29d565e78c7b7c6254b3d9fc94f77055b432c4733ce5

Contents?: true

Size: 785 Bytes

Versions: 4

Compression:

Stored size: 785 Bytes

Contents

class CreatePhotoAlbums < ActiveRecord::Migration[5.1]
  def change
    create_table :photo_albums do |t|
      t.string :name, :null => false, limit: 128
      t.string :code, :null => false, limit: 128
      t.string :one_liner
      t.string :permalink, :null => false, limit: 128
      t.text   :description
      
      t.references :parent, references: :category
      t.references :top_parent, references: :category
      t.boolean :end_node, default: true
      
      t.string :status, :null => false, :default=>"unpublished", :limit=>16
      t.boolean :featured, default: false
      t.integer :priority, default: 1, null: false

      t.timestamps null: false
    end

    add_index :photo_albums, :permalink, :unique => true
    add_index :photo_albums, :status
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dhatu-0.3.0.pre.materialize db/migrate/20180101093437_create_photo_albums.rb
dhatu-0.2.3 db/migrate/20180101093437_create_photo_albums.rb
dhatu-0.2.2 db/migrate/20180101093437_create_photo_albums.rb
dhatu-0.2.1 db/migrate/20180101093437_create_photo_albums.rb