module SqlMigrations
Constants
- VERSION
Public Instance Methods
databases() { |db| ... }
click to toggle source
# File lib/sql_migrations.rb, line 29 def databases Config.databases.each do |name, config| db = Database.new(name, config) yield db if block_given? end end
load_tasks!()
click to toggle source
# File lib/sql_migrations.rb, line 36 def load_tasks! load 'sql_migrations/tasks/migrate.rake' load 'sql_migrations/tasks/seed.rake' load 'sql_migrations/tasks/scripts.rake' end
migrate()
click to toggle source
# File lib/sql_migrations.rb, line 14 def migrate databases(&:migrate) end
scripts()
click to toggle source
# File lib/sql_migrations.rb, line 22 def scripts Config.databases.each do |name, _config| Migration.find(name).each { |migration| puts migration } Seed.find(name).each { |seed| puts seed } end end
seed()
click to toggle source
# File lib/sql_migrations.rb, line 18 def seed databases(&:seed) end