No commit activity in last 3 years
No release in over 3 years
Rails plugin. Allows you to write plain SQL migrations without Ruby code.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

>= 5.2.2
 Project Readme

Sql Migrations Rails

This gem allows you to write plain SQL migrations without Ruby code.

Usage

In the console type:

$ bin/rails generate sql_migration AddPartNumberToProducts

This will create two empty migration files:

create db/migrate/20190714142718_add_part_number_to_products.up.sql
create db/migrate/20190714142718_add_part_number_to_products.down.sql

Fill them with SQL code and run:

$ bin/rails db:migrate

This works along with common Ruby migrations.

Installation

Add this line to your application's Gemfile:

gem 'sql-migrations-rails'

And then execute:

$ bundle