/*
reduncdant code to use
*/


/*
like sequencer
*/

CREATE TABLE seq(
  name VARCHAR(16) NOT NULL,
  PRIMARY KEY (name),
  id INT NOT NULL
);

/*trigger on insert, randomize*/

/*get last id function*/

/*increase id procedure*/

/*
message logger for devlopper
if query dont pass validation
the trigger should insert message here
*/

CREATE TABLE constmsg(
  id INT NOT NULL,
  msg TEXT NOT NULL
);

CREATE TABLE msglog(
  day DATE NOT NULL,
  clock TIME NOT NULL,
  id INT NOT NULL,
  PRIMARY KEY(id),
  imply VARCHAR(16),
  msgID INT NOT NULL,
  FOREIGN KEY(msgID) REFERENCES constmsg(id)
);



/*
regex function for common entry

*/
