Skip to content

Commit

Permalink
Add Lhm.cleanup to the README
Browse files Browse the repository at this point in the history
  • Loading branch information
psi committed Jun 12, 2013
1 parent 69a2b38 commit 79bf4a7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,24 @@ Lhm.change_table :users, :atomic_switch => true do |m|
end
```

## Cleaning up after an interrupted Lhm run

If an Lhm migration is interrupted, it may leave behind the temporary tables
used in the migration. If the migration is re-started, the unexpected presence
of these tables will cause an error. In this case, `Lhm.cleanup` can be used
to drop any orphaned Lhm temporary tables.

To see what Lhm tables are found:

```ruby
Lhm.cleanup
```

To remove any Lhm tables found:
```ruby
Lhm.cleanup(true)
```

## Contributing

We'll check out your contribution if you:
Expand Down

0 comments on commit 79bf4a7

Please sign in to comment.