CREATE TABLE "dbgroup" (
  "id_dbgroup" serial,
  "caption_dbgroup" varchar(255) NOT NULL,
  "description_dbgroup" text NULL,
  "superadmin_dbgroup" smallint NOT NULL,
  "public_dbgroup" smallint NOT NULL,
  "registered_dbgroup" smallint NOT NULL,
  PRIMARY KEY  ("id_dbgroup"), UNIQUE("id_dbgroup")
) ;

INSERT INTO "dbgroup" ("caption_dbgroup", "description_dbgroup", "superadmin_dbgroup", "public_dbgroup", "registered_dbgroup") VALUES ('Admin', 'Groupe administrateur', 1, 0, 0);

CREATE TABLE "dbgroup_users" (
  "id_dbgroup" integer NOT NULL,
  "userhandler_dbgroup" varchar(255) NOT NULL,
  "user_dbgroup" varchar(255) NOT NULL
) ;

INSERT INTO "dbgroup_users" ("id_dbgroup", "userhandler_dbgroup", "user_dbgroup") VALUES (1, 'auth|dbuserhandler', '1');

CREATE TABLE "dbuser" (
  "id_dbuser" serial,
  "login_dbuser" varchar(32) NOT NULL,
  "password_dbuser" varchar(32) NOT NULL,
  "email_dbuser" varchar(255) NOT NULL,
  "enabled_dbuser" smallint NOT NULL,
  PRIMARY KEY  ("id_dbuser"), UNIQUE ("id_dbuser"),
  UNIQUE ("login_dbuser")
) ;

INSERT INTO "dbuser" ("login_dbuser", "password_dbuser", "email_dbuser", "enabled_dbuser") VALUES ('admin', '21232f297a57a5a743894a0e4a801fc3', 'root@localhost', 1);
