-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathworkopia.sql
52 lines (48 loc) · 4.18 KB
/
workopia.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
-- Create the 'workopia' database
CREATE DATABASE IF NOT EXISTS workopia;
USE workopia;
-- Table structure for 'users' table
CREATE TABLE IF NOT EXISTS `users` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`city` varchar(45) DEFAULT NULL,
`state` varchar(45) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- Insert data into 'users' table
INSERT INTO `users` VALUES
(1,'John Doe','[email protected]','$2y$10$UkdJDaWLRHPVwOu3lb9XW.FZWZmFaLM0BJbaj0/7dvPIqs7sdDlvK','Boston','MA','2023-11-18 13:55:59'),
(2,'Jane Doe','[email protected]','$2y$10$UkdJDaWLRHPVwOu3lb9XW.FZWZmFaLM0BJbaj0/7dvPIqs7sdDlvK','San Francisco','CA','2023-11-18 13:58:26'),
(3,'Steve Smith','[email protected]','$2y$10$UkdJDaWLRHPVwOu3lb9XW.FZWZmFaLM0BJbaj0/7dvPIqs7sdDlvK','Chicago','IL','2023-11-18 13:59:13');
-- Table structure for 'listings' table
CREATE TABLE IF NOT EXISTS `listings` (
`id` int NOT NULL AUTO_INCREMENT,
`user_id` int NOT NULL,
`title` varchar(255) NOT NULL,
`description` longtext,
`salary` varchar(45) DEFAULT NULL,
`tags` varchar(255) DEFAULT NULL,
`company` varchar(45) DEFAULT NULL,
`address` varchar(255) DEFAULT NULL,
`city` varchar(45) DEFAULT NULL,
`state` varchar(45) DEFAULT NULL,
`phone` varchar(45) DEFAULT NULL,
`email` varchar(45) DEFAULT NULL,
`requirements` longtext,
`benefits` longtext,
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `fk_listings_users_idx` (`user_id`),
CONSTRAINT `fk_listings_users` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- Insert data into 'listings' table
INSERT INTO `listings` VALUES
(1,1,'Software Engineer','We are seeking a skilled software engineer to develop high-quality software solutions','90000','development, coding, java, python','Tech Solutions Inc.','123 Main St','Albany','NY','348-334-3949','[email protected]','Bachelors degree in Computer Science or related field, 3+ years of software development experience','Healthcare, 401(k) matching, flexible work hours','2023-11-18 14:04:36'),
(2,2,'Marketing Specialist','We are looking for a Marketing Specialist to create and manage marketing campaigns','80000','marketing, advertising','Marketing Pros','123 Market St','San Francisco','CA','454-344-3344','[email protected]','Bachelors degree in Marketing or related field, experience in digital marketing','Health and dental insurance, paid time off, remote work options','2023-11-18 14:06:33'),
(3,3,'Web Developer','Join our team as a Web Developer and create amazing web applications','85000','web development, programming','WebTech Solutions','789 Web Ave','Chicago','IL','456-876-5432','[email protected]','Bachelors degree in Computer Science or related field, proficiency in HTML, CSS, JavaScript','Competitive salary, professional development opportunities, friendly work environment','2023-11-18 14:08:44'),
(4,1,'Data Analyst','We are hiring a Data Analyst to analyze and interpret data for insights','75000','data analysis, statistics','Data Insights LLC','101 Data St','Chicago','IL','444-555-5555','[email protected]','Bachelors degree in Data Science or related field, strong analytical skills','Health benefits, remote work options, casual dress code','2023-11-18 14:11:55'),
(5,2,'Graphic Designer','Join our creative team as a Graphic Designer and bring ideas to life','70000','graphic design, creative','CreativeWorks Inc','234 Design Blvd','Albany','NY','499-321-9876','[email protected]','Bachelors degree in Graphic Design or related field, proficiency in Adobe Creative Suite','Flexible work hours, creative work environment, opportunities for growth','2023-11-18 14:13:35'),
(7,1,'Frontend Web Developer','This is a frontend position working with React','70000','frontend, development','Traversy Media','10 main st','Boston','MA','555-555-5555','[email protected]','Bachelors degree','401K and Health insurance','2023-11-21 14:07:24');