An open API service indexing awesome lists of open source software.

https://github.com/cookpad/cookpad_mysql_defaults

Cookpad's MySQL defaults
https://github.com/cookpad/cookpad_mysql_defaults

Last synced: 2 months ago
JSON representation

Cookpad's MySQL defaults

Awesome Lists containing this project

README

        

# CookpadMysqlDefaults

This gem forces better MySQL table defaults on creation.

- Set engine to InnoDB.
- Use 4-byte UTF-8 charset and collate to support Emojis.
- Use `ROW_FORMAT=DYNAMIC` for indexes on big columns.

## Usage

Just add the gem to your project!

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'cookpad_mysql_defaults', github: 'cookpad/cookpad_mysql_defaults'
```

And then execute:
```bash
$ bundle
```

## Test

Run `docker-compose up -d` to create and run the MySQL database.

Then run `ruby test/defaults_test.rb`

## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).