summaryrefslogtreecommitdiffstats
path: root/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/db/mysql/db-schema.sql
blob: 8a3b2a280a7914bb084e73915b792680bdffdac2 (plain)
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
53
54
55
56
--
--
--    Copyright (c) 2016, Nokia Corporation.
--
--    Licensed under the Apache License, Version 2.0 (the "License");
--    you may not use this file except in compliance with the License.
--    You may obtain a copy of the License at
--
--    http://www.apache.org/licenses/LICENSE-2.0
--
--    Unless required by applicable law or agreed to in writing, software
--    distributed under the License is distributed on an "AS IS" BASIS,
--    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--    See the License for the specific language governing permissions and
--    limitations under the License.
--

/******************drop old database and user***************************/
use mysql;
drop database IF EXISTS vnfm_db;
delete from user where User='vnfm';
FLUSH PRIVILEGES;

/******************create new database and user***************************/
create database vnfm_db CHARACTER SET utf8;

GRANT ALL PRIVILEGES ON vnfm_db.* TO 'vnfm'@'%' IDENTIFIED BY 'vnfmpass' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON mysql.* TO 'vnfm'@'%' IDENTIFIED BY 'vnfmpass' WITH GRANT OPTION;

GRANT ALL PRIVILEGES ON vnfm_db.* TO 'vnfm'@'localhost' IDENTIFIED BY 'vnfmpass' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON mysql.* TO 'vnfm'@'localhost' IDENTIFIED BY 'vnfmpass' WITH GRANT OPTION;
FLUSH PRIVILEGES;

use vnfm_db;
set Names 'utf8';

/******************drop old table and create new***************************/

DROP TABLE IF EXISTS  vnfm_job_execution_info;
CREATE TABLE `vnfm_job_execution_info` (
  `job_id` int(11) auto_increment primary key,
  `vnf_instance_id` varchar(60) DEFAULT NULL,
  `vnfm_execution_id` varchar(60) DEFAULT NULL,
  `vnfm_interface_name` varchar(60) DEFAULT NULL,
  `status` varchar(24) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS vnfm_resource_info;
CREATE TABLE `vnfm_resource_info` (
  `id` int(11) auto_increment primary key,
  `type` enum ('VDU','VL','CP','Storage') DEFAULT NULL,
  `resource_definition_id` varchar(60) DEFAULT NULL,
  `vdu` varchar(60) DEFAULT NULL,
  `status` varchar(24) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;