Skip to content

Commit

Permalink
chore: ensure schema migrations is not cleared by seeding
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Jan 12, 2018
1 parent 47e282f commit cb0d0f1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tasks/database/table_dependency_calculator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ def call
.collect{|it| @connection.foreign_key_list(it)
.collect{|fk| {from: it, to: fk[:table]} } }
.flatten
.uniq - [:schema_migrations]
check(@connection.tables, dependencies, ordered_table_names)
.uniq
table_names = @connection.tables - [:schema_migrations, :schema_info]
check(table_names, dependencies, ordered_table_names)
ordered_table_names
end

Expand Down

0 comments on commit cb0d0f1

Please sign in to comment.