Add houdini_upgrade to relevant filenames

This commit is contained in:
Eric 2020-05-05 13:18:50 -05:00
parent 23398ae552
commit ef1445a5b9
2 changed files with 3 additions and 3 deletions

View file

@ -36,7 +36,7 @@ class CwToActivestorageGenerator < Rails::Generators::Base
def create_column_migration_file def create_column_migration_file
if (Dir.glob("db/migrate/*_rename_uploader_columns.rb").none?) if (Dir.glob("db/migrate/*_rename_uploader_columns.rb").none?)
copy_file "migrate/rename_uploader_columns.rb", copy_file "migrate/rename_uploader_columns.rb",
"db/migrate/#{(DateTime.now.utc + 1.second).strftime('%Y%m%d%H%M%S')}_rename_uploader_columns.rb" "db/migrate/#{(DateTime.now.utc + 1.second).strftime('%Y%m%d%H%M%S')}_rename_uploader_columns.houdini_upgrade.rb"
end end
end end

View file

@ -111,14 +111,14 @@ end
if (Dir.glob("db/migrate/*_backup_uploader_columns.rb").none?) if (Dir.glob("db/migrate/*_backup_uploader_columns.rb").none?)
byebug byebug
FileUtils.cp __dir__ + "/templates/backup_uploader_columns.rb", FileUtils.cp __dir__ + "/templates/backup_uploader_columns.rb",
"db/migrate/#{(DateTime.now.utc + 1.second).strftime('%Y%m%d%H%M%S')}_backup_uploader_columns.rb" "db/migrate/#{(DateTime.now.utc + 1.second).strftime('%Y%m%d%H%M%S')}_backup_uploader_columns.houdini_upgrade.rb"
end end
end end
task :delete_uploader_backup_tables_migration do task :delete_uploader_backup_tables_migration do
if (Dir.glob("db/migrate/*_backup_uploader_columns.rb").none?) if (Dir.glob("db/migrate/*_backup_uploader_columns.rb").none?)
FileUtils.cp __dir + "/templates/delete_uploader_backup_tables.rb", FileUtils.cp __dir + "/templates/delete_uploader_backup_tables.rb",
"db/migrate/#{(DateTime.now + 1.second).strftime('%Y%m%d%H%M%S')}_delete_uploader_backup_tables.rb" "db/migrate/#{(DateTime.now + 1.second).strftime('%Y%m%d%H%M%S')}_delete_uploader_backup_tables.houdini_upgrade.rb"
end end
end end