--- users-groups-admin


ALTER TABLE user_groups
  ADD admin BIT NOT NULL DEFAULT 0;

ALTER TABLE user_groups
  ADD description NVARCHAR(255) NOT NULL DEFAULT '';


-- Find and drop default constraint name before dropping the column

DECLARE @ConstraintName NVARCHAR(100)
SELECT @ConstraintName = OBJECT_NAME([default_object_id]) FROM SYS.COLUMNS
WHERE [object_id] = OBJECT_ID('users') AND [name] = 'admin'
EXEC('ALTER TABLE users DROP CONSTRAINT ' + @ConstraintName);

ALTER TABLE users DROP COLUMN admin;
