Sha256: 8204637f2ec5c93a1b87073d1ef7467ae3db0a31dfa203b66cd4115943571354

Contents?: true

Size: 528 Bytes

Versions: 8

Compression:

Stored size: 528 Bytes

Contents

class AddAdminRoleTo<%= table_name.camelize %> < ActiveRecord::Migration
  def self.up
    change_table(:<%= table_name %>) do |t|
<%= migration_data -%>
    end
    add_index :<%= table_name %>, :email, unique: true
<%= create_default_admin %>
  end

  def self.down
    # By default, we don't want to make any assumption about how to roll back a migration when your
    # model already existed. Please edit below which fields you would like to remove in this migration.
    raise ActiveRecord::IrreversibleMigration
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
coalla-cms-0.4.2.0 lib/generators/coalla/cms/templates/migration_existing.rb
coalla-cms-0.7.0.0 lib/generators/coalla/cms/templates/migration_existing.rb
coalla-cms-0.5.2.4 lib/generators/coalla/cms/templates/migration_existing.rb
coalla-cms-0.6.1.1 lib/generators/coalla/cms/templates/migration_existing.rb
coalla-cms-0.6.0.9 lib/generators/coalla/cms/templates/migration_existing.rb
coalla-cms-0.4.4.3 lib/generators/coalla/cms/templates/migration_existing.rb
coalla-cms-0.5.1.9 lib/generators/coalla/cms/templates/migration_existing.rb
coalla-cms-0.5.1.8 lib/generators/coalla/cms/templates/migration_existing.rb