Skip to content

002_create_playlists.rb

Joe Hellerstein edited this page Dec 8, 2015 · 1 revision

Copy this text into the file db/migrate/002_create_playlists.rb, overwriting what is there.

class CreatePlaylists < ActiveRecord::Migration
  def self.up
    create_table :playlists do |t|
      # t.column :name :string
      t.column :name, :string
      t.column :master, :boolean
      t.column :playlist_id, :integer
      t.column :playlist_persistent_id, :string
      t.column :visible, :boolean
      t.column :all_items, :boolean
    end
  end

  def self.down
    drop_table :playlists
  end
end
Clone this wiki locally