Skip to content

Instantly share code, notes, and snippets.

@KathyReid
Last active Jul 26, 2022
Embed
What would you like to do?
phdwork table structure for nocodb
-- phpMyAdmin SQL Dump
-- version 4.9.5deb2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jul 27, 2022 at 12:43 AM
-- Server version: 8.0.29-0ubuntu0.20.04.3
-- PHP Version: 7.4.3
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: `phdwork`
--
-- --------------------------------------------------------
--
-- Table structure for table `countries`
--
CREATE TABLE `countries` (
`COUNTRY_ID` int NOT NULL,
`COUNTRY_NAME` text NOT NULL,
`LAST_MODIFIED` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `interviewees`
--
CREATE TABLE `interviewees` (
`INTERVIEWEE_ID` int NOT NULL,
`REAL_NAME` varchar(100) NOT NULL,
`CODE_NAME` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
`ROLE_ID` int DEFAULT NULL,
`EMAIL_ADDRESS` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
`LINKEDIN_URL` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
`HOMEPAGE_URL` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
`COUNTRY_ID` int DEFAULT NULL,
`HOW_IDENTIFIED` text,
`HAS_BEEN_CONTACTED` tinyint(1) DEFAULT NULL,
`HAS_AGREED_TO_INTERVIEW` tinyint(1) DEFAULT NULL,
`NO_RESPONSE_AFTER_SEVERAL_ATTEMPTS` tinyint(1) DEFAULT NULL,
`HAS_DECLINED` tinyint(1) DEFAULT NULL,
`INTERVIEW_SCHEDULED` tinyint(1) DEFAULT NULL,
`IS_EXPLORATORY` tinyint(1) DEFAULT NULL,
`IS_INDEPTH` tinyint(1) DEFAULT NULL,
`INTERVIEWEE_DESCRIPTION` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci,
`CONSENT_RECEIVED` tinyint(1) DEFAULT NULL,
`CONSENT_URL` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
`CONSENT_ALLOWS_PARTICIPATION` tinyint(1) DEFAULT NULL,
`CONSENT_ALLOWS_IDENTIFICATION_VIA_PARTICIPANT_CODE` tinyint(1) DEFAULT NULL,
`INTERVIEW_CONDUCTED` tinyint(1) DEFAULT NULL,
`TRANSCRIPT_DONE` tinyint(1) DEFAULT NULL,
`TRANSCRIPT_URL` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
`TRANSCRIPT_APPROVED` tinyint(1) DEFAULT NULL,
`TRANSCRIPT_APPROVED_URL` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
`CODING_FIRST_DONE` tinyint(1) DEFAULT NULL,
`CODING_FIRST_LINK` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
`CODING_SECOND_DONE` tinyint(1) DEFAULT NULL,
`CODING_SECOND_URL` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
`NOTES` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci,
`LAST_CONTACT` datetime DEFAULT NULL,
`LAST_MODIFIED` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `roles`
--
CREATE TABLE `roles` (
`ROLE_ID` int NOT NULL,
`ROLE_TITLE` text NOT NULL,
`ROLE_DESCRIPTION` text NOT NULL,
`LAST_MODIFIED` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `countries`
--
ALTER TABLE `countries`
ADD PRIMARY KEY (`COUNTRY_ID`);
--
-- Indexes for table `interviewees`
--
ALTER TABLE `interviewees`
ADD PRIMARY KEY (`INTERVIEWEE_ID`),
ADD KEY `CODE_NAME` (`CODE_NAME`),
ADD KEY `ROLE_ID` (`ROLE_ID`),
ADD KEY `COUNTRY_ID` (`COUNTRY_ID`);
--
-- Indexes for table `roles`
--
ALTER TABLE `roles`
ADD PRIMARY KEY (`ROLE_ID`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `countries`
--
ALTER TABLE `countries`
MODIFY `COUNTRY_ID` int NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `interviewees`
--
ALTER TABLE `interviewees`
MODIFY `INTERVIEWEE_ID` int NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `roles`
--
ALTER TABLE `roles`
MODIFY `ROLE_ID` int NOT NULL AUTO_INCREMENT;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `interviewees`
--
ALTER TABLE `interviewees`
ADD CONSTRAINT `interviewees_ibfk_1` FOREIGN KEY (`COUNTRY_ID`) REFERENCES `countries` (`COUNTRY_ID`),
ADD CONSTRAINT `role_id` FOREIGN KEY (`ROLE_ID`) REFERENCES `roles` (`ROLE_ID`);
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