class DbVcs::Config
Attributes
db_basename[RW]
This name will be used as a prefix to all your databases in a project.
dbs_in_use[RW]
A list of databases you want to enable versioning for. See {DbVcs::Manager::ADAPTERS} keys for the list of available values. Defaults to empty array.
environments[RW]
Environments you want to create database versions for. Default is [“development”, “test”].
main_branch[RW]
A name of branch to be used as a default branch to copy databases from.
mongo_config[R]
Configuration of dbs clients.
mysql_config[R]
Configuration of dbs clients.
pg_config[R]
Configuration of dbs clients.
Public Class Methods
new()
click to toggle source
# File lib/db_vcs/config.rb, line 19 def initialize @environments = %w(development test) @dbs_in_use = [] @db_basename = Dir.pwd.split(File::SEPARATOR).last @main_branch = "main" @pg_config = DbVcs::Adapters::Postgres::Config.new @mongo_config = DbVcs::Adapters::Mongo::Config.new @mysql_config = DbVcs::Adapters::Mysql::Config.new end
Public Instance Methods
mongo_config=(hash)
click to toggle source
@param hash [Hash] @return [void]
# File lib/db_vcs/config.rb, line 37 def mongo_config=(hash) mongo_config.assign_attributes(hash) end
mysql_config=(hash)
click to toggle source
@param hash [Hash] @return [void]
# File lib/db_vcs/config.rb, line 43 def mysql_config=(hash) mysql_config.assign_attributes(hash) end
pg_config=(hash)
click to toggle source
@param hash [Hash] @return [void]
# File lib/db_vcs/config.rb, line 31 def pg_config=(hash) pg_config.assign_attributes(hash) end