diff options
author | fujinhua <fu.jinhua@zte.com.cn> | 2019-04-16 11:50:16 +0800 |
---|---|---|
committer | fujinhua <fu.jinhua@zte.com.cn> | 2019-04-16 11:50:16 +0800 |
commit | 5404f8ddda434f44862f53ba7262e6882d8c8b81 (patch) | |
tree | 001a9b455bf1f783fb96e36f4e03a4d78e2f1833 | |
parent | 80cd90cac4156d88b1765f13c3791362d490d903 (diff) |
Add db migrations py for catalog
Change-Id: Ie8d29f6da25606e31e7439e47fbd066490d5fbcd
Issue-ID: VFC-1306
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rw-r--r-- | catalog/pub/database/migrations/0001_initial.py | 229 | ||||
-rw-r--r-- | catalog/pub/database/migrations/__init__.py | 13 |
2 files changed, 242 insertions, 0 deletions
diff --git a/catalog/pub/database/migrations/0001_initial.py b/catalog/pub/database/migrations/0001_initial.py new file mode 100644 index 00000000..8446b6e3 --- /dev/null +++ b/catalog/pub/database/migrations/0001_initial.py @@ -0,0 +1,229 @@ +# Copyright 2019 ZTE 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. +# Generated by Django 1.11.9 on 2019-04-16 03:53 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='JobModel', + fields=[ + ('jobid', models.CharField(db_column=b'JOBID', max_length=255, primary_key=True, serialize=False)), + ('jobtype', models.CharField(db_column=b'JOBTYPE', max_length=255)), + ('jobaction', models.CharField(db_column=b'JOBACTION', max_length=255)), + ('resid', models.CharField(db_column=b'RESID', max_length=255)), + ('status', models.IntegerField(blank=True, db_column=b'STATUS', null=True)), + ('starttime', models.CharField(blank=True, db_column=b'STARTTIME', max_length=255, null=True)), + ('endtime', models.CharField(blank=True, db_column=b'ENDTIME', max_length=255, null=True)), + ('progress', models.IntegerField(blank=True, db_column=b'PROGRESS', null=True)), + ('user', models.CharField(blank=True, db_column=b'USER', max_length=255, null=True)), + ('parentjobid', models.CharField(blank=True, db_column=b'PARENTJOBID', max_length=255, null=True)), + ('resname', models.CharField(blank=True, db_column=b'RESNAME', max_length=255, null=True)), + ], + options={ + 'db_table': 'CATALOG_JOB', + }, + ), + migrations.CreateModel( + name='JobStatusModel', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('indexid', models.IntegerField(db_column=b'INDEXID')), + ('jobid', models.CharField(db_column=b'JOBID', max_length=255)), + ('status', models.CharField(db_column=b'STATUS', max_length=255)), + ('progress', models.IntegerField(blank=True, db_column=b'PROGRESS', null=True)), + ('descp', models.TextField(db_column=b'DESCP', max_length=65535)), + ('errcode', models.CharField(blank=True, db_column=b'ERRCODE', max_length=255, null=True)), + ('addtime', models.CharField(blank=True, db_column=b'ADDTIME', max_length=255, null=True)), + ], + options={ + 'db_table': 'CATALOG_JOB_STATUS', + }, + ), + migrations.CreateModel( + name='NsdmSubscriptionModel', + fields=[ + ('subscriptionid', models.CharField(db_column=b'SUBSCRIPTIONID', max_length=255, primary_key=True, serialize=False)), + ('notificationTypes', models.TextField(db_column=b'NOTIFICATIONTYPES', null=True)), + ('auth_info', models.TextField(db_column=b'AUTHINFO', null=True)), + ('callback_uri', models.CharField(db_column=b'CALLBACKURI', max_length=255)), + ('nsdInfoId', models.TextField(db_column=b'NSDINFOID', null=True)), + ('nsdId', models.TextField(db_column=b'NSDID', null=True)), + ('nsdName', models.TextField(db_column=b'NSDNAME', null=True)), + ('nsdVersion', models.TextField(db_column=b'NSDVERSION', null=True)), + ('nsdDesigner', models.TextField(db_column=b'NSDDESIGNER', null=True)), + ('nsdInvariantId', models.TextField(db_column=b'NSDINVARIANTID', null=True)), + ('vnfPkgIds', models.TextField(db_column=b'VNFPKGIDS', null=True)), + ('pnfdInfoIds', models.TextField(db_column=b'PNFDINFOIDS', null=True)), + ('nestedNsdInfoIds', models.TextField(db_column=b'NESTEDNSDINFOIDS', null=True)), + ('nsdOnboardingState', models.TextField(db_column=b'NSDONBOARDINGSTATE', null=True)), + ('nsdOperationalState', models.TextField(db_column=b'NSDOPERATIONALSTATE', null=True)), + ('nsdUsageState', models.TextField(db_column=b'NSDUSAGESTATE', null=True)), + ('pnfdId', models.TextField(db_column=b'PNFDID', null=True)), + ('pnfdName', models.TextField(db_column=b'PNFDNAME', null=True)), + ('pnfdVersion', models.TextField(db_column=b'PNFDVERSION', null=True)), + ('pnfdProvider', models.TextField(db_column=b'PNFDPROVIDER', null=True)), + ('pnfdInvariantId', models.TextField(db_column=b'PNFDINVARIANTID', null=True)), + ('pnfdOnboardingState', models.TextField(db_column=b'PNFDONBOARDINGSTATE', null=True)), + ('pnfdUsageState', models.TextField(db_column=b'PNFDUSAGESTATE', null=True)), + ('links', models.TextField(db_column=b'LINKS')), + ], + options={ + 'db_table': 'CATALOG_NSDM_SUBSCRIPTION', + }, + ), + migrations.CreateModel( + name='NSPackageModel', + fields=[ + ('nsPackageId', models.CharField(db_column=b'NSPACKAGEID', max_length=50, primary_key=True, serialize=False)), + ('nsPackageUri', models.CharField(blank=True, db_column=b'NSPACKAGEURI', max_length=300, null=True)), + ('checksum', models.CharField(blank=True, db_column=b'CHECKSUM', max_length=50, null=True)), + ('sdcCsarId', models.CharField(blank=True, db_column=b'SDCCSARID', max_length=50, null=True)), + ('onboardingState', models.CharField(blank=True, db_column=b'ONBOARDINGSTATE', max_length=20, null=True)), + ('operationalState', models.CharField(blank=True, db_column=b'OPERATIONALSTATE', max_length=20, null=True)), + ('usageState', models.CharField(blank=True, db_column=b'USAGESTATE', max_length=20, null=True)), + ('deletionPending', models.CharField(blank=True, db_column=b'DELETIONPENDING', max_length=20, null=True)), + ('nsdId', models.CharField(blank=True, db_column=b'NSDID', max_length=50, null=True)), + ('invariantId', models.CharField(blank=True, db_column=b'INVARIANTID', max_length=50, null=True)), + ('nsdName', models.CharField(blank=True, db_column=b'NSDNAME', max_length=50, null=True)), + ('nsdDesginer', models.CharField(blank=True, db_column=b'NSDDESIGNER', max_length=50, null=True)), + ('nsdDescription', models.CharField(blank=True, db_column=b'NSDDESCRIPTION', max_length=100, null=True)), + ('nsdVersion', models.CharField(blank=True, db_column=b'NSDVERSION', max_length=20, null=True)), + ('userDefinedData', models.TextField(blank=True, db_column=b'USERDEFINEDDATA', max_length=1024, null=True)), + ('localFilePath', models.CharField(blank=True, db_column=b'LOCALFILEPATH', max_length=300, null=True)), + ('nsdModel', models.TextField(blank=True, db_column=b'NSDMODEL', max_length=65535, null=True)), + ], + options={ + 'db_table': 'CATALOG_NSPACKAGE', + }, + ), + migrations.CreateModel( + name='PnfPackageModel', + fields=[ + ('pnfPackageId', models.CharField(db_column=b'PNFPACKAGEID', max_length=50, primary_key=True, serialize=False)), + ('pnfPackageUri', models.CharField(blank=True, db_column=b'PNFPACKAGEURI', max_length=300, null=True)), + ('sdcCSARUri', models.CharField(blank=True, db_column=b'SDCCSARURI', max_length=300, null=True)), + ('checksum', models.CharField(blank=True, db_column=b'CHECKSUM', max_length=50, null=True)), + ('onboardingState', models.CharField(blank=True, db_column=b'ONBOARDINGSTATE', max_length=20, null=True)), + ('usageState', models.CharField(blank=True, db_column=b'USAGESTATE', max_length=20, null=True)), + ('deletionPending', models.CharField(blank=True, db_column=b'DELETIONPENDING', max_length=20, null=True)), + ('pnfdId', models.CharField(blank=True, db_column=b'PNFDID', max_length=50, null=True)), + ('pnfVendor', models.CharField(blank=True, db_column=b'VENDOR', max_length=50, null=True)), + ('pnfdProductName', models.CharField(blank=True, db_column=b'PNFDPRODUCTNAME', max_length=50, null=True)), + ('pnfdVersion', models.CharField(blank=True, db_column=b'PNFDVERSION', max_length=20, null=True)), + ('pnfSoftwareVersion', models.CharField(blank=True, db_column=b'PNFSOFTWAREVERSION', max_length=20, null=True)), + ('userDefinedData', models.TextField(blank=True, db_column=b'USERDEFINEDDATA', max_length=1024, null=True)), + ('localFilePath', models.CharField(blank=True, db_column=b'LOCALFILEPATH', max_length=300, null=True)), + ('pnfdModel', models.TextField(blank=True, db_column=b'PNFDMODEL', max_length=65535, null=True)), + ('pnfdName', models.TextField(blank=True, db_column=b'PNFDNAME', max_length=65535, null=True)), + ], + options={ + 'db_table': 'CATALOG_PNFPACKAGE', + }, + ), + migrations.CreateModel( + name='ServicePackageModel', + fields=[ + ('servicePackageId', models.CharField(db_column=b'SERVICEPACKAGEID', max_length=50, primary_key=True, serialize=False)), + ('servicePackageUri', models.CharField(blank=True, db_column=b'SERVICEPACKAGEURI', max_length=300, null=True)), + ('checksum', models.CharField(blank=True, db_column=b'CHECKSUM', max_length=50, null=True)), + ('sdcCsarId', models.CharField(blank=True, db_column=b'SDCCSARID', max_length=50, null=True)), + ('onboardingState', models.CharField(blank=True, db_column=b'ONBOARDINGSTATE', max_length=20, null=True)), + ('operationalState', models.CharField(blank=True, db_column=b'OPERATIONALSTATE', max_length=20, null=True)), + ('usageState', models.CharField(blank=True, db_column=b'USAGESTATE', max_length=20, null=True)), + ('deletionPending', models.CharField(blank=True, db_column=b'DELETIONPENDING', max_length=20, null=True)), + ('servicedId', models.CharField(blank=True, db_column=b'SERVICEDID', max_length=50, null=True)), + ('invariantId', models.CharField(blank=True, db_column=b'INVARIANTID', max_length=50, null=True)), + ('servicedName', models.CharField(blank=True, db_column=b'SERVICEDNAME', max_length=50, null=True)), + ('servicedDesigner', models.CharField(blank=True, db_column=b'SERVICEDDESIGNER', max_length=50, null=True)), + ('servicedDescription', models.CharField(blank=True, db_column=b'SERVICEDDESCRIPTION', max_length=100, null=True)), + ('servicedVersion', models.CharField(blank=True, db_column=b'SERVICEDVERSION', max_length=20, null=True)), + ('userDefinedData', models.TextField(blank=True, db_column=b'USERDEFINEDDATA', max_length=1024, null=True)), + ('localFilePath', models.CharField(blank=True, db_column=b'LOCALFILEPATH', max_length=300, null=True)), + ('servicedModel', models.TextField(blank=True, db_column=b'SERVICEDMODEL', max_length=65535, null=True)), + ], + options={ + 'db_table': 'CATALOG_SERVICEPACKAGE', + }, + ), + migrations.CreateModel( + name='SoftwareImageModel', + fields=[ + ('imageid', models.CharField(db_column=b'IMAGEID', max_length=50, primary_key=True, serialize=False)), + ('containerFormat', models.CharField(db_column=b'CONTAINERFORMAT', max_length=20)), + ('diskFormat', models.CharField(db_column=b'DISKFORMAT', max_length=20)), + ('mindisk', models.CharField(db_column=b'MINDISK', max_length=20)), + ('minram', models.CharField(db_column=b'MINRAM', max_length=20)), + ('usermetadata', models.CharField(db_column=b'USAERMETADATA', max_length=1024)), + ('vnfPackageId', models.CharField(db_column=b'VNFPACKAGEID', max_length=50)), + ('filePath', models.CharField(db_column=b'FILEPATH', max_length=300)), + ('status', models.CharField(db_column=b'STATUS', max_length=10)), + ('vimid', models.CharField(db_column=b'VIMID', max_length=50)), + ], + options={ + 'db_table': 'CATALOG_SOFTWAREIMAGEMODEL', + }, + ), + migrations.CreateModel( + name='VnfPackageModel', + fields=[ + ('vnfPackageId', models.CharField(db_column=b'VNFPACKAGEID', max_length=50, primary_key=True, serialize=False)), + ('vnfPackageUri', models.CharField(blank=True, db_column=b'VNFPACKAGEURI', max_length=300, null=True)), + ('SdcCSARUri', models.CharField(blank=True, db_column=b'SDCCSARURI', max_length=300, null=True)), + ('checksum', models.CharField(blank=True, db_column=b'CHECKSUM', max_length=50, null=True)), + ('onboardingState', models.CharField(blank=True, db_column=b'ONBOARDINGSTATE', max_length=20, null=True)), + ('operationalState', models.CharField(blank=True, db_column=b'OPERATIONALSTATE', max_length=20, null=True)), + ('usageState', models.CharField(blank=True, db_column=b'USAGESTATE', max_length=20, null=True)), + ('deletionPending', models.CharField(blank=True, db_column=b'DELETIONPENDING', max_length=20, null=True)), + ('vnfdId', models.CharField(blank=True, db_column=b'VNFDID', max_length=50, null=True)), + ('vnfVendor', models.CharField(blank=True, db_column=b'VENDOR', max_length=50, null=True)), + ('vnfdProductName', models.CharField(blank=True, db_column=b'VNFDPRODUCTNAME', max_length=50, null=True)), + ('vnfdVersion', models.CharField(blank=True, db_column=b'VNFDVERSION', max_length=20, null=True)), + ('vnfSoftwareVersion', models.CharField(blank=True, db_column=b'VNFSOFTWAREVERSION', max_length=20, null=True)), + ('userDefinedData', models.TextField(blank=True, db_column=b'USERDEFINEDDATA', max_length=1024, null=True)), + ('localFilePath', models.CharField(blank=True, db_column=b'LOCALFILEPATH', max_length=300, null=True)), + ('vnfdModel', models.TextField(blank=True, db_column=b'VNFDMODEL', max_length=65535, null=True)), + ], + options={ + 'db_table': 'CATALOG_VNFPACKAGE', + }, + ), + migrations.CreateModel( + name='VnfPkgSubscriptionModel', + fields=[ + ('subscription_id', models.CharField(db_column=b'SUBSCRIPTION_ID', max_length=255, primary_key=True, serialize=False)), + ('callback_uri', models.URLField(db_column=b'CALLBACK_URI', max_length=255)), + ('auth_info', models.TextField(db_column=b'AUTH_INFO')), + ('usage_states', models.TextField(db_column=b'USAGE_STATES')), + ('notification_types', models.TextField(db_column=b'NOTIFICATION_TYPES')), + ('vnfd_id', models.TextField(db_column=b'VNFD_ID')), + ('vnf_pkg_id', models.TextField(db_column=b'VNF_PKG_ID')), + ('operation_states', models.TextField(db_column=b'OPERATION_STATES')), + ('vnf_products_from_provider', models.TextField(db_column=b'VNF_PRODUCTS_FROM_PROVIDER')), + ('links', models.TextField(db_column=b'LINKS')), + ], + options={ + 'db_table': 'VNF_PKG_SUBSCRIPTION', + }, + ), + ] diff --git a/catalog/pub/database/migrations/__init__.py b/catalog/pub/database/migrations/__init__.py new file mode 100644 index 00000000..0c847b7d --- /dev/null +++ b/catalog/pub/database/migrations/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2019 ZTE 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. |