From 1f6b18a1974c1b53a079b21b6be39af86deb2432 Mon Sep 17 00:00:00 2001 From: Kumar Rishabh Date: Thu, 29 Jun 2017 11:54:06 +0530 Subject: VNF_Catalogue Codebase Catalogue of Open Source VNFs consist in helping the end users to get information of the VNF we can deploy on top of an OPNFV solution [Deepak]: Removed all swp files. Change-Id: Ib2ea7330e964f1b684f32aedf631accd580df968 Signed-off-by: Kumar Rishabh Signed-off-by: Deepak S --- VNF_Catalogue/migration/schema.js | 58 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 VNF_Catalogue/migration/schema.js (limited to 'VNF_Catalogue/migration/schema.js') diff --git a/VNF_Catalogue/migration/schema.js b/VNF_Catalogue/migration/schema.js new file mode 100644 index 00000000..9a1a5e76 --- /dev/null +++ b/VNF_Catalogue/migration/schema.js @@ -0,0 +1,58 @@ +/******************************************************************************* + * Copyright (c) 2017 Kumar Rishabh(penguinRaider) and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Apache License, Version 2.0 + * which accompanies this distribution, and is available at + * http://www.apache.org/licenses/LICENSE-2.0 + *******************************************************************************/ +var Schema = { + photo: { + photo_id: {type: 'increments', nullable: false, primary: true}, + photo_url: {type: 'string', maxlength: 254, nullable: false} + }, + user: { + user_id: {type: 'increments', nullable: false, primary: true}, + user_name: {type: 'string', maxlength: 254, nullable: false}, + password: {type: 'string', maxlength: 150, nullable: false}, + email_id: {type: 'string', maxlength: 254, nullable: false, unique: true, validations: {isEmail: true}}, + photo_id: {type: 'integer', nullable: true, unsigned: true, references: 'photo.photo_id'}, + company: {type: 'string', maxlength: 254, nullable: false}, + introduction: {type: 'string', maxlength: 510, nullable: false}, + last_login: {type: 'dateTime', nullable: true}, + created_at: {type: 'dateTime', nullable: false}, + }, + vnf: { + vnf_id: {type: 'increments', nullable: false, primary: true}, + vnf_name: {type: 'string', maxlength: 254, nullable: false}, + repo_url: {type: 'string', maxlength: 254, nullable: false}, + photo_id: {type: 'integer', nullable: true, unsigned: true, references: 'photo.photo_id'}, + submitter_id: {type: 'integer', nullable: false, unsigned: true, references: 'user.user_id'}, + lines_of_code: {type: 'integer', nullable: true, unsigned: true}, + versions: {type: 'integer', nullable: true, unsigned: true}, + no_of_developers: {type: 'integer', nullable: true, unsigned: true}, + no_of_stars: {type: 'integer', nullable: true, unsigned: true}, + license: {type: 'enum', nullable: false, values: ['MIT', 'GPL', 'GPL_V2', 'BSD', 'APACHE']}, + opnfv_indicator: {type: 'enum', nullable: false, values: ['gold', 'silver', 'platinum']}, + complexity: {type: 'enum', nullable: true, values: ['low', 'medium', 'high']}, + activity: {type: 'enum', nullable: true, values: ['low', 'medium', 'high']}, + last_updated: {type: 'dateTime', nullable: true}, + }, + tag: { + tag_id: {type: 'increments', nullable: false, primary: true}, + tag_name: {type: 'string', maxlength: 150, nullable: false}, + is_vnf_name: {type: 'boolean', defaultTo: 'false'} + }, + vnf_tags: { + vnf_tag_id: {type: 'increments', nullable: false, primary: true}, + tag_id: {type: 'integer', nullable: false, unsigned: true, references: 'tag.tag_id'}, + vnf_id: {type: 'integer', nullable: false, unsigned: true, references: 'vnf.vnf_id'}, + }, + vnf_contributors: { + vnf_contributors_id: {type: 'increments', nullable: false, primary: true}, + user_id: {type: 'integer', nullable: false, unsigned: true, references: 'user.user_id'}, + vnf_id: {type: 'integer', nullable: false, unsigned: true, references: 'vnf.vnf_id'}, + created_at: {type: 'dateTime', nullable: false}, + } +}; +module.exports = Schema; -- cgit 1.2.3-korg