Class: Gush::Migration
- Inherits:
-
Object
show all
- Defined in:
- lib/gush/migration.rb
Instance Method Summary
collapse
Instance Method Details
#migrate ⇒ Object
3
4
5
6
7
8
|
# File 'lib/gush/migration.rb', line 3
def migrate
return if migrated?
up
migrated!
end
|
#migrated? ⇒ Boolean
19
20
21
|
# File 'lib/gush/migration.rb', line 19
def migrated?
redis.sismember("gush.migration.schema_migrations", version)
end
|
#up ⇒ Object
10
11
12
13
|
# File 'lib/gush/migration.rb', line 10
def up
raise NotImplementedError
end
|
#version ⇒ Object
15
16
17
|
# File 'lib/gush/migration.rb', line 15
def version
self.class.version
end
|