You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

7 lines
190 B

ALTER TABLE sites
ADD COLUMN url VARCHAR(255) DEFAULT NULL AFTER name;
UPDATE sites
JOIN roles ON sites.id = roles.site_id
JOIN users ON users.id = roles.user_id
SET sites.url = users.url;