-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
40 lines (27 loc) · 961 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
########################
To install:
gem install redbeard-liquibase-rails -s http://gems.github.com
########################
To use:
require 'liquibase-rails' in your Rakefile
Place Liquibase updates in 'db/schema' with a master changelog: 'db/schema/master.xml'
The usual suspects:
rake db:migrate
rake db:drop
rake db:test:prepare
Should all work as expected, except with Liquibase instead of Rails migrations.
Liquibase-Rails uses the configuration from database.yml and the current Rails environment (as set with RAILS_ENV=...)
Extra tasks defined, see the liquibase namespace in rake:
rake -T liquibase
i.e.
rake liquibase:dump
Dumps a changelog of the current db, which is a good way of creating your initial master.xml.
########################
Defining tasks:
Example:
task(:dump => :prereq).enhance do
Liquibase.for(current_environment).run do
and_do generateChangeLog
end
end
See more examples in lib/liquibase/tasks.rb