0.0
No commit activity in last 3 years
No release in over 3 years
Idempotent MySQL/PostgreSQL schema management by SQL
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

>= 0
 Project Readme

sqldef-rails

Run sqldef on Rails.

Installation

gem 'sqldef-rails'

Usage

Configuration

Just configure config/database.yml normally.

default: &default
  adapter: postgresql
  username: postgres
  password:
  host: 127.0.0.1

development:
  <<: *default
  database: sqldef_development

test:
  <<: *default
  database: sqldef_test

Export

Dump the current schema to db/schema.sql.

bundle exec rake db:schema:dump

You may use bin/rails instead of bundle exec rake too.

Dry Run

You can show DDLs to be executed to match db/schema.sql.

bundle exec rake db:migrate:status

Aplly

You can run DDLs to match db/schema.sql.

bundle exec rake db:migrate

License

The gem is available as open source under the terms of the MIT License.