Skip to content

Instantly share code, notes, and snippets.

@pongpat
Created July 12, 2018 12:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pongpat/04d562da4a1b7c5f2e82ada810779613 to your computer and use it in GitHub Desktop.
Save pongpat/04d562da4a1b7c5f2e82ada810779613 to your computer and use it in GitHub Desktop.
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 12, 2018 at 02:18 PM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
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 */;
--
-- Database: `machine`
--
-- --------------------------------------------------------
--
-- Table structure for table `board_config`
--
CREATE TABLE `board_config` (
`board_ip` varchar(20) NOT NULL,
`board_port` varchar(20) NOT NULL,
`machine_id` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `machine_status`
--
CREATE TABLE `machine_status` (
`id` bigint(20) NOT NULL,
`board_ip` varchar(20) NOT NULL,
`board_port` varchar(20) NOT NULL,
`machine_id` varchar(20) NOT NULL,
`status` tinyint(1) NOT NULL,
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `board_config`
--
ALTER TABLE `board_config`
ADD PRIMARY KEY (`machine_id`),
ADD UNIQUE KEY `board_ip` (`board_ip`,`board_port`);
--
-- Indexes for table `machine_status`
--
ALTER TABLE `machine_status`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `machine_status`
--
ALTER TABLE `machine_status`
MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15930;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 */;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment