You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because:
* The cart email is a diplication of the data from the cart's mozilla account (if it has one)
This commit:
* Removes the email field from the carts table
* Updates the type references
* Provides the necessary patches
Closes #FXA-11314
-- `email` field can be populated via the `uid` column in the `accounts` table.
3
+
-- Throw an error if any carts have an email value but no uid value. Only update the patch level if successful
4
+
5
+
SELECTCOUNT(*) INTO @invalid_records FROM carts WHERE email IS NOT NULLAND uid IS NULL;
6
+
7
+
SET @sql = CASE
8
+
WHEN @invalid_records >0 THEN
9
+
'SELECT CONCAT(''Migration aborted: '', @invalid_records, '' carts have email values but no uid values'') INTO @error_message; SIGNAL SQLSTATE ''45000'' SET MESSAGE_TEXT = @error_message;'
10
+
ELSE
11
+
'ALTER TABLE carts DROP COLUMN email;'
12
+
END;
13
+
14
+
PREPARE stmt FROM @sql;
15
+
EXECUTE stmt;
16
+
DEALLOCATE PREPARE stmt;
17
+
18
+
UPDATE dbMetadata SET value ='164'WHERE name ='schema-patch-level';
0 commit comments