What is :cascade in rails schema.rb and where did it come from?

The docs explain what :cascade does:

:force – Set to :cascade to drop dependent objects as well. Defaults to false.

One reason you may be seeing this is a change in Rails 4.2 in SchemaDumper to use :cascade, release notes.

Release notes about change:

SchemaDumper uses force: :cascade on create_table. This makes it possible to reload a schema when foreign keys are in place.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)