<?php

$SQL = "create table users (

          user_serial               serial,
          
          user_name                 varchar(128)       default null,
          user_first_name           varchar(128)       default null,
          user_last_name            varchar(128)       default null,
          user_email                varchar(100)           not null,
          
          user_password_hash        varchar(255)           not null,
          user_role                 varchar(255)           not null,
          user_change_password      boolean           default false,
          
          user_status               varchar(255)           not null default 'active',
          user_last_login           datetime           default null,
          
          user_creator              varchar(100)       default null,
          user_created              datetime               not null default current_timestamp ,
          user_changer              varchar(100)       default null,
          user_changed              datetime               not null default current_timestamp on update current_timestamp,
          
          primary key (user_serial),
          unique  key (user_name),
          unique  key (user_email),
          index       (user_name)
          
        ) default character set = utf8mb4
                        collate = utf8mb4_unicode_ci";
?>
