lib/strong_migrations/migration.rb in strong_migrations-0.1.5 vs lib/strong_migrations/migration.rb in strong_migrations-0.1.6

- old
+ new

@@ -30,19 +30,21 @@ columns = args[1] if columns.is_a?(Array) && columns.size > 3 raise_error :add_index_columns end options = args[2] - if %w(PostgreSQL PostGIS).include?(connection.adapter_name) && !(options && options[:algorithm] == :concurrently) + if %w(PostgreSQL PostGIS).include?(connection.adapter_name) && !(options && options[:algorithm] == :concurrently) && !@new_tables.to_a.include?(args[0].to_s) raise_error :add_index end when :add_column type = args[2] options = args[3] raise_error :add_column_default if options && !options[:default].nil? raise_error :add_column_json if type.to_s == "json" when :change_column raise_error :change_column + when :create_table + (@new_tables ||= []) << args[0].to_s end end super end