Skip to content

Commit

Permalink
Merge pull request #181 from swrobel/no-force-in-migration
Browse files Browse the repository at this point in the history
Remove force: true from create_table
  • Loading branch information
orien authored Jan 25, 2020
2 parents 1796552 + ac80560 commit 9bebd59
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,23 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Added

- Metadata stored by default in a json(b) column for new installs ([#178]).
- Test against Rails 6.0, ([#176]).

- Added support for Ruby 2.7 ([#180]).
- Support for Ruby 2.7 ([#180]).

### Changed

- Prevent using Ruby 2.2 via restrictions in Gemfile and Gemspec, ([#175]).
- Metadata stored by default in a json(b) column for new installs ([#178]).

- Remove `force: true` from migration ([#181]).

- Prevent using Ruby 2.2 via restrictions in Gemfile and Gemspec ([#175]).

[#175]: https://github.com/envato/double_entry/pull/175
[#176]: https://github.com/envato/double_entry/pull/176
[#178]: https://github.com/envato/double_entry/pull/178
[#180]: https://github.com/envato/double_entry/pull/180
[#181]: https://github.com/envato/double_entry/pull/181

## [2.0.0.beta3] - 2019-11-14

Expand Down
8 changes: 4 additions & 4 deletions lib/generators/double_entry/install/templates/migration.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class CreateDoubleEntryTables < ActiveRecord::Migration<%= migration_version %>
def self.up
create_table "double_entry_account_balances", :force => true do |t|
create_table "double_entry_account_balances" do |t|
t.string "account", :null => false
t.string "scope"
t.bigint "balance", :null => false
Expand All @@ -10,7 +10,7 @@ def self.up
add_index "double_entry_account_balances", ["account"], :name => "index_account_balances_on_account"
add_index "double_entry_account_balances", ["scope", "account"], :name => "index_account_balances_on_scope_and_account", :unique => true

create_table "double_entry_lines", :force => true do |t|
create_table "double_entry_lines" do |t|
t.string "account", :null => false
t.string "scope"
t.string "code", :null => false
Expand All @@ -35,7 +35,7 @@ def self.up
add_index "double_entry_lines", ["scope", "account", "created_at"], :name => "lines_scope_account_created_at_idx"
add_index "double_entry_lines", ["scope", "account", "id"], :name => "lines_scope_account_id_idx"

create_table "double_entry_line_checks", :force => true do |t|
create_table "double_entry_line_checks" do |t|
t.references "last_line", :null => false, :index => false
t.boolean "errors_found", :null => false
t.text "log"
Expand All @@ -45,7 +45,7 @@ def self.up
add_index "double_entry_line_checks", ["created_at", "last_line_id"], :name => "line_checks_created_at_last_line_id_idx"
<%- unless json_metadata -%>
create_table "double_entry_line_metadata", :force => true do |t|
create_table "double_entry_line_metadata" do |t|
t.references "line", :null => false, :index => false
t.string "key", :null => false
t.string "value", :null => false
Expand Down

0 comments on commit 9bebd59

Please sign in to comment.