https://github.com/a0s/sequel-rake
Rake tasks for the Sequel gem
https://github.com/a0s/sequel-rake
Last synced: 2 months ago
JSON representation
Rake tasks for the Sequel gem
- Host: GitHub
- URL: https://github.com/a0s/sequel-rake
- Owner: a0s
- License: mit
- Created: 2016-12-20T21:44:20.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-03-28T18:01:49.000Z (over 7 years ago)
- Last Synced: 2025-01-06T02:12:11.055Z (over 1 year ago)
- Language: Ruby
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# sequel-rake
Provides useful rake tasks when working with the awesome Sequel gem.
The `database.yml` must be located at `./database.yml` or `./config/database.yml` in
order to be located.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'sequel-rake'
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install sequel-rake
## Usage
```ruby
# Rakefile
require 'sequel/rake'
Sequel::Rake.load!
```
```
$ bundle exec rake ...
sequel:init # Creates a database.yml file
sequel:generate[name] # Generate a new migration file `sequel:generate[create_books]`
sequel:migrate[version] # Migrate the database (you can specify the version with `db:migrate[N]`)
sequel:rollback[step] # Rollback the database N steps (you can specify the version with `db:rollback[N]`)
sequel:remigrate # Undo all migrations and migrate again
```
## TODO
* Rollback to previous version
* Write some tests
* Seeds
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/sandelius/sequel-rake. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).