   groupid int REFERENCES groups(id) ON DELETE CASCADE,
   clientid int REFERENCES clients(id) ON DELETE CASCADE,
   updatedat timestamp NOT NULL DEFAULT now(),
-  createdat timestamp NOT NULL,
+  createdat timestamp NOT NULL DEFAULT now(),
   PRIMARY KEY (id)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
 

  id int NOT NULL AUTO_INCREMENT,
  name varchar(255) NOT NULL,
  updatedat timestamp NOT NULL DEFAULT now(),
  createdat timestamp NOT NULL,
  description varchar(255),
  createdby varchar(255),
  updatedby varchar(255),

  id int NOT NULL AUTO_INCREMENT,
  name varchar(255) NOT NULL,
  updatedat timestamp NOT NULL DEFAULT now(),
  createdat timestamp NOT NULL DEFAULT now(),
  description varchar(255),
  createdby varchar(255),
  updatedby varchar(255),
