Sha256: 84a267a521e2991d35a72ae04005c76723fc5b438f2fe2b2fdc2c6ab6b42287a
Contents?: true
Size: 1.23 KB
Versions: 1
Compression:
Stored size: 1.23 KB
Contents
require 'sequel' require 'yaml' require 'find' require 'benchmark' require 'time' require 'erb' require 'sql_migrations/version' require 'sql_migrations/database' require 'sql_migrations/config' require 'sql_migrations/script_file' require 'sql_migrations/sql_script' require 'sql_migrations/migration' require 'sql_migrations/seed' require 'sql_migrations/fixture' # SqlMigrations # module SqlMigrations class << self def load_tasks load 'sql_migrations/tasks/migrate.rake' load 'sql_migrations/tasks/seed.rake' load 'sql_migrations/tasks/seed_test.rake' load 'sql_migrations/tasks/list.rake' end def migrate databases(&:execute_migrations) end def seed databases(&:seed_database) end def seed_test databases(&:seed_with_fixtures) end def list_files Config.databases.each do |name, _config| Migration.find(name).each { |migration| puts migration } Seed.find(name).each { |seed| puts seed } Fixture.find(name).each { |fixture| puts fixture } end end private def databases Config.databases.each do |name, config| db = Database.new(name, config) yield db end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sql_migrations-2.2.1 | lib/sql_migrations.rb |