taskcafe/migrations/0020_add-full-name-column-to-user_account-table.up.sql

4 lines
186 B
MySQL
Raw Permalink Normal View History

2020-06-13 00:21:58 +02:00
ALTER TABLE user_account ADD COLUMN full_name TEXT;
UPDATE user_account SET full_name = CONCAT(first_name, ' ', last_name);
ALTER TABLE user_account ALTER COLUMN full_name SET NOT NULL;