Sha256: ffc772b2d9c30d2c131299aa626d1f5acf63d6340c69d97b5479049e03e605c5

Contents?: true

Size: 605 Bytes

Versions: 9

Compression:

Stored size: 605 Bytes

Contents

class CreateStorytimeSnippets < ActiveRecord::Migration
  def up
    create_table :storytime_snippets do |t|
      t.string :name, index: true
      t.text :content

      t.timestamps
    end

    Storytime::Role.seed
    Storytime::Action.seed

    manage_snippets = Storytime::Action.find_by(guid: "5qg25i")
    Storytime::Permission.find_or_create_by(role: Storytime::Role.find_by(name: "editor"), action: manage_snippets)
    Storytime::Permission.find_or_create_by(role: Storytime::Role.find_by(name: "admin"), action: manage_snippets)
  end

  def down
    drop_table :storytime_snippets
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
storytime-2.0.0 db/migrate/20141021073356_create_storytime_snippets.rb
storytime-1.2.0 db/migrate/20141021073356_create_storytime_snippets.rb
storytime-1.1.1 db/migrate/20141021073356_create_storytime_snippets.rb
storytime-1.0.7 db/migrate/20141021073356_create_storytime_snippets.rb
storytime-1.0.6 db/migrate/20141021073356_create_storytime_snippets.rb
storytime-1.0.5 db/migrate/20141021073356_create_storytime_snippets.rb
storytime-1.0.2 db/migrate/20141021073356_create_storytime_snippets.rb
storytime-1.0.1 db/migrate/20141021073356_create_storytime_snippets.rb
storytime-1.0.0 db/migrate/20141021073356_create_storytime_snippets.rb