This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'csv' | |
| module DownloadService | |
| OPEN_MODE = "w+:UTF-16LE:UTF-8" | |
| BOM = "\xEF\xBB\xBF" #Byte Order Mark | |
| def student_list | |
| File.open("#{file_name}.tsv", OPEN_MODE) do |f| | |
| csv_file = CSV.generate({:col_sep => "\t"}) do |csv| | |
| # header row |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker cp backup_file_name db_container_name:backup_file_name | |
| docker exec db_container_name sh -c "pg_restore -C -d target_database_name backup_file_name" |