Class: Slick::Database::Migration
Constant Summary
Constants included from Helpers
Helpers::SELF_CLOSING_TAGS, Helpers::TAGS, Helpers::TEXT_ONLY_TAGS
Instance Attribute Summary
Attributes included from Registry
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Registry
create, for, register, registered?, registered_classes
Methods included from Helpers
#html_tag, #indent, #line, #text
Class Method Details
.register(name, *args) ⇒ Object
11 12 13 14 |
# File 'lib/slick/database/migration.rb', line 11 def register(name, *args) throw "Invalid migration name '#{name}' - it must begin with a unix timestamp" if !name.to_s.match(/\A\d+/) super end |
.schema_version ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/slick/database/migration.rb', line 16 def schema_version if matches = name.to_s.match(/\A(\d+)/) matches[0].to_i else 0 end end |