Sha256: 7815ec69473595bc76319c97963d949d72507f830642c3a91250e5ccbf7a8c54

Contents?: true

Size: 861 Bytes

Versions: 6

Compression:

Stored size: 861 Bytes

Contents

class CreateAlbums < ActiveRecord::Migration
  def self.up
    create_table :albums do |t|
      t.string :title
			t.string :filename
      t.text :desc
			t.boolean :active
			t.string :heading
			t.string :nav
      t.timestamps
    end
		
		AdminMenuItem.create({:title =>"Albums", :controller_name => "albums", :url => "/albums"})
		MenuItem.create({:title => "All Albums", :url => "all/albums", :active => true})
		
		create_table :photos do |t|
      t.string :title
      t.text :desc
      t.date :date_shot
      t.string :location
			t.integer :album_id
			t.string 	:file_file_name
	    t.string 	:file_content_type
	    t.integer :file_file_size
	    t.datetime :file_updated_at
			t.integer :parent_id
			t.integer :lft
			t.integer :rgt
      t.timestamps
    end
		
  end
  
  def self.down
    drop_table :albums
		drop_table :photos
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
dust-generators-0.1.9 rails_generators/dust_albums/templates/migration/albums_migration.rb
dust-generators-0.1.8 rails_generators/dust_albums/templates/migration/albums_migration.rb
dust-generators-0.1.7 rails_generators/dust_albums/templates/migration/albums_migration.rb
dust-generators-0.1.6 rails_generators/dust_albums/templates/migration/albums_migration.rb
dust-generators-0.1.5 rails_generators/dust_albums/templates/migration/albums_migration.rb
dust-generators-0.1.4 rails_generators/dust_albums/templates/migration/albums_migration.rb