lib/strong_migrations/checks.rb in strong_migrations-1.4.4 vs lib/strong_migrations/checks.rb in strong_migrations-1.5.0

- old
+ new

@@ -69,10 +69,14 @@ if type.to_s == "json" && postgresql? raise_error :add_column_json, command: command_str("add_column", [table, column, :jsonb, options]) end + + if type.to_s == "virtual" && options[:stored] + raise_error :add_column_generated_stored, rewrite_blocks: adapter.rewrite_blocks + end end def check_add_exclusion_constraint(*args) table = args[0] @@ -145,10 +149,10 @@ bad_index = index_value && !concurrently_set if bad_index || options[:foreign_key] if index_value.is_a?(Hash) options[:index] = options[:index].merge(algorithm: :concurrently) - else + elsif index_value options = options.merge(index: {algorithm: :concurrently}) end if StrongMigrations.safe_by_default safe_add_reference(*args, **options)