45 lines
926 B
SQL
45 lines
926 B
SQL
--
|
|
-- Table structure for table `content`
|
|
--
|
|
|
|
CREATE TABLE `content` (
|
|
`id` int(11) NOT NULL,
|
|
`coach_id` int(11) NOT NULL,
|
|
`title` varchar(255) NOT NULL,
|
|
`description` text DEFAULT NULL,
|
|
`file_path` varchar(255) NOT NULL,
|
|
`file_type` varchar(50) DEFAULT NULL,
|
|
`created_at` timestamp NOT NULL DEFAULT current_timestamp()
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
|
--
|
|
-- Indexes for dumped tables
|
|
--
|
|
|
|
--
|
|
-- Indexes for table `content`
|
|
--
|
|
ALTER TABLE `content`
|
|
ADD PRIMARY KEY (`id`),
|
|
ADD KEY `coach_id` (`coach_id`);
|
|
|
|
--
|
|
-- AUTO_INCREMENT for dumped tables
|
|
--
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `content`
|
|
--
|
|
ALTER TABLE `content`
|
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- Constraints for dumped tables
|
|
--
|
|
|
|
--
|
|
-- Constraints for table `content`
|
|
--
|
|
ALTER TABLE `content`
|
|
ADD CONSTRAINT `content_ibfk_1` FOREIGN KEY (`coach_id`) REFERENCES `coaches` (`id`) ON DELETE CASCADE;
|