<filename>brat.sql
CREATE TABLE "Contexts" ("CID" INTEGER PRIMARY KEY  AUTOINCREMENT  NOT NULL  UNIQUE , "name" VARCHAR NOT NULL , "exists-in" TEXT NOT NULL );
CREATE TABLE "Groups" ("GID" INTEGER PRIMARY KEY  AUTOINCREMENT  NOT NULL  UNIQUE , "groupname" VARCHAR NOT NULL );
CREATE TABLE "PermissionLevels" ("PID" INTEGER PRIMARY KEY  AUTOINCREMENT  NOT NULL  UNIQUE , "level" VARCHAR NOT NULL  UNIQUE );
CREATE TABLE "Permissions" ("PID" INTEGER NOT NULL , "ID" INTEGER NOT NULL , "idtype" VARCHAR NOT NULL );
CREATE TABLE "Texts" ("TID" INTEGER PRIMARY KEY  AUTOINCREMENT  NOT NULL  UNIQUE , "name" VARCHAR NOT NULL , "path" TEXT NOT NULL , "CID" INTEGER NOT NULL );
CREATE TABLE "UserGroups" ("UID" INTEGER NOT NULL , "GID" INTEGER NOT NULL );
CREATE TABLE "Users" ("UID" INTEGER PRIMARY KEY  AUTOINCREMENT  NOT NULL  UNIQUE , "username" VARCHAR NOT NULL  UNIQUE , "name" VARCHAR NOT NULL , "email" VARCHAR NOT NULL , "password" TEXT NOT NULL );
