Class: App::SqlUpdate

Inherits:
Object
  • Object
show all
Defined in:
lib/core/sql_update.rb

Class Method Summary collapse

Class Method Details

.run_sql_updateObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/core/sql_update.rb', line 5

def self.run_sql_update

    unless App::Terminal::prompt_yes_no("You're about to run the SQL update script", ["Please note this script is still in #{App::Terminal::format_highlight('BETA')} and will only work under certain (assumed) circumstances."])
        App::Terminal::abort(nil, nil, true, false)
    end

    @git = App::Git::new

    App::Terminal::output('Checking that both your repositories are on the same branch')
    @git.check_for_same_branch(App::Git::SAME_BRANCH_ERROR)

    branch_number = @git.current_branch_for_repo(App::Config.param(ConfigUnique::WORKSTATION_PATH_TO_BP_DB))

    puts branch_number

end