3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/schema_transformer/help.rb', line 3
def help(action)
case action
when :generate
out ="*** Thanks ***\nSchema transform definitions have been generated and saved to: \n config/schema_transformations/\#{self.table}.json\nNext you need to run 2 commands to alter the database. As explained in the README, the first \ncan be ran with the site still up. The second command should be done with a maintenance page up.\n\nHere are the 2 commands you'll need to run later after checking in the \#{self.table}.json file\ninto your version control system:\n$ schema_transformer sync \#{self.table} # can be ran over and over, it will just keep syncing the data\n$ schema_transformer switch \#{self.table} # should be done with a maintenance page up, switches the tables\n*** Thank you ***\n"
when :sync_progress
out ="Creating temp table and syncing the data... (tail log/schema_transformer.log for status)\n"
when :sync
out ="*** Thanks ***\nThere is now a \#{self.temp_table} table with the new table schema and the data has been synced.\nPlease run the next command after you put a maintenance page up:\n$ schema_transformer switch \#{self.table}\n"
when :switch
out ="*** Thanks ***\nThe final sync ran and the table \#{self.table} has been updated with the new schema. \nGet rid of that maintenance page and re-enable your site.\nThank you. Have a very nice day.\n"
end
puts out
end
|