From cb0d0f1b375a4632f71fa58f07ea2ae2eee0a9ac Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Fri, 12 Jan 2018 14:18:45 +1100 Subject: [PATCH] chore: ensure schema migrations is not cleared by seeding --- tasks/database/table_dependency_calculator.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tasks/database/table_dependency_calculator.rb b/tasks/database/table_dependency_calculator.rb index 9ea8f6be9..bc02fa144 100644 --- a/tasks/database/table_dependency_calculator.rb +++ b/tasks/database/table_dependency_calculator.rb @@ -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