All Projects → janlelis → slim_migrations

janlelis / slim_migrations

Licence: MIT license
Let's you write slightly slimmer Rails migrations.

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to slim migrations

Migrate
Database migrations. CLI and Golang library.
Stars: ✭ 2,315 (+16435.71%)
Mutual labels:  migrations
migrations
Migrations is a database migration tool that uses go's database/sql from the standard library
Stars: ✭ 17 (+21.43%)
Mutual labels:  migrations
powerorm
A very simple but effective php orm
Stars: ✭ 21 (+50%)
Mutual labels:  migrations
Django Migration Linter
🚀 Detect backward incompatible migrations for your django project
Stars: ✭ 231 (+1550%)
Mutual labels:  migrations
gloat
Next-gen database migrations framework for Go.
Stars: ✭ 15 (+7.14%)
Mutual labels:  migrations
strong migrations
Catch unsafe migrations in your Elixir application
Stars: ✭ 58 (+314.29%)
Mutual labels:  migrations
Laravel Migrate Fresh
An artisan command to build up a database from scratch
Stars: ✭ 179 (+1178.57%)
Mutual labels:  migrations
krab
Krab is a migration and automation tool for PostgreSQL based on HCL syntax
Stars: ✭ 15 (+7.14%)
Mutual labels:  migrations
underbase
MongoDB schema and data migration library based on semver
Stars: ✭ 19 (+35.71%)
Mutual labels:  migrations
migrant
Migration management for PostgreSQL/SQLite/MySQL
Stars: ✭ 85 (+507.14%)
Mutual labels:  migrations
Peewee migrate
Simple migration engine for Peewee
Stars: ✭ 250 (+1685.71%)
Mutual labels:  migrations
MoalemYar
A personal project for class management, using various technologies like WPF, Entityframwork, CodeFirst, Sqlite, Migration and more
Stars: ✭ 53 (+278.57%)
Mutual labels:  migrations
serverless-typeorm-migrations
Database migrations for AWS Lambda and RDS using TypeORM Migrations
Stars: ✭ 38 (+171.43%)
Mutual labels:  migrations
Secondbase
Seamless second database integration for Rails.
Stars: ✭ 216 (+1442.86%)
Mutual labels:  migrations
metana
Abstract task migration tool written in Go for Golang services. Database and non database migration management brought to the CLI.
Stars: ✭ 61 (+335.71%)
Mutual labels:  migrations
Cli
The Sequelize CLI
Stars: ✭ 2,248 (+15957.14%)
Mutual labels:  migrations
apistar alembic migrations
Alembic migrations for apistar
Stars: ✭ 18 (+28.57%)
Mutual labels:  migrations
db-migrator.go
DB migrations. CLI and Golang
Stars: ✭ 13 (-7.14%)
Mutual labels:  migrations
upscheme
Database migrations and schema updates made easy
Stars: ✭ 737 (+5164.29%)
Mutual labels:  migrations
migrate-rethinkdb
A migration tool for rethink db
Stars: ✭ 16 (+14.29%)
Mutual labels:  migrations

Please note: This project is archived and does not work with recent versions of Rails anymore.

SlimMigrations

Turns

class AddWebsiteToUser < ActiveRecord::Migration
  def self.up
    add_column :users, :website, :string
  end

  def self.down
    remove_column :users, :website
  end
end

into

migration do
  def up
    add_column :users, :website, :string
  end

  def down
    remove_column :users, :website
  end
end

Extras

  • Modifies the rails generator to use the slim syntax

  • Helper task for converting existing migrations: rake slim_migrations:update_syntax

Install

Rails 3.2

# in your Gemfile
gem 'slim_migrations', '~> 3.2.1'

Rails 3.1

# as plugin:
rails plugin install git://github.com/janlelis/slim_migrations.git -r 3.1
# or in your Gemfile:
gem 'slim_migrations', '~> 3.1.1'

Rails 3.0

# as plugin:
rails plugin install git://github.com/janlelis/slim_migrations.git -r 3.0
# or in your Gemfile:
gem 'slim_migrations', '~> 3.0.1'

Rails 2.3

# as plugin:
script/plugin install git://github.com/janlelis/slim_migrations.git -r 2.3
# or in your config/environment.rb
config.gem 'slim_migrations', :version => '~> 2.3.1'

Credits

Blog post: rbjl.janlelis.com/53-three-little-tips-for-slimmer-rails-migrations

Thanks to contributions from: Manuel Meurer

MIT-LICENSE, J-_-L

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].