Skip to content
Snippets Groups Projects

Add rake task for copying 'main' database to 'ci' database

1 unresolved thread
3 files
+ 23
21
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -119,12 +119,23 @@ def ci_database_empty?
true
end
def background_migrations_done?
unfinished_count = Gitlab::Database::BackgroundMigration::BatchedMigration.without_status(:finished).count
if unfinished_count > 0
raise MigrateError,
"Found #{unfinished_count} unfinished Background Migration(s). Please wait until they are finished."
end
true
end
def can_migrate?
valid_backup_location? &&
single_database_setup? &&
ci_database_connect_ok? &&
ci_database_empty? &&
required_diskspace_available?
required_diskspace_available? &&
background_migrations_done?
end
def with_transient_pg_env(extended_env)
Loading