34899-vm/db/migrations/001_create_users_table.sql
Flatlogic Bot d8e07e8f59 V1.0
2025-10-12 11:32:49 +00:00

12 lines
425 B
SQL

DROP TABLE IF EXISTS users;
CREATE TABLE IF NOT EXISTS users (
id INT AUTO_INCREMENT PRIMARY KEY,
full_name VARCHAR(255) NOT NULL,
username VARCHAR(255) NOT NULL UNIQUE,
password VARCHAR(255) NOT NULL,
role ENUM('Admin', 'Manager', 'Staff', 'Dispatcher', 'Rider', 'Viewer') NOT NULL,
is_active BOOLEAN DEFAULT TRUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
last_login TIMESTAMP NULL
);