Files
ubicloud/migrate/20230808_add_ipv4_billing.rb
Burak Yucesoy 6fe43bebe9 Don't use DB variable in migration scripts
Changing old migration scripts is usually frowned upon, but in this case the
change does not affect the state of the database. The change is using the run
function instead of accessing the tables using DB[:billing_rate], because DB
is a global variable and when multiple threads with different DB values run
at the same time, they break each other.

One might ask, when there can be multiple threads with different DB values. The
answer is when we parallelize unit tests using tests processes, each with their
own databases. The next commit introduces parallel unit tests.
2024-03-04 10:39:35 +01:00

470 B