/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 * Author:  gal
 */


ALTER TABLE groups
ADD COLUMN group_id int AFTER name;

UPDATE `groups` SET group_id=0 WHERE NAME="admin";
UPDATE `groups` SET group_id=1 WHERE NAME="private";
UPDATE `groups` SET group_id=2 WHERE NAME="viewer";
UPDATE `groups` SET group_id=3 WHERE NAME="contributor";