Class: DatabasePatcher::PatchEntity::Folder
Instance Method Summary
collapse
#accepted_extensions, #execute_file, #extract_comments, factory, #get_comment, #initialize, #md5, #patch_record, #raise_unknown_extension_for, #register_this_patch, #timestamp, #uniq_indentifier, #unregister_this_patch
Instance Method Details
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/database_patcher/patch_entity/folder.rb', line 21
def
= []
= (file_path_for('up'))
= (file_path_for('down'))
if != ''
<< 'UP:'
<<
end
if != ''
<< "" if != ''
<< 'DOWN:'
<<
end
.join("\n")
end
|
#down(connection) ⇒ Object
8
9
10
11
|
# File 'lib/database_patcher/patch_entity/folder.rb', line 8
def down(connection)
execute_from_folder('down', connection)
unregister_this_patch(connection)
end
|
#md5_down ⇒ Object
17
18
19
|
# File 'lib/database_patcher/patch_entity/folder.rb', line 17
def md5_down
md5(::File.read(file_path_for('down')))
end
|
#md5_up ⇒ Object
13
14
15
|
# File 'lib/database_patcher/patch_entity/folder.rb', line 13
def md5_up
md5(::File.read(file_path_for('up')))
end
|
#up(connection) ⇒ Object
3
4
5
6
|
# File 'lib/database_patcher/patch_entity/folder.rb', line 3
def up(connection)
execute_from_folder('up', connection)
register_this_patch(connection)
end
|