PHP Classes

File: SQL File

Recommend this page to a friend!
  Classes of Adrian M   upMVC   modules/dashboard/sql/schema.sql   Download  
File: modules/dashboard/sql/schema.sql
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: upMVC
Pure PHP web development without other frameworks
Author: By
Last change:
Date: 1 month ago
Size: 2,597 bytes
 

Contents

Class file image Download
/* * Copyright (c) 2025 BitsHost * All rights reserved. * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -- Dashboard Users Table CREATE TABLE IF NOT EXISTS dashboard_users ( id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL UNIQUE, password VARCHAR(255) NOT NULL, role ENUM('admin', 'user') DEFAULT 'user', last_login DATETIME, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- Dashboard Settings Table CREATE TABLE IF NOT EXISTS dashboard_settings ( id INT PRIMARY KEY AUTO_INCREMENT, setting_key VARCHAR(255) NOT NULL UNIQUE, setting_value TEXT, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- Create default admin user (password: admin123) INSERT INTO dashboard_users (name, email, password, role) VALUES ('Admin', '[email protected]', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'admin') ON DUPLICATE KEY UPDATE updated_at = CURRENT_TIMESTAMP; -- Insert default settings INSERT INTO dashboard_settings (setting_key, setting_value) VALUES ('site_name', 'Dashboard'), ('theme', 'light'), ('items_per_page', '10'), ('maintenance_mode', 'false') ON DUPLICATE KEY UPDATE setting_value = VALUES(setting_value);