· 6 years ago · Mar 25, 2019, 01:44 PM
1--
2-- Table structure for table `alembic_version_bgpvpn`
3--
4
5DROP TABLE IF EXISTS `alembic_version_bgpvpn`;
6/*!40101 SET @saved_cs_client = @@character_set_client */;
7/*!40101 SET character_set_client = utf8 */;
8CREATE TABLE `alembic_version_bgpvpn` (
9 `version_num` varchar(32) NOT NULL,
10 PRIMARY KEY (`version_num`)
11) ENGINE=InnoDB DEFAULT CHARSET=utf8;
12/*!40101 SET character_set_client = @saved_cs_client */;
13
14--
15-- Dumping data for table `alembic_version_bgpvpn`
16--
17
18LOCK TABLES `alembic_version_bgpvpn` WRITE;
19/*!40000 ALTER TABLE `alembic_version_bgpvpn` DISABLE KEYS */;
20INSERT INTO `alembic_version_bgpvpn` VALUES ('23ce05e0a19f'),('666c706fea3b');
21/*!40000 ALTER TABLE `alembic_version_bgpvpn` ENABLE KEYS */;
22UNLOCK TABLES;
23
24--
25-- Table structure for table `bgpvpn_network_associations`
26--
27
28DROP TABLE IF EXISTS `bgpvpn_network_associations`;
29/*!40101 SET @saved_cs_client = @@character_set_client */;
30/*!40101 SET character_set_client = utf8 */;
31CREATE TABLE `bgpvpn_network_associations` (
32 `id` varchar(36) NOT NULL,
33 `project_id` varchar(255) NOT NULL,
34 `bgpvpn_id` varchar(36) NOT NULL,
35 `network_id` varchar(36) NOT NULL,
36 PRIMARY KEY (`id`),
37 UNIQUE KEY `bgpvpn_id` (`bgpvpn_id`,`network_id`),
38 KEY `network_id` (`network_id`),
39 KEY `ix_bgpvpn_network_associations_project_id` (`project_id`),
40 CONSTRAINT `bgpvpn_network_associations_ibfk_1` FOREIGN KEY (`network_id`) REFERENCES `networks` (`id`) ON DELETE CASCADE,
41 CONSTRAINT `bgpvpn_network_associations_ibfk_2` FOREIGN KEY (`bgpvpn_id`) REFERENCES `bgpvpns` (`id`) ON DELETE CASCADE
42) ENGINE=InnoDB DEFAULT CHARSET=utf8;
43/*!40101 SET character_set_client = @saved_cs_client */;
44
45--
46-- Dumping data for table `bgpvpn_network_associations`
47--
48
49LOCK TABLES `bgpvpn_network_associations` WRITE;
50/*!40000 ALTER TABLE `bgpvpn_network_associations` DISABLE KEYS */;
51/*!40000 ALTER TABLE `bgpvpn_network_associations` ENABLE KEYS */;
52UNLOCK TABLES;
53
54--
55-- Table structure for table `bgpvpn_port_association_routes`
56--
57
58DROP TABLE IF EXISTS `bgpvpn_port_association_routes`;
59/*!40101 SET @saved_cs_client = @@character_set_client */;
60/*!40101 SET character_set_client = utf8 */;
61CREATE TABLE `bgpvpn_port_association_routes` (
62 `id` varchar(36) NOT NULL,
63 `port_association_id` varchar(36) NOT NULL,
64 `type` enum('prefix','bgpvpn') NOT NULL,
65 `local_pref` bigint(20) DEFAULT NULL,
66 `prefix` varchar(49) DEFAULT NULL,
67 `bgpvpn_id` varchar(36) DEFAULT NULL,
68 PRIMARY KEY (`id`),
69 KEY `port_association_id` (`port_association_id`),
70 KEY `bgpvpn_id` (`bgpvpn_id`),
71 CONSTRAINT `bgpvpn_port_association_routes_ibfk_1` FOREIGN KEY (`port_association_id`) REFERENCES `bgpvpn_port_associations` (`id`) ON DELETE CASCADE,
72 CONSTRAINT `bgpvpn_port_association_routes_ibfk_2` FOREIGN KEY (`bgpvpn_id`) REFERENCES `bgpvpns` (`id`) ON DELETE CASCADE
73) ENGINE=InnoDB DEFAULT CHARSET=utf8;
74/*!40101 SET character_set_client = @saved_cs_client */;
75
76--
77-- Dumping data for table `bgpvpn_port_association_routes`
78--
79
80LOCK TABLES `bgpvpn_port_association_routes` WRITE;
81/*!40000 ALTER TABLE `bgpvpn_port_association_routes` DISABLE KEYS */;
82/*!40000 ALTER TABLE `bgpvpn_port_association_routes` ENABLE KEYS */;
83UNLOCK TABLES;
84
85--
86-- Table structure for table `bgpvpn_port_associations`
87--
88
89DROP TABLE IF EXISTS `bgpvpn_port_associations`;
90/*!40101 SET @saved_cs_client = @@character_set_client */;
91/*!40101 SET character_set_client = utf8 */;
92CREATE TABLE `bgpvpn_port_associations` (
93 `id` varchar(36) NOT NULL,
94 `project_id` varchar(255) NOT NULL,
95 `bgpvpn_id` varchar(36) NOT NULL,
96 `port_id` varchar(36) NOT NULL,
97 `advertise_fixed_ips` tinyint(1) NOT NULL DEFAULT '1',
98 PRIMARY KEY (`id`),
99 UNIQUE KEY `bgpvpn_id` (`bgpvpn_id`,`port_id`),
100 KEY `port_id` (`port_id`),
101 KEY `ix_bgpvpn_port_associations_project_id` (`project_id`),
102 CONSTRAINT `bgpvpn_port_associations_ibfk_1` FOREIGN KEY (`bgpvpn_id`) REFERENCES `bgpvpns` (`id`) ON DELETE CASCADE,
103 CONSTRAINT `bgpvpn_port_associations_ibfk_2` FOREIGN KEY (`port_id`) REFERENCES `ports` (`id`) ON DELETE CASCADE
104) ENGINE=InnoDB DEFAULT CHARSET=utf8;
105/*!40101 SET character_set_client = @saved_cs_client */;
106
107--
108-- Dumping data for table `bgpvpn_port_associations`
109--
110
111LOCK TABLES `bgpvpn_port_associations` WRITE;
112/*!40000 ALTER TABLE `bgpvpn_port_associations` DISABLE KEYS */;
113/*!40000 ALTER TABLE `bgpvpn_port_associations` ENABLE KEYS */;
114UNLOCK TABLES;
115
116--
117-- Table structure for table `bgpvpn_router_associations`
118--
119
120DROP TABLE IF EXISTS `bgpvpn_router_associations`;
121/*!40101 SET @saved_cs_client = @@character_set_client */;
122/*!40101 SET character_set_client = utf8 */;
123CREATE TABLE `bgpvpn_router_associations` (
124 `id` varchar(36) NOT NULL,
125 `project_id` varchar(255) NOT NULL,
126 `bgpvpn_id` varchar(36) NOT NULL,
127 `router_id` varchar(36) NOT NULL,
128 `advertise_extra_routes` tinyint(1) NOT NULL DEFAULT '1',
129 PRIMARY KEY (`id`),
130 UNIQUE KEY `bgpvpn_id` (`bgpvpn_id`,`router_id`),
131 KEY `router_id` (`router_id`),
132 KEY `ix_bgpvpn_router_associations_project_id` (`project_id`),
133 CONSTRAINT `bgpvpn_router_associations_ibfk_1` FOREIGN KEY (`router_id`) REFERENCES `routers` (`id`) ON DELETE CASCADE,
134 CONSTRAINT `bgpvpn_router_associations_ibfk_2` FOREIGN KEY (`bgpvpn_id`) REFERENCES `bgpvpns` (`id`) ON DELETE CASCADE
135) ENGINE=InnoDB DEFAULT CHARSET=utf8;
136/*!40101 SET character_set_client = @saved_cs_client */;
137
138--
139-- Dumping data for table `bgpvpn_router_associations`
140--
141
142LOCK TABLES `bgpvpn_router_associations` WRITE;
143/*!40000 ALTER TABLE `bgpvpn_router_associations` DISABLE KEYS */;
144/*!40000 ALTER TABLE `bgpvpn_router_associations` ENABLE KEYS */;
145UNLOCK TABLES;
146
147--
148-- Table structure for table `bgpvpns`
149--
150
151DROP TABLE IF EXISTS `bgpvpns`;
152/*!40101 SET @saved_cs_client = @@character_set_client */;
153/*!40101 SET character_set_client = utf8 */;
154CREATE TABLE `bgpvpns` (
155 `name` varchar(255) DEFAULT NULL,
156 `id` varchar(36) NOT NULL,
157 `project_id` varchar(255) DEFAULT NULL,
158 `type` enum('l2','l3') NOT NULL,
159 `route_targets` varchar(255) NOT NULL,
160 `import_targets` varchar(255) DEFAULT NULL,
161 `export_targets` varchar(255) DEFAULT NULL,
162 `route_distinguishers` varchar(255) DEFAULT NULL,
163 `vni` int(11) DEFAULT NULL,
164 `local_pref` bigint(20) DEFAULT NULL,
165 PRIMARY KEY (`id`),
166 KEY `ix_bgpvpns_project_id` (`project_id`)
167) ENGINE=InnoDB DEFAULT CHARSET=utf8;
168/*!40101 SET character_set_client = @saved_cs_client */;
169
170--
171-- Dumping data for table `bgpvpns`
172--
173
174LOCK TABLES `bgpvpns` WRITE;
175/*!40000 ALTER TABLE `bgpvpns` DISABLE KEYS */;
176/*!40000 ALTER TABLE `bgpvpns` ENABLE KEYS */;
177UNLOCK TABLES;