Sha256: 7fac678b5dba30a15400f1df28d184db242ab03054f573452db861b92a3e80e6

Contents?: true

Size: 936 Bytes

Versions: 1

Compression:

Stored size: 936 Bytes

Contents

# ActiveRecord automigrations

Create/modify/delete Active Record columns without migrations.
It works with PostgreSQL and SQLite.

## Installation

```
gem 'automigration'
```

## Usage

Add <tt>has_fields</tt> into your models:

``` ruby
class User < ActiveRecord::Base
  has_fields do
    string :name
    integer :login_count
  end
end
```

Fire in console:

```
rake db:migrate
```

To keep some system tables add to <tt>config/application.rb</tt>

```
  config.automigration.system_tables += %w[hits very_system_table]
```

Supported fields:

* belongs_to
* boolean
* date
* datetime
* decimal
* float
* integer
* string
* text
* time

## Timestamps

By default in models with <tt>has_fields</tt> always columns updated_at and created_at created. To ignore 
use <tt>has_fields(:timestamps => false)</tt>

## Status

[<img src="https://secure.travis-ci.org/avakhov/automigration.png"/>](http://travis-ci.org/avakhov/automigration)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
automigration-1.1.4 README.md