82 lines
2.0 KiB
MySQL
82 lines
2.0 KiB
MySQL
|
-- phpMyAdmin SQL Dump
|
||
|
-- version 5.1.0
|
||
|
-- https://www.phpmyadmin.net/
|
||
|
--
|
||
|
-- Host: localhost
|
||
|
-- Generation Time: Mar 30, 2021 at 01:12 PM
|
||
|
-- Server version: 10.5.9-MariaDB
|
||
|
-- PHP Version: 7.4.17RC1
|
||
|
|
||
|
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 */;
|
||
|
|
||
|
--
|
||
|
-- Database: `chirocanto`
|
||
|
--
|
||
|
|
||
|
-- --------------------------------------------------------
|
||
|
|
||
|
--
|
||
|
-- Table structure for table `topics`
|
||
|
--
|
||
|
|
||
|
CREATE TABLE `topics` (
|
||
|
`id` int(11) NOT NULL,
|
||
|
`topic_subject` varchar(255) NOT NULL,
|
||
|
`topic_date` datetime NOT NULL DEFAULT current_timestamp(),
|
||
|
`topic_cat` int(8) NOT NULL,
|
||
|
`topic_by` int(8) NOT NULL
|
||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||
|
|
||
|
--
|
||
|
-- Dumping data for table `topics`
|
||
|
--
|
||
|
|
||
|
INSERT INTO `topics` (`id`, `topic_subject`, `topic_date`, `topic_cat`, `topic_by`) VALUES
|
||
|
(1, 'Pipistrellus kuhlii record', '2021-03-30 11:42:08', 1, 9);
|
||
|
|
||
|
--
|
||
|
-- Indexes for dumped tables
|
||
|
--
|
||
|
|
||
|
--
|
||
|
-- Indexes for table `topics`
|
||
|
--
|
||
|
ALTER TABLE `topics`
|
||
|
ADD PRIMARY KEY (`id`),
|
||
|
ADD KEY `topic_cat` (`topic_cat`),
|
||
|
ADD KEY `topic_by` (`topic_by`);
|
||
|
|
||
|
--
|
||
|
-- AUTO_INCREMENT for dumped tables
|
||
|
--
|
||
|
|
||
|
--
|
||
|
-- AUTO_INCREMENT for table `topics`
|
||
|
--
|
||
|
ALTER TABLE `topics`
|
||
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
|
||
|
|
||
|
--
|
||
|
-- Constraints for dumped tables
|
||
|
--
|
||
|
|
||
|
--
|
||
|
-- Constraints for table `topics`
|
||
|
--
|
||
|
ALTER TABLE `topics`
|
||
|
ADD CONSTRAINT `topics_ibfk_1` FOREIGN KEY (`topic_cat`) REFERENCES `categories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||
|
ADD CONSTRAINT `topics_ibfk_2` FOREIGN KEY (`topic_by`) REFERENCES `authors` (`id`) ON UPDATE CASCADE;
|
||
|
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 */;
|