Sha256: d90052600886277c00db0032750ced392e04354ae4b6e48c0ec6de770fc0cae8
Contents?: true
Size: 1.55 KB
Versions: 1
Compression:
Stored size: 1.55 KB
Contents
[](https://travis-ci.org/steverice/pt-osc) [](https://codeclimate.com/github/steverice/pt-osc) [](https://codeclimate.com/github/steverice/pt-osc) ## `pt-online-schema-change` migrations Runs regular Rails/ActiveRecord migrations via the [Percona Toolkit pt-online-schema-change tool](http://www.percona.com/doc/percona-toolkit/2.1/pt-online-schema-change.html). ## Installation Add this line to your application's Gemfile: gem 'pt-osc' And then execute: $ bundle Or install it yourself as: $ gem install pt-osc ## Usage Set your database adapter to be `pt_osc` in your application's database.yml. Specify `pt-online-schema-change` flags in a `percona` hash in the config. e.g. ```yaml environment: host: localhost username: root database: rails percona: defaults-file: /etc/mysql/percona-user.cnf recursion-method: "'dsn=D=percona,t=slaves'" ``` Additional options for the `percona` hash include: - `run_mode`: Specify `'execute'` to actually run `pt-online-schema-change` when the migration runs. Specify `'print'` to output the commands to run to STDOUT instead. Default is `'print'`. ## Caveats This gem is not considered production ready. There will be bugs. It is tested against: - ActiveRecord 3.2 branch - Ruby 1.9.2 - Ruby 2.0.0 - Ruby 2.1.2 Support for other versions of Ruby or ActiveRecord is unknown and not guaranteed.
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pt-osc-0.0.2 | README.md |