1
0

added mysql database configuration

This commit is contained in:
Daniel Tartavel 2022-09-09 18:12:04 +02:00
parent 0d44445588
commit e7fa2edbbc

66
sql/moha.sql Normal file
View File

@ -0,0 +1,66 @@
-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost
-- Généré le : ven. 09 sep. 2022 à 16:10
-- Version du serveur : 10.5.17-MariaDB
-- Version de PHP : 8.0.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Base de données : `moha`
--
CREATE DATABASE IF NOT EXISTS `moha` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
USE `moha`;
-- --------------------------------------------------------
--
-- Structure de la table `logs`
--
CREATE TABLE `logs` (
`id` int(10) UNSIGNED NOT NULL,
`device` text NOT NULL,
`property` text NOT NULL,
`value` text NOT NULL,
`date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Logs devices properties changes';
--
-- Index pour les tables déchargées
--
--
-- Index pour la table `logs`
--
ALTER TABLE `logs`
ADD PRIMARY KEY (`id`),
ADD KEY `date` (`date`),
ADD KEY `device_index` (`device`(768)) USING BTREE,
ADD KEY `devprop` (`device`(20),`property`(20));
--
-- AUTO_INCREMENT pour les tables déchargées
--
--
-- AUTO_INCREMENT pour la table `logs`
--
ALTER TABLE `logs`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;