Skip to content

Commit

Permalink
Updated recommendation for target version for MySQL and MariaDB [skip…
Browse files Browse the repository at this point in the history
… ci]
  • Loading branch information
ankane committed Jun 17, 2024
1 parent ea0ef3f commit 095646c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -925,10 +925,10 @@ Use the version from your latest migration.
If your development database version is different from production, you can specify the production version so the right checks run in development.

```ruby
StrongMigrations.target_version = 10 # or "8.0.12", "10.3.2", etc
StrongMigrations.target_version = 10 # or 8.0, 10.5, etc
```

The major version works well for Postgres, while the full version is recommended for MySQL and MariaDB.
The major version works well for Postgres, while the major and minor version is recommended for MySQL and MariaDB.

For safety, this option only affects development and test environments. In other environments, the actual server version is always used.

Expand Down
2 changes: 1 addition & 1 deletion lib/generators/strong_migrations/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def target_version
when /mysql|trilogy/
# could try to connect to database and check for MariaDB
# but this should be fine
'"8.0.12"'
"8.0"
else
"10"
end
Expand Down

0 comments on commit 095646c

Please sign in to comment.