81 lines
1.8 KiB
SQL
81 lines
1.8 KiB
SQL
-- nolanwhy
|
|
-- phpMyAdmin SQL Dump
|
|
-- version 5.2.0
|
|
-- https://www.phpmyadmin.net/
|
|
--
|
|
-- Host: 127.0.0.1
|
|
-- Generation Time: Feb 04, 2023 at 10:58 PM
|
|
-- Server version: 10.4.27-MariaDB
|
|
-- PHP Version: 8.0.25
|
|
|
|
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
|
START TRANSACTION;
|
|
SET time_zone = "+00:00";
|
|
|
|
--
|
|
-- Database: `grublox`
|
|
--
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `games`
|
|
--
|
|
|
|
CREATE TABLE `games` (
|
|
`id` int(11) NOT NULL,
|
|
`name` varchar(50) NOT NULL,
|
|
`description` varchar(255) NOT NULL,
|
|
`creator` int(11) NOT NULL,
|
|
`date` datetime NOT NULL DEFAULT current_timestamp(),
|
|
`updateddate` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `users`
|
|
--
|
|
|
|
CREATE TABLE `users` (
|
|
`id` int(11) NOT NULL,
|
|
`username` varchar(20) NOT NULL,
|
|
`password` varchar(450) NOT NULL,
|
|
`date` datetime NOT NULL DEFAULT current_timestamp(),
|
|
`token` varchar(25) DEFAULT NULL COMMENT 'Token for joining. Useful to secure joining to prevent unauthorized users to use other names.',
|
|
`description` varchar(250) DEFAULT NULL,
|
|
`money` int(11) NOT NULL DEFAULT 0
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
|
--
|
|
-- Indexes for dumped tables
|
|
--
|
|
|
|
--
|
|
-- Indexes for table `games`
|
|
--
|
|
ALTER TABLE `games`
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
--
|
|
-- Indexes for table `users`
|
|
--
|
|
ALTER TABLE `users`
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
--
|
|
-- AUTO_INCREMENT for dumped tables
|
|
--
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `games`
|
|
--
|
|
ALTER TABLE `games`
|
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `users`
|
|
--
|
|
ALTER TABLE `users`
|
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
|
|
COMMIT; |