Skip to content

Commit 002cd0b

Browse files
committed
dump data and modify for mysql
1 parent 1623c90 commit 002cd0b

File tree

2 files changed

+136
-16
lines changed

2 files changed

+136
-16
lines changed

Diff for: Cloud_SQL_Export_2023-10-15 (22_09_32).sql

+123
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
-- MySQL dump 10.13
2+
--
3+
-- ------------------------------------------------------
4+
-- Server version 8.0.34
5+
6+
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
7+
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
8+
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
9+
/*!50503 SET NAMES utf8mb4 */;
10+
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
11+
/*!40103 SET TIME_ZONE='+00:00' */;
12+
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
13+
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
14+
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
15+
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
16+
17+
--
18+
-- Table structure for table `artist`
19+
--
20+
21+
DROP TABLE IF EXISTS `artist`;
22+
/*!40101 SET @saved_cs_client = @@character_set_client */;
23+
/*!50503 SET character_set_client = utf8mb4 */;
24+
CREATE TABLE `artist` (
25+
`id` int NOT NULL AUTO_INCREMENT,
26+
`name` varchar(120) DEFAULT NULL,
27+
`genres` varchar(120) DEFAULT NULL,
28+
`city` varchar(120) DEFAULT NULL,
29+
`state` varchar(120) DEFAULT NULL,
30+
`phone` varchar(120) DEFAULT NULL,
31+
`website` varchar(500) DEFAULT NULL,
32+
`facebook_link` varchar(120) DEFAULT NULL,
33+
`seeking_venue` tinyint(1) DEFAULT NULL,
34+
`seeking_description` varchar(500) DEFAULT NULL,
35+
`image_link` varchar(500) DEFAULT NULL,
36+
PRIMARY KEY (`id`)
37+
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
38+
/*!40101 SET character_set_client = @saved_cs_client */;
39+
40+
--
41+
-- Dumping data for table `artist`
42+
--
43+
44+
LOCK TABLES `artist` WRITE;
45+
/*!40000 ALTER TABLE `artist` DISABLE KEYS */;
46+
INSERT INTO `artist` VALUES (4,'Guns N Petals','Rock n Roll','San Francisco','CA','326-123-5000','https://www.gunsnpetalsband.com','https://www.facebook.com/GunsNPetals',1,'Looking for shows to perform at in the San Francisco Bay Area!','https://images.unsplash.com/photo-1549213783-8284d0336c4f?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=300&q=80'),(5,'Matt Quevedo','Jazz','New York','NY','300-400-5000','https://www.theduelingpianos.com',NULL,0,NULL,'https://images.unsplash.com/photo-1495223153807-b916f75de8c5?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=334&q=80'),(6,'The Wild Sax Band','Jazz, Classical','San Francisco','CA','432-325-5432',NULL,NULL,0,NULL,'https://images.unsplash.com/photo-1558369981-f9ca78462e61?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=794&q=80');
47+
/*!40000 ALTER TABLE `artist` ENABLE KEYS */;
48+
UNLOCK TABLES;
49+
50+
--
51+
-- Table structure for table `venue`
52+
--
53+
54+
DROP TABLE IF EXISTS `venue`;
55+
/*!40101 SET @saved_cs_client = @@character_set_client */;
56+
/*!50503 SET character_set_client = utf8mb4 */;
57+
CREATE TABLE `venue` (
58+
`id` int NOT NULL AUTO_INCREMENT,
59+
`name` varchar(120) DEFAULT NULL,
60+
`genres` varchar(120) DEFAULT NULL,
61+
`address` varchar(120) DEFAULT NULL,
62+
`city` varchar(120) DEFAULT NULL,
63+
`state` varchar(120) DEFAULT NULL,
64+
`phone` varchar(120) DEFAULT NULL,
65+
`website` varchar(500) DEFAULT NULL,
66+
`facebook_link` varchar(120) DEFAULT NULL,
67+
`seeking_talent` tinyint(1) DEFAULT NULL,
68+
`seeking_description` varchar(500) DEFAULT NULL,
69+
`image_link` varchar(500) DEFAULT NULL,
70+
PRIMARY KEY (`id`)
71+
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
72+
/*!40101 SET character_set_client = @saved_cs_client */;
73+
74+
--
75+
-- Dumping data for table `venue`
76+
--
77+
78+
LOCK TABLES `venue` WRITE;
79+
/*!40000 ALTER TABLE `venue` DISABLE KEYS */;
80+
INSERT INTO `venue` VALUES (1,'The Musical Hop','Jazz, Reggae, Swing, Classical, Folk','1015 Folsom Street','San Francisco','CA','123-123-1234','https://www.themusicalhop.com','https://www.facebook.com/TheMusicalHop',1,'We are on the lookout for a local artist to play every two weeks. Please call us.','https://images.unsplash.com/photo-1543900694-133f37abaaa5?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=400&q=60'),(2,'The Dueling Pianos Bar','Classical, R&B, Hip-Hop','335 Delancey Street','New York','NY','914-003-1132','https://www.theduelingpianos.com','https://www.facebook.com/theduelingpianos',0,NULL,'https://images.unsplash.com/photo-1497032205916-ac775f0649ae?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=750&q=80'),(3,'Park Square Live Music & Coffee','Rock n Roll, Jazz, Classical, Folk','34 Whiskey Moore Ave','San Francisco','CA','415-000-1234','https://www.parksquarelivemusicandcoffee.com','https://www.facebook.com/ParkSquareLiveMusicAndCoffee',0,NULL,'https://images.unsplash.com/photo-1485686531765-ba63b07845a7?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=747&q=80');
81+
/*!40000 ALTER TABLE `venue` ENABLE KEYS */;
82+
UNLOCK TABLES;
83+
84+
--
85+
-- Table structure for table `show`
86+
--
87+
88+
DROP TABLE IF EXISTS `show`;
89+
/*!40101 SET @saved_cs_client = @@character_set_client */;
90+
/*!50503 SET character_set_client = utf8mb4 */;
91+
CREATE TABLE `show` (
92+
`id` int NOT NULL AUTO_INCREMENT,
93+
`venue_id` int NOT NULL,
94+
`artist_id` int NOT NULL,
95+
`start_time` datetime DEFAULT NULL,
96+
PRIMARY KEY (`id`),
97+
KEY `venue_id` (`venue_id`),
98+
KEY `artist_id` (`artist_id`),
99+
CONSTRAINT `show_ibfk_1` FOREIGN KEY (`venue_id`) REFERENCES `venue` (`id`),
100+
CONSTRAINT `show_ibfk_2` FOREIGN KEY (`artist_id`) REFERENCES `artist` (`id`)
101+
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
102+
/*!40101 SET character_set_client = @saved_cs_client */;
103+
104+
--
105+
-- Dumping data for table `show`
106+
--
107+
108+
LOCK TABLES `show` WRITE;
109+
/*!40000 ALTER TABLE `show` DISABLE KEYS */;
110+
INSERT INTO `show` VALUES (1,1,4,'2023-08-05 21:00:00'),(2,2,5,'2023-09-10 23:00:00'),(3,3,6,'2023-10-01 20:00:00'),(4,1,4,'2023-11-25 20:00:00'),(5,2,5,'2023-12-30 20:00:00');
111+
/*!40000 ALTER TABLE `show` ENABLE KEYS */;
112+
UNLOCK TABLES;
113+
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
114+
115+
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
116+
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
117+
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
118+
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
119+
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
120+
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
121+
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
122+
123+
-- Dump completed on 2023-12-24 22:43:23

Diff for: mock_up_data.sql

+13-16
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
GRANT ALL PRIVILEGES ON DATABASE fyyur TO john;
22

33
-- Venue
4-
INSERT INTO "Venue" VALUES (1, 'The Musical Hop', 'Jazz, Reggae, Swing, Classical, Folk', '1015 Folsom Street', 'San Francisco', 'CA', '123-123-1234', 'https://www.themusicalhop.com', 'https://www.facebook.com/TheMusicalHop', TRUE, 'We are on the lookout for a local artist to play every two weeks. Please call us.', 'https://images.unsplash.com/photo-1543900694-133f37abaaa5?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=400&q=60');
5-
INSERT INTO "Venue" VALUES (2, 'The Dueling Pianos Bar', 'Classical, R&B, Hip-Hop', '335 Delancey Street', 'New York', 'NY', '914-003-1132', 'https://www.theduelingpianos.com', 'https://www.facebook.com/theduelingpianos', FALSE, null, 'https://images.unsplash.com/photo-1497032205916-ac775f0649ae?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=750&q=80');
6-
INSERT INTO "Venue" VALUES (3, 'Park Square Live Music & Coffee', 'Rock n Roll, Jazz, Classical, Folk', '34 Whiskey Moore Ave', 'San Francisco', 'CA', '415-000-1234', 'https://www.parksquarelivemusicandcoffee.com', 'https://www.facebook.com/ParkSquareLiveMusicAndCoffee', FALSE, null, 'https://images.unsplash.com/photo-1485686531765-ba63b07845a7?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=747&q=80');
4+
INSERT INTO `Venue` VALUES (1, 'The Musical Hop', 'Jazz, Reggae, Swing, Classical, Folk', '1015 Folsom Street', 'San Francisco', 'CA', '123-123-1234', 'https://www.themusicalhop.com', 'https://www.facebook.com/TheMusicalHop', TRUE, 'We are on the lookout for a local artist to play every two weeks. Please call us.', 'https://images.unsplash.com/photo-1543900694-133f37abaaa5?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=400&q=60');
5+
INSERT INTO `Venue` VALUES (2, 'The Dueling Pianos Bar', 'Classical, R&B, Hip-Hop', '335 Delancey Street', 'New York', 'NY', '914-003-1132', 'https://www.theduelingpianos.com', 'https://www.facebook.com/theduelingpianos', FALSE, null, 'https://images.unsplash.com/photo-1497032205916-ac775f0649ae?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=750&q=80');
6+
INSERT INTO `Venue` VALUES (3, 'Park Square Live Music & Coffee', 'Rock n Roll, Jazz, Classical, Folk', '34 Whiskey Moore Ave', 'San Francisco', 'CA', '415-000-1234', 'https://www.parksquarelivemusicandcoffee.com', 'https://www.facebook.com/ParkSquareLiveMusicAndCoffee', FALSE, null, 'https://images.unsplash.com/photo-1485686531765-ba63b07845a7?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=747&q=80');
7+
78
-- Artist
8-
INSERT INTO "Artist" VALUES (4, 'Guns N Petals', 'Rock n Roll', 'San Francisco', 'CA', '326-123-5000', 'https://www.gunsnpetalsband.com', 'https://www.facebook.com/GunsNPetals', TRUE, 'Looking for shows to perform at in the San Francisco Bay Area!', 'https://images.unsplash.com/photo-1549213783-8284d0336c4f?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=300&q=80');
9-
INSERT INTO "Artist" VALUES (5, 'Matt Quevedo', 'Jazz', 'New York', 'NY', '300-400-5000', 'https://www.theduelingpianos.com', null, FALSE, null, 'https://images.unsplash.com/photo-1495223153807-b916f75de8c5?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=334&q=80');
10-
INSERT INTO "Artist" VALUES (6, 'The Wild Sax Band', 'Jazz, Classical', 'San Francisco', 'CA', '432-325-5432', null, null, FALSE, null, 'https://images.unsplash.com/photo-1558369981-f9ca78462e61?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=794&q=80');
11-
-- Show
12-
INSERT INTO "Show" VALUES (1, 1, 4, '2023-07-05T21:00:00.000Z');
13-
INSERT INTO "Show" VALUES (2, 2, 5, '2023-08-10T23:00:00.000Z');
14-
INSERT INTO "Show" VALUES (3, 3, 6, '2023-09-01T20:00:00.000Z');
15-
INSERT INTO "Show" VALUES (4, 1, 4, '2023-10-25T20:00:00.000Z');
16-
INSERT INTO "Show" VALUES (5, 2, 5, '2023-11-15T20:00:00.000Z');
9+
INSERT INTO `Artist` VALUES (4, 'Guns N Petals', 'Rock n Roll', 'San Francisco', 'CA', '326-123-5000', 'https://www.gunsnpetalsband.com', 'https://www.facebook.com/GunsNPetals', TRUE, 'Looking for shows to perform at in the San Francisco Bay Area!', 'https://images.unsplash.com/photo-1549213783-8284d0336c4f?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=300&q=80');
10+
INSERT INTO `Artist` VALUES (5, 'Matt Quevedo', 'Jazz', 'New York', 'NY', '300-400-5000', 'https://www.theduelingpianos.com', null, FALSE, null, 'https://images.unsplash.com/photo-1495223153807-b916f75de8c5?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=334&q=80');
11+
INSERT INTO `Artist` VALUES (6, 'The Wild Sax Band', 'Jazz, Classical', 'San Francisco', 'CA', '432-325-5432', null, null, FALSE, null, 'https://images.unsplash.com/photo-1558369981-f9ca78462e61?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=794&q=80');
1712

18-
-- Fix Id Sequence
19-
SELECT setval('"Venue_id_seq"', (SELECT MAX(id) from "Venue"));
20-
SELECT setval('"Artist_id_seq"', (SELECT MAX(id) from "Artist"));
21-
SELECT setval('"Show_id_seq"', (SELECT MAX(id) from "Show"));
13+
-- Show
14+
INSERT INTO `Show` VALUES (1, 1, 4, '2023-08-05 21:00:00');
15+
INSERT INTO `Show` VALUES (2, 2, 5, '2023-09-10 23:00:00');
16+
INSERT INTO `Show` VALUES (3, 3, 6, '2023-10-01 20:00:00');
17+
INSERT INTO `Show` VALUES (4, 1, 4, '2023-11-25 20:00:00');
18+
INSERT INTO `Show` VALUES (5, 2, 5, '2023-12-30 20:00:00');

0 commit comments

Comments
 (0)