Add TuxiNet branding and document templates
This commit is contained in:
23
database/migrations/2024_01_01_000002_create_users_table.php
Normal file
23
database/migrations/2024_01_01_000002_create_users_table.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
use PDO;
|
||||
|
||||
return function (PDO $pdo): void {
|
||||
$pdo->exec(<<<SQL
|
||||
CREATE TABLE users (
|
||||
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
|
||||
role ENUM('sysadmin','developer','customer') NOT NULL,
|
||||
name VARCHAR(255) NOT NULL,
|
||||
email VARCHAR(255) NOT NULL UNIQUE,
|
||||
pass_hash VARCHAR(255) NOT NULL,
|
||||
phone VARCHAR(50) NULL,
|
||||
address VARCHAR(255) NULL,
|
||||
customer_id INT UNSIGNED NULL,
|
||||
is_active TINYINT(1) NOT NULL DEFAULT 1,
|
||||
twofa_secret VARCHAR(255) NULL,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
CONSTRAINT fk_users_customer FOREIGN KEY (customer_id) REFERENCES customers(id) ON DELETE SET NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
SQL);
|
||||
};
|
||||
Reference in New Issue
Block a user