Skip to content

Commit

Permalink
Use standard way of generating migrations in engines
Browse files Browse the repository at this point in the history
  • Loading branch information
ramontayag committed Jul 9, 2018
1 parent edc3165 commit cb4ea65
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 23 deletions.
4 changes: 1 addition & 3 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ Installation
============

- Add the gem to your Gemfile `gem "plutus"`

- generate migration files `rails g plutus`

- generate migration files `rake plutus:install:migrations`
- run migrations `rake db:migrate`

Overview
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class CreatePlutusTables < ActiveRecord::Migration[4.2]
def self.up
def change
create_table :plutus_accounts do |t|
t.string :name
t.string :type
Expand Down Expand Up @@ -30,10 +30,4 @@ def self.up
add_index :plutus_amounts, [:account_id, :entry_id]
add_index :plutus_amounts, [:entry_id, :account_id]
end

def self.down
drop_table :plutus_accounts
drop_table :plutus_entries
drop_table :plutus_amounts
end
end
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class CreatePlutusTables < ActiveRecord::Migration[4.2]
def self.up
def change
create_table :plutus_accounts do |t|
t.string :name
t.string :type
Expand Down Expand Up @@ -30,10 +30,4 @@ def self.up
add_index :plutus_amounts, [:account_id, :entry_id]
add_index :plutus_amounts, [:entry_id, :account_id]
end

def self.down
drop_table :plutus_accounts
drop_table :plutus_entries
drop_table :plutus_amounts
end
end
6 changes: 0 additions & 6 deletions lib/generators/plutus/templates/add_date_migration.rb

This file was deleted.

0 comments on commit cb4ea65

Please sign in to comment.