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
- Host: GitHub
- URL: https://github.com/cookpad/cookpad_mysql_defaults
- Owner: cookpad
- License: mit
- Created: 2017-05-02T06:09:18.000Z (about 8 years ago)
- Default Branch: main
- Last Pushed: 2022-03-21T10:19:56.000Z (about 3 years ago)
- Last Synced: 2025-01-11T22:51:19.385Z (4 months ago)
- Language: Ruby
- Homepage:
- Size: 14.6 KB
- Stars: 3
- Watchers: 25
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE
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).