User info migration improvements
authorrinpatch <rinpatch@sdf.org>
Sat, 26 Oct 2019 00:45:24 +0000 (03:45 +0300)
committerrinpatch <rinpatch@sdf.org>
Sat, 26 Oct 2019 00:45:24 +0000 (03:45 +0300)
commit12ab7b3280c8cf2469479381e0d363f7638002d8
tree1679b7f1b370209e50ad4326f42232f2c98f13a4
parent653054d301b88070cd60f6b0f8a0b188dee81cba
User info migration improvements

- Move column additions into a separate migration, so postgres doesn't
need an exclusive lock on the table for the main part
- Fill in columns by using one big update statement instead of a bunch
of small ones because it's much faster (the migration took 140s on
patch.cx database)
priv/repo/migrations/20191009154606_add_user_info_columns.exs [new file with mode: 0644]
priv/repo/migrations/20191009154608_copy_users_info_fields_to_users.exs