   id                        bigint auto_increment not null,
   name                      varchar(255) not null,
   price                     decimal(38) not null,
-  quantity                  integer,
+  quantity                  integer not null,
   constraint pk_product primary key (id))
 ;
 
 create table status (
   id                        bigint auto_increment not null,
-  name                      varchar(255),
+  name                      varchar(255) not null,
   constraint pk_status primary key (id))
 ;
 
 create table stocktaking (
   id                        bigint auto_increment not null,
-  created                   datetime,
+  created                   datetime not null,
   users                     longtext,
   products                  longtext,
   transactions              longtext,


create table feedback (
  id                        bigint auto_increment not null,
  content                   varchar(255) not null,
  created                   datetime,
  constraint pk_feedback primary key (id))
;

create table paytype (
  id                        bigint auto_increment not null,
  name                      varchar(255) not null,
  affects_balance           tinyint(1) default 0,
  affects_quantity          tinyint(1) default 0,
  constraint pk_paytype primary key (id))
;



create table transaction (
  id                        bigint auto_increment not null,
  invalid                   tinyint(1) not null default 0,
  created                   datetime not null,
  user_id                   bigint not null,
  paytype_id                bigint not null,
  constraint pk_transaction primary key (id))
