-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `knee`
--

-- --------------------------------------------------------

--
-- Table structure for table `images`
--

CREATE TABLE `images` (
  `id` int(11) NOT NULL,
  `image_name` varchar(255) NOT NULL,
  `image_path` varchar(255) NOT NULL,
  `patient_id` int(11) NOT NULL,
  `prediction` varchar(255) NOT NULL,
  `confidence_score` decimal(5,2) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `images`
--

INSERT INTO `images` (`id`, `image_name`, `image_path`, `patient_id`, `prediction`, `confidence_score`, `created_at`, `updated_at`) VALUES
(1, '1000097679.jpg', 'uploads/1000097679.jpg', 2, 'Grade 3', 0.92, '2024-10-10 08:42:02', '2024-10-10 08:42:02'),
(2, '1000097682.jpg', 'uploads/1000097682.jpg', 1, 'Normal', 1.00, '2024-10-11 04:31:51', '2024-10-11 04:31:51'),
(10, '1000097674.jpg', 'uploads/1000097674.jpg', 3, 'Grade 3', 0.97, '2024-10-11 05:22:47', '2024-10-11 05:22:47');

-- --------------------------------------------------------

--
-- Table structure for table `patients`
--

CREATE TABLE `patients` (
  `id` int(11) NOT NULL,
  `patientID` varchar(255) NOT NULL,
  `patientname` varchar(255) NOT NULL,
  `Age` int(11) NOT NULL,
  `Gender` varchar(50) NOT NULL,
  `contactnumber` varchar(15) DEFAULT NULL,
  `Show_XRay_Image` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `patients`
--

INSERT INTO `patients` (`id`, `patientID`, `patientname`, `Age`, `Gender`, `contactnumber`, `Show_XRay_Image`) VALUES
(11, '1', 'kavya', 21, 'female', '1234456677', NULL),
(14, '2', 'navya', 21, 'female', '56778531', NULL),
(15, '3', 'reena', 21, 'female', '189263783', NULL),
(16, '4', 'sumi', 22, 'Female', '142562782826', NULL);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `images`
--
ALTER TABLE `images`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_patient_image` (`patient_id`,`image_name`);

--
-- Indexes for table `patients`
--
ALTER TABLE `patients`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `images`
--
ALTER TABLE `images`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `patients`
--
ALTER TABLE `patients`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
COMMIT;

