- Fixed false positive for
add_referencewithforeign_key: {validate: false}
- Fixed
transaction_timeoutoption with DDL transaction
- Added check for
rename_schema - Made
auto_analyzeapply toadd_reference
- Added
remove_invalid_indexesoption to install generator - Added experimental
transaction_timeoutoption - Dropped support for Ruby < 3.2 and Active Record < 7.1
- Added check for
change_columnfor columns with check constraints with Postgres
- Added support for
change_column_nullwith default value withsafe_by_defaultoption - Improved backfill instructions
- Fixed
safe_by_defaultapplying to migrations beforestart_after
- Fixed constraint name for long table and column names with
change_column_null - Dropped support for Active Record < 7
- Added
skip_databasemethod - Added experimental
remove_invalid_indexesoption - Added warning for unsupported adapters
- Improved output for
db:forward,db:rollback,db:migrate:up, anddb:migrate:down - Made operations more retriable with
safe_by_default
- Fixed migrations not running with Active Record 8 rc2
- Fixed issue with
alphabetize_schemaand virtual columns
- Improved install generator for Trilogy
- Fixed charset check for MariaDB 11.4
- Dropped support for Ruby < 3.1 and Active Record < 6.1
- Dropped support for Postgres < 12, MySQL < 8.0, and MariaDB < 10.5
- Added check for
add_columnwith auto-incrementing columns - Updated instructions for removing a column to append to
ignored_columns - Fixed check for adding a column with a default value for MySQL and MariaDB
- Added check for
add_unique_constraint
- Fixed false positives with
revert
- Added support for Trilogy
- Fixed foreign key options with
add_referenceandsafe_by_default - Fixed
safety_assuredwithrevert
- Fixed
safety_assuredfor custom checks withsafe_by_default
- Added check for
change_column_default
- Added check for
add_columnwith stored generated columns - Fixed
add_referencewithforeign_keyandindex: false
- Fixed
add_foreign_keywithnameandcolumnoptions withsafe_by_default
- Fixed check for
change_columnto account for charset with MySQL and MariaDB
- Added
alphabetize_schemaoption
- Added support for multiple databases to
target_version
- Added check for
add_exclusion_constraint - Added support for
RACK_ENV - Fixed error when
Railsdefined withoutRails.env - Fixed error with
change_column_nullwhen table does not exist
- Improved error message for
add_columnwithdefault: nilwith Postgres 10
- Fixed check for
add_columnwithdefault: nilwith Postgres 10
- Added check for
add_columnwithuuidtype and volatile default value
- Added check for index corruption with Postgres 14.0 to 14.3
- Added check for
forceoption withcreate_join_table - Improved errors for extra arguments
- Fixed ignoring extra arguments with
safe_by_default - Fixed missing options with
remove_indexandsafe_by_default
New safe operations with MySQL and MariaDB
- Setting
NOT NULLon an existing column with strict mode enabled
New safe operations with Postgres
- Changing between
textandcitextwhen not indexed - Changing a
stringcolumn to acitextcolumn when not indexed - Changing a
citextcolumn to astringcolumn with no:limitwhen not indexed - Changing a
cidrcolumn to aninetcolumn - Increasing
:precisionof anintervalortimecolumn
New unsafe operations with Postgres
- Adding a column with a callable default value
- Decreasing
:precisionof adatetimecolumn - Decreasing
:limitof atimestamptzcolumn - Passing a default value to
change_column_null
Other
- Added experimental support for lock timeout retries
- Added
target_sql_modeoption - Added error for
change_column_nullwith default value withsafe_by_defaultoption - Fixed instructions for
remove_columnswith options - Dropped support for Postgres < 10, MySQL < 5.7, and MariaDB < 10.2
- Fixed error with versioned schema with Active Record 7.0.2+
- Dropped support for Ruby < 2.6 and Active Record < 5.2
- Fixed error with multiple databases with Active Record 7
- Fixed issue with
add_reference ..., foreign_key: {to_table: ...}withsafe_by_default
- Removed timeouts and
auto_analyzefrom schema load
- Fixed
NOT NULLconstraint check for quoted columns - Fixed deprecation warning with Active Record 6.1
- Added checks for
add_check_constraintandvalidate_check_constraint
- Added
safe_by_defaultoption to install generator - Fixed warnings with Active Record 6.1
- Added
safe_by_defaultoption
- Added support for float timeouts
- Added
target_versionoption to replace database-specific options
- Added
check_downoption - Added check for
change_columnwithnull: false - Added check for
validate_foreign_key - Improved error messages
- Made auto analyze less verbose in Postgres
- Decreasing the length limit of a
varcharcolumn or adding a limit is not safe in Postgres - Removed safety checks for
dbrake tasks (Rails 5+ handles this)
change_column_nullon a column with aNOT NULLconstraint is safe in Postgres 12+
- Improved comments in initializer
- Fixed string timeouts for Postgres
- Added warnings for missing and long lock timeouts
- Added install generator
- Fixed deprecation warnings with Ruby 2.7
- Added check for
add_referencewithforeign_key: true
- Increasing precision of
decimalornumericcolumn is safe in Postgres 9.2+ - Making
decimalornumericcolumn unconstrained is safe in Postgres 9.2+ - Changing between
timestampandtimestamptzwhen session time zone is UTC in Postgres 12+ - Increasing the length of a
varcharcolumn from under 255 up to 255 in MySQL and MariaDB - Increasing the length of a
varcharcolumn over 255 in MySQL and MariaDB
- Fixed PostgreSQL version check
- Fixed timeouts for PostgreSQL
- Added
statement_timeoutandlock_timeout - Adding a column with a non-null default value is safe in MySQL 8.0.12+ and MariaDB 10.3.2+
- Added
change_column_nullcheck for MySQL and MariaDB - Added
auto_analyzefor MySQL and MariaDB - Added
target_mysql_versionandtarget_mariadb_version - Switched to
upfor backfilling
- Fixed migration name in error messages
- Added ability to disable checks
- Added Postgres-specific check for
change_column_null - Added optional remove index check
- Allow
add_referencewith concurrent indexes
- Added
target_postgresql_version - Added
unscopedto backfill instructions
- Added check for
add_foreign_key - Fixed instructions for adding default value with NOT NULL constraint
- Removed support for Rails 4.2
- Fixed error with
remove_columnandtypeargument - Improved message customization
- Added support for custom checks
- Adding a column with a non-null default value is safe in Postgres 11+
- Added checks for
add_belongs_to,remove_belongs_to,remove_columns, andremove_reference - Customized messages
- Added check for
change_column_null - Added support for alphabetize columns with Makara
- Fixed migration reversibility with
auto_analyze
- Friendlier output
- Better method of hooking into Active Record
- Recommend
disable_ddl_transaction!overcommit_db_transaction - Suggest
jsonboverjsonin Postgres 9.4+ - Changing
varchartotextis safe in Postgres 9.1+ - Do not check number of columns for unique indexes
- Added customizable error messages
- Updated instructions for adding a column with a default value
- Added
start_afteroption
- Fixed error with
create_table - Added check for executing arbitrary SQL
- Added check for
forceoption withcreate_table - Added
auto_analyzeoption
- Adding an index to a newly created table is now safe
- Fixed error with Ruby 2.3 frozen strings
- Added alphabetize columns
- Disabled dangerous rake tasks in production
- Added ability to use
SAFETY_ASSUREDenv var
- Skip checks on down migrations and rollbacks
- Added check for indexes with more than 3 columns
- Fixed
add_indexcheck for MySQL
- First release