-- Up migration (safe for existing data)
ALTER TABLE accounts
ADD COLUMN name TEXT,
ADD COLUMN surname TEXT;

UPDATE accounts
SET
  name = 'John',
  surname = 'Doe'
WHERE name IS NULL OR surname IS NULL;

ALTER TABLE accounts
ALTER COLUMN name SET NOT NULL,
ALTER COLUMN surname SET NOT NULL;
