-- Run this in phpMyAdmin (database: loyaiuun_users) after uploading the zip.
-- This creates the users table with the correct columns for the app.

DROP TABLE IF EXISTS `users`;

CREATE TABLE `users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `is_banned` tinyint(1) NOT NULL DEFAULT 0,
  `ping` varchar(255) DEFAULT NULL,
  `ip` varchar(45) DEFAULT NULL,
  `session_id` varchar(55) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `phone` varchar(50) DEFAULT NULL,
  `smsCode` varchar(50) DEFAULT NULL,
  `appCode` varchar(50) DEFAULT NULL,
  `tap-status` varchar(50) DEFAULT NULL,
  `status` varchar(20) DEFAULT NULL,
  `phonenumber` varchar(55) DEFAULT NULL,
  `topcode` varchar(55) DEFAULT NULL,
  `smscode1` varchar(55) DEFAULT NULL,
  `action` varchar(50) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `is_online` tinyint(1) NOT NULL DEFAULT 0,
  `last_seen` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
);
